Skip to content

experiment: add LitElement based version of vaadin-grid - #6681

Merged
tomivirkki merged 8 commits into
mainfrom
experiment/lit-grid
Oct 23, 2023
Merged

tomivirkki merged 8 commits into
mainfrom
experiment/lit-grid

Conversation

@tomivirkki

@tomivirkki tomivirkki commented Oct 20, 2023 •

Copy link
Copy Markdown
Member

Description

Add LitElement based version of vaadin-grid.

To keep this PR as small as possible, root-level imports and TS types were excluded. Separate PRs will be created for them later.

Type of change

Experiment

@tomivirkki
tomivirkki marked this pull request as draft October 20, 2023 11:55
Comment on lines -184 to +192
this.__dragSelect = !this._grid._isSelected(dragStartRow._item);
this.__selectOnDrag = !this._grid._isSelected(dragStartRow._item);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Needed to rename the variable because LitElement generates one with the same name from the dragSelect property.

</vaadin-grid>
`);

await nextFrame();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The double await nextFrame()s look odd, but they are needed in these tests that check for the column freezing warnings. The first frame is to wait for the custom elements to be ready (LitElement needs this). The second one is for the debounced warning log.


describe('with renderer', () => {
beforeEach(() => {
beforeEach(async () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The LitElement-based checkbox is async so the selection tests use more await nextFrame(); than others

@tomivirkki
tomivirkki marked this pull request as ready for review October 20, 2023 13:05
@sonarqubecloud

Copy link
Copy Markdown

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.3.0.alpha1 and is also targeting the upcoming stable 24.3.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.

3 participants