Skip to content

Highlight sidebar nav links when in create form#2060

Closed
charliepark wants to merge 8 commits into
mainfrom
highlight_sidebar_links_in_create_forms
Closed

Highlight sidebar nav links when in create form#2060
charliepark wants to merge 8 commits into
mainfrom
highlight_sidebar_links_in_create_forms

Conversation

@charliepark

Copy link
Copy Markdown
Contributor

Fixes #2038

This PR updates how the Sidebar evaluates the nav links and how their to destination compares to the current URL.

With this change, a create form for a resource (e.g. /instances-new, /disks-new, etc.) will now show up highlighted, to conform to the parent resource page.
The Instances page and -new page:
Screenshot 2024-03-12 at 3 58 19 PM
Screenshot 2024-03-12 at 3 58 28 PM
And the Disks page and -new page:
Screenshot 2024-03-12 at 3 58 40 PM
Screenshot 2024-03-12 at 3 58 59 PM

When the form is contained in a SideModal (see /disks-new, above), the nav link is dimmed a bit.

@vercel

vercel Bot commented Mar 12, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Mar 13, 2024 11:03pm

Comment thread app/components/Sidebar.tsx Outdated
Comment thread app/util/links.ts Outdated
Comment thread app/components/Sidebar.tsx Outdated
david-crespo and others added 3 commits March 13, 2024 15:56
… cells (#2055)

get wild with prefetches for *NameFromId cells
* Add Type column to access table
* Remove AccessNameCell

---------

Co-authored-by: David Crespo <david-crespo@users.noreply.github.com>
@charliepark

Copy link
Copy Markdown
Contributor Author

Ah, crap. A rebase possibly messed this up. This should have been simplified down to just one or two file changes, total, so it might be easier for me to just do this in a new branch.

@charliepark charliepark deleted the highlight_sidebar_links_in_create_forms branch March 13, 2024 23:12
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.

Instances in sidebar not highlighted on instance create page

2 participants