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: update grid header and footer on column tree update #6648

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Oct 16, 2023

Description

Run header and footer renderers after grid column tree update. This ensures that header/footer content updates for a hidden column are applied when the column becomes visible again.

Fixes vaadin/flow-components#5516

Type of change

Bugfix

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

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

LGTM

nit: I wonder if a test that only changes the content of the header, but without changing the renderer function could be added, since that's what happens in the FC.

@tomivirkki
Copy link
Member Author

nit: I wonder if a test that only changes the content of the header, but without changing the renderer function could be added, since that's what happens in the FC.

If I understood correctly, in FC's case, the headerRenderer always gets replaced in the connector even on a simple content change.

@DiegoCardoso
Copy link
Contributor

If I understood correctly, in FC's case, the headerRenderer always gets replaced in the connector even on a simple content change.

You are correct. I checked from the function that this single time renderer calls, but assumed that the renderer itself didn't change between calls. Checking it more closely I see that the whole renderer is replaced when a new header content is defined on the server side. I read "single time renderer" as is "single used by a column".

@tomivirkki tomivirkki merged commit c60f2ae into main Oct 17, 2023
@tomivirkki tomivirkki deleted the fix/grid/header-footer-renderer-hidden-column branch October 17, 2023 06:11
@vaadin-bot
Copy link
Collaborator

Hi @tomivirkki and @tomivirkki, when i performed cherry-pick to this commit to 24.1, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick c60f2ae
error: could not apply c60f2ae... fix: update grid header and footer on column tree change (#6648)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

Hi @tomivirkki and @tomivirkki, when i performed cherry-pick to this commit to 23.3, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick c60f2ae
error: could not apply c60f2ae... fix: update grid header and footer on column tree change (#6648)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.3.0.alpha1 and is also targeting the upcoming stable 24.3.0 version.

@SonReimer
Copy link

SonReimer commented Oct 30, 2023

I which version will this be backported to 23.3.x ?

@tomivirkki
Copy link
Member Author

I which version will this be backported to 23.3.x ?

Released with Vaadin 23.3.27

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