Repository navigation
docs: keep guide & example of 09-refs-and-clicks in sync - #168
Conversation
Guide «complete example» of `09-refs-and-clicks` was broken: modal opened but buttons/navigation... didn't work because of a little mistake. This fixes it and keep the code in sync with the working code in `/examples`, plus a pair of little tweaks.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 84.49% 84.72% +0.22%
==========================================
Files 169 169
Lines 21535 21588 +53
==========================================
+ Hits 18197 18291 +94
+ Misses 2669 2637 -32
+ Partials 669 660 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| </div> | ||
|
|
||
| <div class="flex justify-center"> | ||
| <span class="font-dim">r reset | g/b increase | G/B decrease | click buttons/presets | q quit</span> |
There was a problem hiding this comment.
I think it's better we keep it this way in both places (the guide and the example). It's the way it's in the guide and it's more intuitive to have both lowercase and uppercase keybinds for every color instead of making an exception for the lowercase r because of reset and then having a bit more convoluted keybinds. Plus in the old text the keybind for the red was missing.
|
|
||
|  | ||
|
|
||
| Click "reset" to open the confirmation dialog and click on an option. |
There was a problem hiding this comment.
Match the button text.
| </div> | ||
| </div> | ||
| </div> | ||
| </modal> |
There was a problem hiding this comment.
modal was outside of the parent div, so everything inside the modal was not working: tab navigation, buttons not triggering their actions...
There was a problem hiding this comment.
I didn't touch this file at all. I just ran the tests to make sure everything was all right. I guess this is generated/modified automatically as part of that.
| <span class="font-bold text-yellow">Reset Colors?</span> | ||
| <span class="font-dim">This will restore default values.</span> | ||
| <div class="flex gap-2 justify-center"> | ||
| <button class="px-2 border-rounded focusable" onActivate={s.onDelete}>Delete</button> |
There was a problem hiding this comment.
All these other changes are just to keep code the guide in sync with the example, working, code (which has minor changes).
|
Note: I just checked this example because I was having some issue with a modal I was using and then I spotted the error when trying the complete example. If wanted, in other moment I could check if all the guide examples work as intended and fix them if not. |
|
Thanks! I'll take a look |
Guide «complete example» of
09-refs-and-clickswas broken: modal opened but buttons/navigation... didn't work because of a little mistake. This can confuse people using the guides (examples in guides should work as intended).This fixes it and keep the code in sync with the working code in
/examples, plus a pair of little tweaks (commented below).