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: Use incremental numeric id as a key for Tree Grid items #3046

Merged
merged 8 commits into from
May 4, 2022

Conversation

mshabarov
Copy link
Contributor

Description

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/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.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.
@TatuLund TatuLund mentioned this pull request Apr 22, 2022
2 tasks
@CLAassistant
Copy link

CLAassistant commented Apr 28, 2022

CLA assistant check
All committers have signed the CLA.

@sissbruecker sissbruecker merged commit 8fe0861 into master May 4, 2022
@sissbruecker sissbruecker deleted the fix/treegrid-key-provider branch May 4, 2022 10:01
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2022

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 3695 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot
Copy link
Collaborator

Hi @mshabarov and @sissbruecker, when i performed cherry-pick to this commit to 23.0, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 8fe0861
error: could not apply 8fe0861... fix: Use incremental numeric id as a key for Tree Grid items (#3046)
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 @mshabarov and @sissbruecker, when i performed cherry-pick to this commit to 22.0, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 8fe0861
error: could not apply 8fe0861... fix: Use incremental numeric id as a key for Tree Grid items (#3046)
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 @mshabarov and @sissbruecker, when i performed cherry-pick to this commit to 14.8, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 8fe0861
error: could not apply 8fe0861... fix: Use incremental numeric id as a key for Tree Grid items (#3046)
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".

sissbruecker pushed a commit that referenced this pull request May 4, 2022
* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)
sissbruecker pushed a commit that referenced this pull request May 4, 2022
* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)
sissbruecker pushed a commit that referenced this pull request May 4, 2022
* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)
sissbruecker added a commit that referenced this pull request May 4, 2022
…3124)

* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
sissbruecker added a commit that referenced this pull request May 4, 2022
…3125)

* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
sissbruecker added a commit that referenced this pull request May 4, 2022
…3126)

* fix: Use incremental numeric id as a key for Tree Grid items

Using Object::toString as an item's key for server-client communication makes item's data visible on the client side, so generated numeric id is used instead.

* Use serializable map

* Use index and depth as an item ID

* fix data provider getId implementation

* use custom unique key provider in tests

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

(cherry picked from commit 8fe0861)

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
@vaadin-bot
Copy link
Collaborator

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

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.

6 participants