Skip to content

Added functionality for header and footer calculation with unit tests#269

Closed
James-Cocker wants to merge 2 commits intomainfrom
JamesC-iss2501-fix-scroll-for-test-runs-page
Closed

Added functionality for header and footer calculation with unit tests#269
James-Cocker wants to merge 2 commits intomainfrom
JamesC-iss2501-fix-scroll-for-test-runs-page

Conversation

@James-Cocker
Copy link
Contributor

Why?

Closes galasa-dev/projectmanagement#2501.

Sets the max-height for the content on the /test-runs page (including the side bar) to be 100vh-height_of_headers_and_footer so that they scroll independently of one another, without the observer causing strange flickering and scrolling.

Screenshot(s) of changes

Notice how the header and footer will always be on the screen.
image
image

Changes

  • Functionality
  • Unit tests (if applicable)

Signed-off-by: James Cocker <james.s.earth@gmail.com>
*/

.crumbContainer {
height: 84px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Manually set this height otherwise it seems to default to 64px for an odd reason.

Signed-off-by: James Cocker <james.s.earth@gmail.com>
eamansour
eamansour previously approved these changes Mar 9, 2026
Copy link
Member

@eamansour eamansour left a comment

Choose a reason for hiding this comment

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

A couple of minor comments but overall looks good, happy to approve!

Comment on lines +63 to +79
// Calculate and set the dynamic max-height based on header and footer heights
useEffect(() => {
const updateMaxHeight = () => {
const headerFooterHeight = getHeightOfHeaderAndFooter();
setMaxHeight(`calc(100vh - ${headerFooterHeight}px)`);
};

// Initial calculation
updateMaxHeight();

// Recalculate on window resize
window.addEventListener('resize', updateMaxHeight);

return () => {
window.removeEventListener('resize', updateMaxHeight);
};
}, []);
Copy link
Member

Choose a reason for hiding this comment

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

There's some code duplication now with the content of this useEffect and the useEffect in the CollapsibleSideBar component.

Is there a way to reduce this duplication?

@eamansour eamansour dismissed their stale review March 9, 2026 10:24

Just tried the changes out locally and have sent James a few more questions - seems like the header and footer can make the test runs table harder to see on smaller screens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI: Scrollability of main content in /test-runs independent to saved queries

2 participants