-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltips for top-level variables #2776
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Apply Sweep Rules to your PR?
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2776 +/- ##
==========================================
+ Coverage 69.73% 69.88% +0.14%
==========================================
Files 120 120
Lines 6791 6775 -16
Branches 1448 1444 -4
==========================================
- Hits 4736 4735 -1
+ Misses 2047 2032 -15
Partials 8 8 ☔ View full report in Codecov by Sentry. |
TODO (copy-pasted from Discord):
|
* main: (158 commits) Fixed some bugs that I'm surprised were ever there Merged with main Deleted unused file Minor refactors to SimpleValue Hot fix for method scale remove import assertion Added back scale default constants Added changeset ScaleShift -> Method Added back defaults to SqScale First pass on refactoring Scale convert textmate-grammar to a public package; highlight squiggle code in markdown Some simple JSON tests Moved JSON methods to Danger Cleaning up SimpleValue MarkdownViewer uses shiki instead of react-syntax-highlighter Fixed map issue Restructure to fix most tests Moving SimpleValue code Finishing touches to Tag.doc ...
Quick flag that it would be neat if this could work for imported variables. Like when someone types,
... you can hover over |
This still doesn't capture the fact that items named the same would get shown the last value, which seems pretty bad. I'd wait until we can fix that. That said, I also think this should wait for my PR about dots in the gutter. That might also help with choosing which are the last value. |
Ok, I added an extra check that the value's location matches the variable name: 2c5b2e1 So the tooltip just won't show on names that are shadowed later. It would be preferable to show the temporary value, but that's hard. Showing a special tooltip (see
|
return ( | ||
<TooltipBox view={view}> | ||
<div className="px-4 py-1"> | ||
{/* Force a standalone ephermeral ViewerProvider, so that we won't sync up collapsed state with the top-level viewer */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*ephemeral
This PR also includes:
normal
in"normal string"
, etc.)()
)if = 5
is valid Squiggle but wasn't highlighed correctly by Lezer)