Skip to content

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Jul 16, 2025

Description

The PR deprecates the following internal APIs in Grid and TreeGrid as part of the HierarchicalDataCommunicator refactoring:

Deprecated in Vaadin 24.9 Vaadin 25
UpdateQueueData no replacement
UpdateQueue(UpdateQueueData data, int size) UpdateQueue(Element element, int size)
UpdateQueue#getData() no replacement
GridArrayUpdater#setUpdateQueueData(data) no replacement
GridArrayUpdater#getUpdateQueueData() no replacement
Grid(beanType, updateQueueBuilder, dataCommunicatorBuilder) Grid(beanType, dataCommunicatorBuilder)
Grid(beanType, updateQueueBuilder, dataCommunicatorBuilder, autoCreateColumns) Grid(beanType, dataCommunicatorBuilder, autoCreateColumns)
Grid(pageSize, updateQueueBuilder, dataCommunicatorBuilder) Grid(pageSize, dataCommunicatorBuilder)
Grid#createDefaultArrayUpdater(updateQueueFactory) Grid#createDefaultArrayUpdater()
TreeGridArrayUpdater GridArrayUpdater
TreeGrid(beanType, DataCommunicatorBuilder<T, TreeGridArrayUpdater> dataCommunicatorBuilder) TreeGrid(beanType, DataCommunicatorBuilder<T, GridArrayUpdater> dataCommunicatorBuilder)
TreeGrid(pageSize, DataCommunicatorBuilder<T, TreeGridArrayUpdater> dataCommunicatorBuilder) TreeGrid(pageSize, DataCommunicatorBuilder<T, GridArrayUpdater> dataCommunicatorBuilder)

Depends on

Fixes #7688

Why createDefaultArrayUpdater doesn't need updateQueueFactory:

The createDefaultArrayUpdater method used a updateQueueFactory to create either an UpdateQueue in Grid or a TreeGridUpdateQueue in TreeGrid, with the factory itself being constructed in the class constructor. However, this level of abstraction is unnecessary. Both Grid and TreeGrid can instantiate these directly within createDefaultArrayUpdater, which already has access to all required class fields. No factory or builder is needed there.

Type of change

  • Refactor

@vursen vursen force-pushed the deprecate-grid-apis branch from e4bd90d to 159d7d5 Compare July 16, 2025 11:49
@vursen vursen marked this pull request as ready for review July 16, 2025 12:23
@vursen vursen force-pushed the deprecate-grid-apis branch from d0aa553 to 10dcfcb Compare July 16, 2025 13:38
@vursen
Copy link
Contributor Author

vursen commented Jul 17, 2025

Popular add-ons that are confirmed to require updates in Vaadin 25:

Add-on Note
SelectionGrid SelectionTreeGrid is using deprecated HierarchyMapper
TreeGridPro 1. AbstractGridPro is using constructors with deprecated UpdateQueueData
2. TreeGridPro is based on deprecated HierarchicalUpdate and TreeGridArrayUpdater

@sissbruecker
Copy link
Contributor

@vursen Would it make sense to add this information to the PRD or some other related epic to keep this information centralized and discoverable?

@vursen
Copy link
Contributor Author

vursen commented Jul 17, 2025

@sissbruecker thanks, moved it to the PRD ticket: vaadin/platform#7843 (comment)

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.

Would it possible to introduce the alterantive constructors so that they are mentioned in the deprecation notes? That way, users can start moving to the new API before they are removed in V25.

Comment on lines 1636 to 1637
* @deprecated since 24.9. In Vaadin 25, this method will continue to exist
* without the {@code updateQueueBuild} parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should it be constructor instead of method?

Suggested change
* @deprecated since 24.9. In Vaadin 25, this method will continue to exist
* without the {@code updateQueueBuild} parameter.
* @deprecated since 24.9. In Vaadin 25, this constructor will continue to exist
* without the {@code updateQueueBuild} parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@vursen
Copy link
Contributor Author

vursen commented Jul 17, 2025

Would it possible to introduce the alterantive constructors so that they are mentioned in the deprecation notes? That way, users can start moving to the new API before they are removed in V25.

Thanks, it looks like this is possible but only for Grid constructors. I've updated the PR.

@vursen vursen force-pushed the deprecate-grid-apis branch from 12e3280 to 83e0506 Compare July 17, 2025 09:50
Comment on lines 1636 to 1637
* @deprecated since 24.9. In Vaadin 25, this constructor will continue to
* exist without the {@code updateQueueBuilder} parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention to the new constructor missing:

Suggested change
* @deprecated since 24.9. In Vaadin 25, this constructor will continue to
* exist without the {@code updateQueueBuilder} parameter.
* @deprecated since 24.9 and will be removed in Vaadin 25. Use
* {@link #Grid(Class, DataCommunicatorBuilder)}
*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@vursen vursen merged commit fd6fb9c into main Jul 18, 2025
4 of 5 checks passed
@vursen vursen deleted the deprecate-grid-apis branch July 18, 2025 08:09
vursen added a commit that referenced this pull request Jul 18, 2025
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate legacy TreeGrid APIs
4 participants