Skip to content
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

Close user profile menu after menu entry is selected #3224

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alisaismailati
Copy link
Contributor

References

Description

After logging in, when the user opens the profile menu and selects an entry (e.g., "MyDSpace"), the menu closes automatically upon clicking. The user is then redirected to the selected page seamlessly.

Instructions for Reviewers

An event emitter is introduced in UserMenuComponent. When a list item is clicked, the event is emitted by ds-base-user-menu, signaling the logged-in dropdown to close.

Include guidance for how to test or review your PR. Steps as mentioned in the description.

Checklist

  • My PR is created against the main branch 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 yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn 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.

@tdonohue tdonohue added bug accessibility 1 APPROVAL pull request only requires a single approval to merge claimed: 4Science 4Science team is working on this issue & will contribute back funded Task is funded via the DSpace Development Fund port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Jul 29, 2024
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alisaismailati : Thanks for this PR. We gave this a group code review today. Overall, the code looks reasonable, though @atarix83 mentioned that he's surprised there's not an easier way to get ngbDropdown to close properly after a click. Since you are both at 4Science though, I'll let you talk to determine if there's any other way to remove the EventEmitter from this PR.

Beyond that, this just needs a manual check that it's working for others. The code looks reasonable as-is.

@atarix83 atarix83 self-requested a review November 22, 2024 09:08
Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tdonohue

I've checked in deep and the changes look good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge accessibility bug claimed: 4Science 4Science team is working on this issue & will contribute back funded Task is funded via the DSpace Development Fund port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release
Projects
Status: 👍 Reviewer Approved
Development

Successfully merging this pull request may close these issues.

User profile menu remains open after menu entry is selected
3 participants