Skip to content

given height and scroll on search sidebar in mobile view#4505

Open
GauravD2t wants to merge 3 commits intoDSpace:mainfrom
GauravD2t:Search_sidebar_overflows
Open

given height and scroll on search sidebar in mobile view#4505
GauravD2t wants to merge 3 commits intoDSpace:mainfrom
GauravD2t:Search_sidebar_overflows

Conversation

@GauravD2t
Copy link
Contributor

@GauravD2t GauravD2t commented Jun 24, 2025

References

Description

given height and scroll on Search sidebar overflows over the footer in mobile mode on pages with only one result
@tdonohue

Instructions for Reviewers

Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers.

List of changes in this PR:

  • First, ...
  • Second, ...

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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 component: Discovery related to discovery search or browse system labels Jun 24, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Jun 24, 2025
@tdonohue tdonohue added this to the 10.0 milestone Jun 24, 2025
@tdonohue tdonohue added 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 port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Jun 24, 2025
@GauravD2t
Copy link
Contributor Author

image

Hello, @tdonohue

Yes, the issue still persists. I tested it again and was able to reproduce the problem described in this issue. The behavior is still the same on my side.

Please let me know if you need any additional information or steps to reproduce.

Thanks.

@tinsch
Copy link
Contributor

tinsch commented Mar 11, 2026

Dear @GauravD2t, sorry for my earlier error. I can confirm the bug still exists, but unfortunately your fix did not seem to solve the issue, as you can see in my screenshot from my test:

Screenshot 2026-03-11 at 11 43 31

@GauravD2t
Copy link
Contributor Author

Dear @tinsch
Thank you for rechecking and confirming that the bug still exists. I appreciate your feedback.

I have also tested the scenario on my side, and it appears to be working with the applied fix. For better clarification, I have attached a screenshot and a short video demonstrating the behavior after the fix.

Could you please review them and let me know if I might be missing any specific steps to reproduce the issue on your side? I’ll be happy to investigate further and adjust the fix if needed.

Thank you!

DSpace.mp4
image

@tinsch
Copy link
Contributor

tinsch commented Mar 12, 2026

@GauravD2t I tested it again, both in Firefox and Chrome mobile mode. Your fix does not help with the bug in both cases on my device. Setting the height: 100%; on the div.sidebar-content does seem to help, though. The footer will be shown during scrolling, but below the search tools. Maybe that could be a solution?

Just to add a small note: In my local test I don't have a filter list as long as your list. So that might be somehow related with me not being able to reproduce the fixed state on your branch. Maybe you could also test it with a shorter list of filters on your side.

The footer overflows the width of the screen, but that seems to be another bug unrelated to this issue here.

@GauravD2t
Copy link
Contributor Author

@GauravD2t I tested it again, both in Firefox and Chrome mobile mode. Your fix does not help with the bug in both cases on my device. Setting the height: 100%; on the div.sidebar-content does seem to help, though. The footer will be shown during scrolling, but below the search tools. Maybe that could be a solution?

Just to add a small note: In my local test I don't have a filter list as long as your list. So that might be somehow related with me not being able to reproduce the fixed state on your branch. Maybe you could also test it with a shorter list of filters on your side.

The footer overflows the width of the screen, but that seems to be another bug unrelated to this issue here.

Hi @tinsch , thanks for testing this again and for the detailed feedback.

In my tests, the issue seemed to be related to the height of the .sidebar-content container when the filter list becomes long. To address this, I added a fixed height and enabled scrolling:

@include media-breakpoint-down(md) { //mobile view css
position: relative;

&.row-offcanvas {
  position: relative;
}

&.row-offcanvas-right .sidebar-content {
  right: -100%;
}

&.row-offcanvas-left .sidebar-content {
  left: -100%;
}

.sidebar-content {
  position: absolute;
  top: 0;
  width: 100%;
  height: 1200px; //here is change 
  overflow: auto; //here is change 
}

}

This allowed the sidebar content to scroll correctly and the footer to remain accessible.

@tinsch
Copy link
Contributor

tinsch commented Mar 16, 2026

Yes @GauravD2t I saw the changed file in this PR. Nevertheless, your fix does not work on my side. Could you try out my fix

.sidebar-content {
      position: absolute;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
    }

and see if it has the same effect on your side?

@GauravD2t
Copy link
Contributor Author

GauravD2t commented Mar 16, 2026

Yes @GauravD2t I saw the changed file in this PR. Nevertheless, your fix does not work on my side. Could you try out my fix

.sidebar-content {
      position: absolute;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
    }

and see if it has the same effect on your side?

Hi @tinsch, thank you for the suggestion.

I tested the change you proposed and updated the sidebar styles to use:

.sidebar-content {
position: absolute;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
}

This avoids the fixed height approach and allows the sidebar to scroll properly when the filter list becomes long, while keeping the footer accessible.

I tested this locally in mobile view and it seems to behave correctly on my side. Could you please check again when you have a moment and confirm if it works better for you?
image
image

Thanks again for the helpful feedback.

@tinsch tinsch self-requested a review March 16, 2026 10:54
@tinsch
Copy link
Contributor

tinsch commented Mar 16, 2026

Yes, I already checked it and it works fine for me. I will approve it, thanks for your contribution!

@tinsch tinsch moved this from 🙋 Needs Reviewers Assigned to 👍 Reviewer Approved in DSpace 10.0 Release Mar 16, 2026
@tinsch
Copy link
Contributor

tinsch commented Mar 16, 2026

Dear @GauravD2t, for your next PR: Could you please fill in the PR template, and the checklist? This makes it easier for testers and reviewers to review your contribution. Thanks!

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 component: Discovery related to discovery search or browse system 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 port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release

Projects

Status: 👍 Reviewer Approved

Development

Successfully merging this pull request may close these issues.

Search sidebar overflows over the footer in mobile mode on pages with only one result

3 participants