Skip to content

Fix navbar wrapping on medium screens#3513

Merged
tdonohue merged 3 commits intoDSpace:mainfrom
4Science:task/main/DSC-1966
May 9, 2025
Merged

Fix navbar wrapping on medium screens#3513
tdonohue merged 3 commits intoDSpace:mainfrom
4Science:task/main/DSC-1966

Conversation

@AndreaBarbasso
Copy link
Copy Markdown
Contributor

References

Description

Removed a white-space: nowrap rule, added some flex-shrink and flex-grow classes, and removed a flex-wrap class so that the navbar is not wrapping anymore on two lines.

Instructions for Reviewers

As said on #3512, on medium-sized screens the navbar could wrap on another row if there were more than 3 items in it. This PR introduces some template and style changes to avoid this behavior.

List of changes in this PR:

  • Removed a white-space: nowrap; rule` that was wrapping the navbar onto another row;
  • Added rules so that the navbar items could break on multiple rows and avoid overflowing of the right-hand side action buttons.

To reproduce the issue you can simply duplicate a navbar item and resize the screen. With this PR there is no wrapping or overflowing of items.

image

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 npm run lint
  • My 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.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Oct 22, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2025

Hi @AndreaBarbasso,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

# Conflicts:
#	src/themes/dspace/app/header/header.component.html
#	src/themes/dspace/app/navbar/navbar.component.html
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2025

Hi @AndreaBarbasso,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

# Conflicts:
#	src/themes/dspace/app/header/header.component.html
@tdonohue tdonohue requested a review from artlowel May 8, 2025 14:52
@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 9.0 Release May 8, 2025
Copy link
Copy Markdown
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

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

Thanks @AndreaBarbasso!

@github-project-automation github-project-automation Bot moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 9.0 Release May 8, 2025
@tdonohue tdonohue added this to the 9.0 milestone May 9, 2025
@tdonohue tdonohue merged commit c1524c0 into DSpace:main May 9, 2025
15 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 9.0 Release May 9, 2025
@dspace-bot
Copy link
Copy Markdown
Contributor

Successfully created backport PR for dspace-8_x:

@tdonohue tdonohue added themes and removed port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels May 9, 2025
@kanasznagyzoltan
Copy link
Copy Markdown
Contributor

We have checked out the PR branch, when modifying the size with the devtools window, it works correctly.

DSpace.Repository.__.DSpace.-.Kozosseg.lista.-.Google.Chrome.2025-05-07.14-49-37_converted.mp4

But when I change to laptop view in the dev tools, and start changing the screen the navbar still wraps, I don’t know if this is a problem, but apart from this it works.

DSpace.Repository.__.DSpace.-.Kozosseg.lista.-.Google.Chrome.2025-05-07.14-04-54_converted.mp4

atarix83 pushed a commit to 4Science/dspace-angular that referenced this pull request Feb 20, 2026
Task/test/uon  repository/CST-22088

Approved-by: Daniele Ninfo
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 bug themes

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Navbar's search/language/login buttons might wrap on medium screens

6 participants