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

fix: do not recalculate flex basis for hidden rows #159

Merged
merged 12 commits into from
May 15, 2023

Conversation

ugur-vaadin
Copy link
Contributor

@ugur-vaadin ugur-vaadin commented May 12, 2023

Description

Currently, when a board is set invisible, flex basis is still recalculated on resize. This causes flickering when toggling visibility. This PR makes the row recalculate flex basis only when it is visible. Note that if any resizing occurs while the element is hidden, it should be explicitly updated with a redraw() call similar to the grid columns.

Fixes vaadin/flow-components#5005
See: Monorepo PR

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@CLAassistant
Copy link

CLAassistant commented May 12, 2023

CLA assistant check
All committers have signed the CLA.

@ugur-vaadin ugur-vaadin marked this pull request as ready for review May 12, 2023 12:46
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

Do I understand it correctly that in Vaadin 23+ this problem doesn't happen due to ResizeObserver usage? If so, we might still want to add relevant tests to the monorepo.

@ugur-vaadin
Copy link
Contributor Author

Do I understand it correctly that in Vaadin 23+ this problem doesn't happen due to ResizeObserver usage? If so, we might still want to add relevant tests to the monorepo.

The flickering is still there. So I also created a PR for the monorepo, targeting v24.0 and v23.3 as well.

@ugur-vaadin ugur-vaadin merged commit 780aac8 into master May 15, 2023
@ugur-vaadin ugur-vaadin deleted the 5005-fix-board-flickering-on-hidden-toggling branch May 15, 2023 21:00
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.

Vaadin Board layout changes under specific conditions when used in a Dialog
5 participants