Skip to content

docs: keep guide & example of 09-refs-and-clicks in sync - #168

Merged
grindlemire merged 1 commit into
grindlemire:mainfrom
soulchainer:doc/update-09-ref-and-clicks-guide-outdated-complete-example-not-working
Sep 20, 2026
Merged

grindlemire merged 1 commit into
grindlemire:mainfrom
soulchainer:doc/update-09-ref-and-clicks-guide-outdated-complete-example-not-working

Conversation

@soulchainer

@soulchainer soulchainer commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Guide «complete example» of 09-refs-and-clicks was 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).

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

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.72%. Comparing base (64e001a) to head (be84b5c).
⚠️ Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the guide, example source, and generated behavior consistently synchronized.

Summary

This PR repairs and synchronizes the refs-and-clicks guide and example.

  • Restores lowercase r as the red-increase shortcut and assigns reset to x.
  • Adds the missing mouse binding for the Reset button in the guide’s complete example.
  • Nests the guide’s modal within the rendered root and aligns its names and presentation with the working example.
  • Refreshes generated Go artifacts to match their source and current generator patterns.

Reviews (1) · Last reviewed commit: "docs: keep guide & example of 09-refs-an..."

</div>

<div class="flex justify-center">
<span class="font-dim">r reset | g/b increase | G/B decrease | click buttons/presets | q quit</span>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


![Refs and Click Handling screenshot](/guides/09a.png)

Click "reset" to open the confirmation dialog and click on an option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Match the button text.

</div>
</div>
</div>
</modal>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modal was outside of the parent div, so everything inside the modal was not working: tab navigation, buttons not triggering their actions...

@soulchainer soulchainer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@soulchainer soulchainer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

<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>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these other changes are just to keep code the guide in sync with the example, working, code (which has minor changes).

@soulchainer soulchainer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@soulchainer

Copy link
Copy Markdown
Contributor Author

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.

@grindlemire

Copy link
Copy Markdown
Owner

Thanks! I'll take a look

@grindlemire grindlemire left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I'll merge it. Thanks!

@grindlemire
grindlemire merged commit 2f624c3 into grindlemire:main Sep 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants