Skip to content
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

EZP-30269: [Content Tree] Collapse all button jumps a little bit when scrolling #888

Conversation

tischsoic
Copy link
Contributor

@tischsoic tischsoic commented Mar 8, 2019

Question Answer
Tickets https://jira.ez.no/browse/EZP-30269
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

I was inspired by: https://css-tricks.com/styling-based-on-scroll-position/

Previously we were afraid of poor performance because of frequent updates of DOM element and use of getBoundingClientRect. Current solution should be performant.

Before

ndupy70uqx

After

8rim84byo5

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@tischsoic tischsoic self-assigned this Mar 8, 2019
@tischsoic tischsoic requested a review from dew326 March 8, 2019 09:00
@micszo micszo self-assigned this Mar 8, 2019
Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

This change solves the issue completely only on Chrome.
We agreed to create separate ticket for Firefox (and others).

@lserwatka
Copy link
Member

While working on something you must provide support for all supported browsers. It is waste of time time fixing it for Chrome only and traveling back in time to fix it in Firefox, Edge, etc.

@micszo micszo removed their assignment Mar 8, 2019
@tischsoic
Copy link
Contributor Author

This does not solved problem in 100% in Firefox but it is significant improvement and only minor flickering is sometimes visible (at least on my computer).

@micszo
Copy link
Member

micszo commented Mar 8, 2019

On Firefox when tree is collapsed it's not so bad but when it's expanded it's not only flickering but also jumping.
Please see recording.

ezp-30269-ff-480p

@tischsoic
Copy link
Contributor Author

OK, so on my Firefox it looks way better:

497pdmetga

I guess it is connected with performance of the machine and browser capabilities. We may leave this PR for now and think about better solution. Or maybe merge this as code improvement but not as PR fixing bug?

@tischsoic tischsoic force-pushed the EZP-20269-Collapse-all-button-jumps-a-little-bit-when-scrolling branch from 706b057 to 7158f0a Compare March 29, 2019 13:12
Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

No new issues after rebase 🙂

@lserwatka lserwatka merged commit 384d682 into master Mar 29, 2019
@lserwatka lserwatka deleted the EZP-20269-Collapse-all-button-jumps-a-little-bit-when-scrolling branch March 29, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants