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

Minor header button improvements #2527

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Sep 26, 2023

References

Description

Minor header improvements for header icons spacing (by refactoring the code to use flex gap) & improved search navbar bar accessibility.

image

Instructions for Reviewers

List of changes in this PR:

  • Fixed a html issue: the ExpandableNavbarSectionComponent has a <ul> containing non-<li> elements (here)
  • Added flex gap to the navbar button container
  • Removed the individual paddings on all the buttons
  • Improved the search navbar by preventing it to focus on the input when it's not expanded (Deque issue ID: 468472)
  • Themed the LangSwitchComponent for testing purposes in order to check that when the language button is hidden that there is no double padding being applied & that it works for themed components as well

Include guidance for how to test or review your PR:

  • Test this by just looking at the header icons in both mobile & desktop mode
  • Test it with the dspace theme & the base theme (done by commenting out the dspace theme in src/config/default-app-config.ts)

Checklist

  • 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.
  • 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 the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Sep 27, 2023
alanorth added a commit to alanorth/dspace-angular that referenced this pull request Sep 28, 2023
Chase accessibility changes to header and navbar in dspace-angular.

See: DSpace#2527
@alanorth
Copy link
Contributor

Thanks @alexandrevryghem. Tested by applying to my local DSpace 7.6 development environment and updating my own custom theme (based on the dspace theme) to use the new classes and styles. The buttons in the navbar look and behave exactly as before, but in effect have slightly more padding:

diff-fs8

If we merge this we need to make sure people know that they will most likely need to update their custom themes.

@alexandrevryghem alexandrevryghem force-pushed the add-display-none-to-hidden-navbar-buttons_contribute-7.6 branch from fb85529 to e52fad2 Compare September 29, 2023 20:44
@alexandrevryghem
Copy link
Member Author

Isn't that always recommended when upgrading your angular version (an alternative is to not just copy the original css file but to extend it instead, this way minor updates like this will always be included). I did however recalculate the pixels today and found out that the search icon in the search bar is also not correctly vertically aligned (see picture I added a background color to make it more visible) so I updated that and I also increased the gap width to match the previous spacing a little bit more.

@alanorth
Copy link
Contributor

alanorth commented Sep 30, 2023

(an alternative is to not just copy the original css file but to extend it instead, this way minor updates like this will always be included).

Yeah that's a good idea: instead of copying the SCSS with the component to a theme, importing it instead and overriding the only styles you need. Less duplicated code that goes out of date...

Anyways, I'm +1 on this by testing now. There are tiny differences in the spacing of the buttons, but the functionality is the same. If this addresses the Deque accessibility feedback then I'm in support of merging it.

alanorth added a commit to alanorth/dspace-angular that referenced this pull request Oct 1, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
@alexandrevryghem alexandrevryghem marked this pull request as draft October 2, 2023 00:25
@alexandrevryghem alexandrevryghem force-pushed the add-display-none-to-hidden-navbar-buttons_contribute-7.6 branch from e52fad2 to 2ace942 Compare October 2, 2023 08:19
@alexandrevryghem alexandrevryghem marked this pull request as ready for review October 2, 2023 08:19
@tdonohue
Copy link
Member

tdonohue commented Oct 2, 2023

@alexandrevryghem : It appears that e2e tests are failing on this PR because it introduces a new accessibility bug. Here's the details provided by our Axe accessibility scanner (which runs in many e2e tests)

1 accessibility violation was detected
[
  {
    id: 'list',
    impact: 'serious',
    description: 'Ensures that lists are structured correctly',
    helpUrl: 'https://dequeuniversity.com/rules/axe/4.7/list?application=axeAPI',
    nodes: 1,
    html: [
      '<ul _ngcontent-dspace-angular-c185="" class="navbar-nav me-auto mb-2 mb-lg-0 h-100 ng-tns-c185-4">'
    ]
  }
]

@alexandrevryghem alexandrevryghem force-pushed the add-display-none-to-hidden-navbar-buttons_contribute-7.6 branch from 2ace942 to fa56d5d Compare October 2, 2023 19:31
@alexandrevryghem
Copy link
Member Author

@tdonohue I indeed forgot to check if the dspace theme still behaved correctly, I fixed the issue so hopefully the CICD should pass now

@tdonohue tdonohue self-requested a review October 5, 2023 14:46
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.

👍 Thanks @alexandrevryghem ! Finally got to testing/reviewing this and it all looks good. I can verify that it resolves several accessibility issues in the header buttons and works well.

@tdonohue tdonohue added this to the 8.0 milestone Oct 23, 2023
@tdonohue tdonohue merged commit 7c0fdcb into DSpace:main Oct 23, 2023
10 checks passed
@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-7_x:

@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Oct 23, 2023
alanorth added a commit to ilri/dspace-angular that referenced this pull request Oct 23, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Oct 24, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Oct 26, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 4, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 10, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 15, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 16, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 23, 2023
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Jan 12, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Jan 23, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Jan 26, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 4, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 6, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 7, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 20, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 25, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Feb 25, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Mar 7, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request May 27, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Aug 27, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Sep 30, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Oct 9, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Oct 13, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 14, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
4science-it pushed a commit to 4Science/dspace-angular that referenced this pull request Nov 14, 2024
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 18, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 19, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Nov 22, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
alanorth added a commit to ilri/dspace-angular that referenced this pull request Dec 20, 2024
Chase changes to heaver and navbar in DSpace Angular.

See: DSpace#2527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants