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
Move $().setupVerticalNavigation(...) logic to React #6463
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d794a15
Convert vertical-navbar levels expanding to React
fhlavac e8d5430
Update snapshot after converting expanding logic
fhlavac 78e3228
Replace navbar-header with empty partial
fhlavac 0511504
Add NavbarHeader component design implementation
fhlavac d74d567
Move navbar-header component to top-navbar dir
fhlavac fe5dc1e
Create menu-reducer for navbar collapsed state
fhlavac 1d89099
Fix content resizing when vertical-nav collapsed
fhlavac 003badf
Delete vertical navbar item pinning
fhlavac 852b0aa
Clean classNames using clsx
fhlavac d2a8832
Add tests for vertical-nav collapsing using Redux
fhlavac e84d60c
Shorten lines in vertical-nav tests
fhlavac ff6f654
Delete setupVerticalNavigation()
fhlavac 9650d2f
Remove styling for menu-item pinning
fhlavac bd734f0
Move hooks definitions to the top of the function
fhlavac 8dc77df
Update className for top-level-item
fhlavac 31b9bc4
Replace 'clsx' package usage with 'classnames'
fhlavac eefb30c
Verify content element existence before using it
fhlavac 7e28be0
Add object destructuring to navbar-header
fhlavac 830e454
Rename 'reducer' to 'menuReducer'
fhlavac 4afbcfb
Add 'navbar.' prefix to NavbarHeader
fhlavac 11c062d
Preserve collapsed state using Local Storage
fhlavac File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
It's a bit unfortunate we have to manipulate these classes manually, since this is a react component and the data is in state. Any way to use react here? :)
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.
Oh, never mind, that particular element is in
app/views/layouts/_content.html.haml
andapp/views/layouts/_center_div_*.html.haml
, and is still outside of the react navbar.So, this makes sense for now, no issues :)
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.
yeah you would have to have the whole layout as a react component. No way around it for now i am afraid