Repository navigation
fix: show the sidebar section as a middle crumb in the admin top bar - #289
Merged
Merged
Conversation
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.
Summary
The top bar of the admin and identity layout showed only "Admin / ". A detail page, such as an OAuth app, had no link back to its list.
The top bar now adds the sidebar section of the page as a middle crumb: "Admin / OAuth apps / Quilt Staging". The section link uses the same match that highlights the sidebar, so it works on every admin and identity page.
The middle crumb is left out when it would repeat another crumb:
A form that fails validation re-renders at the list URL by POST. That page keeps the section crumb.
admin_nav_groupsis now built once per request. The sidebar, the command bar and the crumb all read it.Tests
spec/requests/admin_nav_spec.rb: three crumbs on an OAuth app page, no extra crumb on the list page, the crumb kept on a failed create, and no repeated crumb for a verifier.bundle exec rspec spec/requests: 1044 examples, 0 failures (before the second commit).admin_nav_specandview_conventions_specpass on the final commit.bin/rubocopon the changed Ruby files: no offenses.Screenshots
The images are on the
pr-screenshotsbranch.OAuth app detail
The top bar shows "Admin / OAuth apps / Quilt Staging".
OAuth apps list
The top bar shows "Admin / OAuth apps", with no repeated crumb.
Known issue, not from this branch: at 390px the copy button of the client ID on the detail page goes past the card edge.