Repository navigation
Dynamically calculate the space the warning bar will take, instead of hard-coding 100px - #26041
klaustopher wants to merge 1 commit into
Conversation
… hard-coding 100px
|
Warning This pull request does not link an OpenProject work package. Please add a link to the work package in the description, or reference it in the |
| <%= render partial: "warning_bar/unsupported_browser" if unsupported_browser? %> | ||
| <%= render partial: "warning_bar/missing_wp_edit_role_workflows" if render_workflow_missing_warning? %> | ||
| <div class="warning-bar--wrapper" data-controller="warning-bar"> | ||
| <% if show_warning_bar? %> |
There was a problem hiding this comment.
I am not a big fan of running a resizeObserver constantly even if the bar is not shown at all. Why did you move the div which registers the controller outside the check?
There was a problem hiding this comment.
Because show_warning_bar? will not be the only condition. In the PR it will render the sudo banner inside this as well. So the wrapper is always present, just without any content.
There was a problem hiding this comment.
A resize observer is not really "running" anything. It is invoked when a resize happens, not constantly running a loop and polling for changes.
Done in the process of #25984, we wanted to show the banner in the warning banner section at the bottom. I saw that we reserve 100px and on some screens this looks very odd. i.e.
This PR addresses this issue by determining the size of the bar and subtracting it from the main content.
AI involvement
Directed – I specified the requirements and AI implemented most of it; I validated via testing rather than a full line-by-line review.