-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add dropdowns to navigation and access nav items via file #3679
Conversation
@click.prevent="open = ! open"> | ||
{{ item.title }} | ||
</a> | ||
<div x-cloak x-show="open" x-transition @click.outside="open = false" class="absolute block bg-white min-w-max shadow-lg z-1 mt-7 "> |
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.
I think we should add x-trap="open"
and perhaps also x-on:keydown.escape.window="open = false"
.
The first will trap focus inside the drop down and the other allow "esc" to close the dropdown.
}, | ||
], | ||
}, | ||
] |
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.
Could we here check if there is a setting that overrides the "categories" for submissions and project menu items?
Something like:
if settings.MENU_SUBMISSIONS_SUBITEMS:
nav_items[1]["categories"] = settings.MENU_SUBMISSIONS_SUBITEMS
Or are there better solutions? I want it to be easy for a developer to add/change/maintain the menu subitems.
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.
@frjo Now it can be easily managed via settings. We just have to pass a compact JSON in the env variable.
Like: APPLY_NAV_SUBMISSIONS_ITEMS='[{"title":"All Submissions","url":"apply:submissions:list","permission_method":"is_apply_staff_or_reviewer_required"},{"title":"Staff Assignments","url":"apply:submissions:staff_assignments","permission_method":"is_apply_staff"},{"title":"Reviews","url":"apply:submissions:reviewer_leaderboard","permission_method":"is_apply_staff"},{"title":"Results","url":"apply:submissions:result","permission_method":"is_apply_staff"}]'
47e9597
to
c1275a6
Compare
Works really well. Some minor issues I found.
|
@sandeepsajan0 the testers said that all looked good besides all good otherwise! |
…pective all pages
d22bd51
to
9668b93
Compare
@@ -7,7 +7,7 @@ | |||
right: 0; | |||
bottom: 0; | |||
left: 0; | |||
z-index: 20; | |||
z-index: 9; |
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.
@frjo I have fixed the nav dropdown stacking issue here but just not sure if it is messing with any other UI component.
@sandeepsajan0 Excellent work on fixing the z-index issue! |
@sandeepsajan0 Item 4 (focus outline) from #3679 (comment), did you not fix that at one point? I see it again now. Very minor issue that we can fix at a later stage as well. |
@sandeepsajan0 Added a commit that makes the new drop down menu active on front page as well. Looks ok? |
Yes, it looks good. It should be there. |
Fixes #3670 - Added a code setting file to define the nav item. - Use the dropdown to show nav item categories. - Add user role permissions to nav items and categories. - Make dropdowns accessible. Co-authored-by: Fredrik Jonsson <[email protected]>
Fixes #3670 - Added a code setting file to define the nav item. - Use the dropdown to show nav item categories. - Add user role permissions to nav items and categories. - Make dropdowns accessible. Co-authored-by: Fredrik Jonsson <[email protected]>
) Fixes HyphaApp#3670 - Added a code setting file to define the nav item. - Use the dropdown to show nav item categories. - Add user role permissions to nav items and categories. - Make dropdowns accessible. Co-authored-by: Fredrik Jonsson <[email protected]>
Fixes #3670