feat: redesign constants into card grid#150
Open
voliva wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR redesigns the Constants page UI to display pallets/constants in an always-expanded card grid and adds the ability to choose which block/runtime context the constants come from (instead of implicitly using “latest”).
Changes:
- Add a block selector (
BlockPicker) and derive constants data fromselectedBlock$so the view reflects the chosen block. - Redesign pallet display into a responsive card grid with constants always visible (no per-pallet expand/collapse).
- Pass the selected runtime context into constant value rendering, removing the previous internal defaulting logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return ( | ||
| <div className="p-4 pb-0 flex flex-col gap-2 items-start leading-relaxed overflow-auto"> | ||
| <ul> | ||
| <div className="p-4 space-y-2 items-start overflow-auto @container"> |
Comment on lines
83
to
86
| onClick={async (evt) => { | ||
| evt.stopPropagation() | ||
| const ctx = await firstValueFrom(runtimeCtx$) | ||
| const { ctx } = await firstValueFrom(selectedBlock$) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Something we were missing was the ability to pick a block, instead of just the latest. And also the view was quite empty now that we've expanded horizontally.
Now all the constants are visible and expanded... so to chose a specific pallet you might have to scroll, but it also saves a few clicks (and you can Ctrl+F a specific constant)