Skip to content

Conversation

@mstahv
Copy link
Member

@mstahv mstahv commented Feb 21, 2025

That appears to be obsolete as the filter is anyways sent to the @ClientCallable method when the filtering should actually be done. After this change there is a lot less XHRs/server-visits happening aka reduces "chattiness" (although there still is some that I don't really know what they are related to (opened changed and some "confirm" requests).

Opening as draft as somebody involved in the current implementation really should look into this (and couldn't run the tests locally).

See also #6863 and #7133

@sonarqubecloud
Copy link

@mstahv
Copy link
Member Author

mstahv commented Feb 21, 2025

One failed test. Which is kind of more a timing issue. In a mode when the popup is configured NOT to be automatically openend, the previous test triggered the filtering more eagerly. Don't know what would be the "correct" behaviour if #6863 gets fixex.

Could be fixed either by adding a wait/timeout to the IT or to keep syncing the filter also via event, but make that lazy. Or changing client side so taht by making open event also contain the filter or so that connector calls some method instead (like it does with regular filtering).

@yuriy-fix
Copy link
Contributor

Let's consider combining this PR with #7133 so that the context is available in one place. We should also proceed with adding tests.

@mstahv, would you be able to add tests, or would you like us to handle them? Also, please specify your compilation issues so we can help resolve them.

It might be potentially a small breaking change, since addPropertyChangeListener for filter will stop working after removing @Synchronize

@mstahv
Copy link
Member Author

mstahv commented Mar 4, 2025

I'd keep these separatly. This is more like a bugfix or performance improveiment and the other is technically "a feature", so it will probably be require a minor version (and now that 24.7 was just "closed", it will take a looong time).

Would be great if you can tackle the possible new tests. As I don't work with selenium daily, I don't have good ideas to how to automatically assert extra requests are made.

@CLAassistant
Copy link

CLAassistant commented Oct 28, 2025

CLA assistant check
All committers have signed the CLA.

That appears to be obsolete as the filter is anyways sent to the @ClientCallable method when the filtering
should actually be done.
@vursen vursen force-pushed the bugix/avoid-many-obsolete-xhrs branch from a125906 to a055bc0 Compare January 12, 2026 16:40
That appears to be obsolete as the filter is anyways sent to the @ClientCallable method when the filtering
should actually be done.
@vursen vursen force-pushed the bugix/avoid-many-obsolete-xhrs branch from a055bc0 to 29d5749 Compare January 12, 2026 16:52
Copy link
Contributor

@vursen vursen left a comment

Choose a reason for hiding this comment

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

There are failing integration tests with this change. Also, the actual filter logic seems to be more complex than what this PR assumes e.g. the filter value may need to be reset in certain scenarios, see ComboBoxDataController.

@mstahv
Copy link
Member Author

mstahv commented Jan 13, 2026

@vursen Are you going to work on this further?

@vursen
Copy link
Contributor

vursen commented Jan 13, 2026

Are you going to work on this further?

No, I'm tied up with other tasks right now.

Works locally, but maybe now debouncing causes issue in CI
…ow-components into bugix/avoid-many-obsolete-xhrs
@mstahv
Copy link
Member Author

mstahv commented Jan 13, 2026

Checked in the project now builds on my local workstataion and tests pass there. Pushed a blind wait that might happen now as the filtering is debounced. Let's see if that helps.

Please explain your concern about ComboBoxDataController. That looks very complex class indeed, but didn't easily see how this could affect that.

@sonarqubecloud
Copy link

@mstahv mstahv marked this pull request as ready for review January 13, 2026 13:16
@vursen
Copy link
Contributor

vursen commented Jan 13, 2026

Please explain your concern about ComboBoxDataController. That looks very complex class indeed, but didn't easily see how this could affect that.

For example, consider this scenario:

  1. comboBox.setItems(yourDataProvider)
  2. comboBox.getLazyDataView().getItems() returns all items (expected)
  3. Open, filter, then close the combo box
  4. comboBox.setItems(yourDataProvider)
  5. comboBox.getLazyDataView().getItems() returns filtered items because the filter wasn't cleared (regression)

It would help if ComboBoxDataController was the only place handling filters.

@mstahv
Copy link
Member Author

mstahv commented Jan 15, 2026

Do you have that available somewhere as regression test? I can't see any failing. Or the original thing that the developer/user is trying to do in that scenario? To me it sounds bit odd the filter is ever taken into account with the dataview (although I haven't really understood what is the purpose of the dataview in general either).

The fix is probably easy, but maybe there is some more fundamental isseu in the current implementation 🤷‍♂️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants