Skip to content

James c iss2557 remove scroll logic for test runs#270

Open
James-Cocker wants to merge 3 commits intomainfrom
JamesC-iss2557-remove-scroll-logic-for-test-runs
Open

James c iss2557 remove scroll logic for test runs#270
James-Cocker wants to merge 3 commits intomainfrom
JamesC-iss2557-remove-scroll-logic-for-test-runs

Conversation

@James-Cocker
Copy link
Contributor

Why?

Refer to galasa-dev/projectmanagement#2557.

Removed height restrictions on elements on the /test-runs page as we can assume users will not have excessive saved queries, and the previous implementation was causing odd scrolling issues.

Changes

  • Functionality
  • Unit tests (if applicable)

…e last few saved queries

Signed-off-by: James Cocker <james.s.earth@gmail.com>
Signed-off-by: James Cocker <james.s.earth@gmail.com>
Signed-off-by: James Cocker <james.s.earth@gmail.com>
Comment on lines +72 to +74
// Recalculate on window resize
window.addEventListener('resize', calculateMenuDirection);
window.addEventListener('scroll', calculateMenuDirection);
Copy link
Member

Choose a reason for hiding this comment

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

If we add event listeners for each query item, could this impact the page's performance when someone has a lot of saved queries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did give it a go and it seemed okay, and it has a massive advantage over hard coding in the last 3 elements as that will depend on screen size and lots of other bits. Do you have another idea? 😁

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps you could look into using the IntersectionObserver or ResizeObserver APIs?

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.

2 participants