Open
Conversation
added 5 commits
March 7, 2025 18:07
tdonohue
reviewed
Jul 3, 2025
| return menuKeySelector<string[]>(id, menuSectionIndexStateSelector); | ||
| }; | ||
|
|
||
| export const PINNED_MENU_COOKIE = 'dsMenuCollapsedState'; |
Member
There was a problem hiding this comment.
@gingyx : Just quick feedback on this. Any new cookies need to be added to the "Cookie Settings" (in UI footer) via Orejime. We also need to offer users the ability to disable any cookies which are not required. (Obviously if they disable the cookie though, then this feature will not be available.)
Author
There was a problem hiding this comment.
Thanks for the feedback! I just pushed the requested changes.
|
Hi @gingyx, |
c5abfad to
ca3bbe5
Compare
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.
References
Fixes #3193
Description
This PR persists the expanded/collapsed state of all menus through a designated cookie.
Instructions for Reviewers
List of changes in this PR:
MenuServicewith a new typePinnedMenuCookieand related constants to manipulate the cookie named 'dsMenuCollapsedState'.MenuServicewithisCollapsed,toggleMenuCollapsedStateandsyncMenuCollapsedStateto manipulate the pinned menu cookie.configureMenuCollapsedStatetoInitServicethat initializes the correct menu states. Updated classes that extendInitServiceto call that method in init().MenuEffectsthat makes suretoggleMenuCollapsedStategets called for every toggle menu action.HostWindowServiceto assume desktop width during SSR, to better initialize menus that have their cookie state set to expanded.How to test or review the PR:
Checklist
My PR is created against the
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
My PR passes ESLint validation using
npm run lintMy PR doesn't introduce circular dependencies (verified via
npm run check-circ-deps)My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
My PR aligns with Accessibility guidelines if it makes changes to the user interface.
My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
If my PR includes new libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
If my PR fixes an issue ticket, I've linked them together.