Skip to content

fix: reset loading indicator state after each request#23229

Merged
mshabarov merged 6 commits into
mainfrom
flow-loading-indicator-individual
Feb 11, 2026
Merged

fix: reset loading indicator state after each request#23229
mshabarov merged 6 commits into
mainfrom
flow-loading-indicator-individual

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented Jan 15, 2026

Changes the loading indicator to reset after each individual request completes, rather than staying visible across rapid successive requests. Previously, the timer would continue across multiple requests, causing the indicator to show even when each individual request was fast.

Now each request gets independent timing - if a request completes before the threshold (default 450ms), the indicator never appears. This fixes the issue with cursor tracking and other scenarios involving many rapid server calls.

Fixes #23223

Description

Please list all relevant dependencies in this section and provide summary of the change, motivation and context.

Fixes # (issue)

Type of change

  • Bugfix
  • Feature

Checklist

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

Changes the loading indicator to reset after each individual request
completes, rather than staying visible across rapid successive requests.
Previously, the timer would continue across multiple requests, causing
the indicator to show even when each individual request was fast.

Now each request gets independent timing - if a request completes before
the threshold (default 450ms), the indicator never appears. This fixes
the issue with cursor tracking and other scenarios involving many rapid
server calls.

Fixes #23223
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 15, 2026

Test Results

 1 355 files  ±0  1 355 suites  ±0   1h 16m 46s ⏱️ -55s
 9 598 tests +2  9 530 ✅ +2  68 💤 ±0  0 ❌ ±0 
10 070 runs  +6  9 994 ✅ +6  76 💤 ±0  0 ❌ ±0 

Results for commit f23fb7b. ± Comparison against base commit 37b5ccf.

♻️ This comment has been updated with latest results.

@Artur- Artur- marked this pull request as ready for review February 6, 2026 09:18
…estResponseTracker.java

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
@sonarqubecloud
Copy link
Copy Markdown

@mshabarov mshabarov merged commit a3d2d70 into main Feb 11, 2026
31 checks passed
@mshabarov mshabarov deleted the flow-loading-indicator-individual branch February 11, 2026 12:05
platosha added a commit that referenced this pull request May 11, 2026
Fixes #24075

This change reverts the eager removal of loading state introduced by #23229, as it causes the indication to disappear during ongoing loading. As a replacement, it re-introduces debouncing tracking of active requests, and adds event-based silencing of the loading indication to avoid flashing the indicator for high-frequency UI interactions.

In addition, instead of setting loading state using `ConnectionState.setState()` directly, the proper connection state methods (`loadingStarted()`, `loadingFinished()`) are used to avoid interference with loading state for requests from other sources outside Flow client.
platosha added a commit that referenced this pull request May 11, 2026
Fixes #24075

This change reverts the eager removal of loading state introduced by #23229, as it causes the indication to disappear during ongoing loading. As a replacement, it re-introduces debouncing tracking of active requests, and adds event-based silencing of the loading indication to avoid flashing the indicator for high-frequency UI interactions.

In addition, instead of setting loading state using `ConnectionState.setState()` directly, the proper connection state methods (`loadingStarted()`, `loadingFinished()`) are used to avoid interference with loading state for requests from other sources outside Flow client.
platosha added a commit that referenced this pull request May 12, 2026
Fixes #24075

This change reverts the eager removal of loading state introduced by #23229, as it causes the indication to disappear during ongoing loading. As a replacement, it re-introduces debouncing tracking of active requests, and adds event-based silencing of the loading indication to avoid flashing the indicator for high-frequency UI interactions.

In addition, instead of setting loading state using `ConnectionState.setState()` directly, the proper connection state methods (`loadingStarted()`, `loadingFinished()`) are used to avoid interference with loading state for requests from other sources outside Flow client.
vaadin-bot added a commit that referenced this pull request May 13, 2026
… (CP: 25.1) (#24335)

This PR cherry-picks changes from the original PR #24230 to branch 25.1.
---
#### Original PR description
> Fixes #24075
> 
> This change reverts the eager removal of loading state introduced by
#23229, as it causes the indication to disappear during ongoing loading.
As a replacement, it re-introduces debouncing tracking of active
requests, and adds event-based silencing of the loading indication to
avoid flashing the indicator for high-frequency UI interactions.
> 
> In addition, instead of setting loading state using
`ConnectionState.setState()` directly, the proper connection state
methods (`loadingStarted()`, `loadingFinished()`) are used to avoid
interference with loading state for requests from other sources outside
Flow client.
>

Co-authored-by: Anton Platonov <anton@vaadin.com>
Co-authored-by: Marco Collovati <marco@vaadin.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading indicator stays visible if you do many subsequent requests

3 participants