-
Notifications
You must be signed in to change notification settings - Fork 86
fix: ensure full-height layout #813
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
fix: ensure full-height layout #813
Conversation
|
Thanks for the pull request, @wgu-jesse-stewart! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #813 +/- ##
=======================================
Coverage 86.79% 86.79%
=======================================
Files 48 48
Lines 1401 1401
Branches 297 294 -3
=======================================
Hits 1216 1216
Misses 172 172
Partials 13 13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR addresses the issue of a collapsing sidebar when the main content is short by adding a classname for easier styling of the browser router container.
- Adds the "browser-router" classname to the container div within the Router.
- Aims to ensure the sidebar remains fully visible with a full-height layout.
Comments suppressed due to low confidence (1)
src/react/AppProvider.jsx:102
- [nitpick] Consider adding an inline comment to clarify that the 'browser-router' class is added solely to support the full-height layout for the sidebar. This can aid future developers in understanding the rationale behind this styling hook.
<div className="browser-router" data-testid="browser-router">
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.
Not that I'm fundamentally opposed to having a generic class name such as this one, here, but I'm hesitant to introduce a layout feature to what is essentially a data div. Can the desired outcome not be achieved by styling #main-content or SidebarProviderComponent instead?
|
I think we probably just shouldn't have that extra Edit: tried removing the jest.mock('react-router-dom', () => ({
BrowserRouter: ({children}) => (
<div data-testid="browser-router">
{children}
</div>
),
})) |
|
I think this is great feedback - I will close this PR and deprecate that test id property in another PR |
Fixes openedx/frontend-app-learning#1695
Related PR: openedx/frontend-lib-special-exams#164, openedx/frontend-app-learning#1724
This PR simply adds a app-container div or easy styling of app wrapping component
Summary:
When content within a sequence is shorter than the height of the browser viewport, the .sequence-container > .outline-sidebar-wrapper element does not expand appropriately. This causes the course outline sidebar to be partially or completely hidden from view.
Steps to Reproduce:
Open a course sequence that contains very little content (e.g., a short paragraph or notice).
View the course in a tall browser window.
Observe that the sidebar navigation is cut off or hidden.
Expected Behavior:
The sidebar should remain fully visible and accessible, regardless of the amount of content in the main pane.
Actual Behavior:
When the content is short, the parent container height collapses to fit that content, which in turn restricts the sidebar’s height, hiding part of the navigation.
Screenshots:

Demo of fix:
https://github.com/user-attachments/assets/69ce8dae-e73b-487c-bc6a-862701b1ce8d
I think we should have a discussion about removing these wrapper divs entirely so that the layout can handle all the UI
Merge checklist:
frontend-platform. This can be done by runningnpm startand opening http://localhost:8080.module.config.jsfile infrontend-build.fix,feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.Post merge: