Skip to content

refactor: make combo-box use DataProviderController - #7044

Merged
vursen merged 5 commits into
mainfrom
refactor/combo-box/data-provider-controller
Jun 14, 2024
Merged

vursen merged 5 commits into
mainfrom
refactor/combo-box/data-provider-controller

Conversation

@vursen

@vursen vursen commented Dec 29, 2023 •

Copy link
Copy Markdown
Contributor

@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from 3fbad4a to b3e1d14 Compare December 29, 2023 08:28
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from e96006a to 223e39f Compare December 29, 2023 10:30
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from 5e2e3bf to ab03e1e Compare January 12, 2024 06:45
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from ab03e1e to 34ecc64 Compare February 23, 2024 07:21
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch 6 times, most recently from 1418504 to f08d006 Compare March 23, 2024 09:49
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from 73cc8c8 to 9957d9c Compare April 19, 2024 08:03
@vursen vursen mentioned this pull request Apr 19, 2024
1 task done
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch 4 times, most recently from bd70e58 to 065f12b Compare April 19, 2024 18:50
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch 3 times, most recently from 630a74a to d8a450b Compare May 3, 2024 19:18
@vursen vursen mentioned this pull request May 17, 2024
1 task done
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from 33d13ba to 8963067 Compare May 17, 2024 11:45
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch 2 times, most recently from fcbea2c to 9e4b5e2 Compare May 17, 2024 12:56
@vursen vursen changed the title [WIP] refactor: make combo-box use DataProviderController refactor: make combo-box use DataProviderController May 17, 2024
@vursen
vursen marked this pull request as ready for review May 17, 2024 16:12
throw new Error('`pageSize` value must be an integer > 0');
}

this.__dataProviderController.setPageSize(pageSize);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: looks like all the tests pass with clearCache() line below being removed.
But this also happens on main so not related to this PR, can be ignored.

@vursen vursen Jun 3, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, but yeah, I think we could improve this separately. To be safe, I tested it manually and it works in both WC and Flow.

@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch 4 times, most recently from add3e15 to a022592 Compare May 24, 2024 14:42
vursen added 4 commits May 31, 2024 16:53
wip

wip

remove hasData API from DataProviderController

get rid of page-received

fix JSDoc

add isPlaceholder for backward compatibility

reduce diff

fix tests

remove unnecessary this binding

revert some changes, add more tests

wip

wip

update data provider controller tests

minimize diff

revert incorrect change after rebase

minimize diff

remove extra checks

improve JSDoc

fix corner case, add test

enhance JSDoc

fix tests

reassign cache items to trigger filteredItems observer

add code comments

fix

wip

revert check for size from setPage

fix failing tests

remove unnecessary check

revert unnecessary changes

use logical assignment operator

make data provider controller properties and listeners private
@vursen
vursen force-pushed the refactor/combo-box/data-provider-controller branch from d6318fc to b4c7985 Compare May 31, 2024 13:54

@vursen vursen Jun 3, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: The new logic in DataProviderController lacks individual test coverage. I plan to add such tests in a separate iteration after this PR is merged.

@vursen vursen Jul 12, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in #7546

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vursen
vursen merged commit ef3d165 into main Jun 14, 2024
@vursen
vursen deleted the refactor/combo-box/data-provider-controller branch June 14, 2024 10:00
@vaadin-bot

Copy link
Copy Markdown
Collaborator

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

5 participants