-
Notifications
You must be signed in to change notification settings - Fork 438
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
Making user menu component themeable #2362
Making user menu component themeable #2362
Conversation
Does anyone has an idea, why the Build /tests (18.x) check fails? It seems to be the submission test in submission.cy.ts, but I can't see a problem with it. |
If it's an issue with one node version (18.x) and not the other (16.x) it's more than likely a random issue, where something happened to render slightly too slow for the test. I've restarted it. It should hopefully succeed the second time |
Ah, okay! Thank you. I already thought so. |
/** | ||
* The input flag to show user details in navbar expandable menu | ||
*/ | ||
@Input() inExpandableNavbar = false; |
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.
@Leano1998 thanks for this PR, just some minor feedback since #2075 @Input()
s should not have default values, because this way we can override the default values in the themed components in the themes
folder (more info in #2164). So could you please replace this line with @Input() inExpandableNavbar: boolean;
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.
@alexandrevryghem Thank you for your review!
I took your suggestion and removed the default value.
Hi @Leano1998, |
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.
👍 Thank you so much @Leano1998 ! Apologies for the very long delay in getting this reviewed, but we are making a push toward a 7.6.1 release and this will be included. I gave this a test with both the 'dspace' and 'custom' themes and it works as described. Code looks good too.
Backport failed for Please cherry-pick the changes locally. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-2362-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2362-to-dspace-7_x
git checkout -b backport-2362-to-dspace-7_x
ancref=$(git merge-base 7c0fdcbe67d96ad5779b7be467ac82d2b67f868a 7606f476884d60b94f8be1388a899f7712c24285)
git cherry-pick -x $ancref..7606f476884d60b94f8be1388a899f7712c24285 |
Manual port of this to |
No Problem, thank you for merging it. It wasn't a big change, but I hope it helps. |
Description
For our dspace-angular frontend, I needed a themed version of the user-menu-component, so I created it and thought it might be helpful to others as well. So this tiny feature allows you to use the user-menu-component in your own themes.
Instructions for Reviewers
The changes I made, are based on the general tips for creating a themed component in the DSpace-Wiki.
List of changes in this PR:
<ds-user-menu>
with<ds-themed-user-menu>
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.Since this is my first pull request in DSpace, I'm no sure, which information I should add. So, if it is not sufficient please tell me!