-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Top nav: iterate to build shortcut handling (#20969)
## Summary & Motivation Streamline rendering of shortcut wrappers for top nav items. Thus far we've just hardcoded the shortcut digit, but as our nav grows increasingly complex with gated features, Cloud differences, it gets harder to keep the digits in order. <img width="1212" alt="Screenshot 2024-04-02 at 12 24 42" src="https://github.com/dagster-io/dagster/assets/2823852/fd04d021-0c34-4e45-9572-14c4fdbb2cad"> <img width="1214" alt="Screenshot 2024-04-02 at 12 24 07" src="https://github.com/dagster-io/dagster/assets/2823852/79186b1d-fc02-4d37-a831-cd681762745c"> ## How I Tested These Changes View OSS and Cloud. Verify that the top nav items are in the correct order, with incremental shortcut digits correctly applied.
- Loading branch information
Showing
2 changed files
with
61 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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
4 changes: 1 addition & 3 deletions
4
js_modules/dagster-ui/packages/ui-core/src/app/AppTopNav/AppTopNavRightOfLogo.oss.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import {memo} from 'react'; | ||
import {useHistory} from 'react-router-dom'; | ||
|
||
import {AppTopNavLinks, navLinks} from './AppTopNavLinks'; | ||
|
||
export const AppTopNavRightOfLogo = memo(() => { | ||
const history = useHistory(); | ||
return <AppTopNavLinks links={navLinks(history)} />; | ||
return <AppTopNavLinks links={navLinks()} />; | ||
}); |
d03bc75
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.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-k68zk66w5-elementl.vercel.app
Built with commit d03bc75.
This pull request is being automatically deployed with vercel-action