Skip to content

[WC-3630] Gallery: fix refresh interval having no effect - #2487

Open
yordan-st wants to merge 2 commits into
mainfrom
fix/WC-3630_gallery-refresh-interval
Open

yordan-st wants to merge 2 commits into
mainfrom
fix/WC-3630_gallery-refresh-interval

Conversation

@yordan-st

@yordan-st yordan-st commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

Gallery's "Refresh time (in seconds)" property has had no effect since the DI container migration (b5010ee). galleryConfig hard-coded refreshIntervalMs: 0, and the GY.refreshInterval token injected into DatasourceService was never bound.

  • Derives refreshIntervalMs from props.refreshInterval * 1000 and binds GY.refreshInterval in the query bindings, mirroring Datagrid 2.
  • Container-level regression tests with fake timers: the data source reloads at 5 s when the interval is 5, and never when it is 0. The tests fail without the fix.
  • No XML change, so no docs update is needed.

Found while implementing WC-3362.

What should be covered while testing?

  • Gallery with Refresh time = 5: change data in another tab, Gallery updates within ~5 s
  • Refresh time = 0: no automatic update
  • With Refresh indicator on and an interval above 1 s, the silent-refresh indicator shows during the background reload
  • No errors in the DevTools console

@yordan-st yordan-st changed the title [WC-3630]: Fix Gallery refresh interval having no effect [WC-3630] Gallery: fix refresh interval having no effect Oct 22, 2026
@yordan-st
yordan-st marked this pull request as ready for review October 22, 2026 09:09
@yordan-st
yordan-st requested a review from a team as a code owner October 22, 2026 09:09
@github-actions

This comment has been minimized.

@yordan-st
yordan-st force-pushed the fix/WC-3630_gallery-refresh-interval branch from e1a15bd to 44bffda Compare October 22, 2026 09:25
@github-actions

This comment has been minimized.

@yordan-st
yordan-st force-pushed the fix/WC-3630_gallery-refresh-interval branch from 44bffda to dce857b Compare October 22, 2026 09:50
@github-actions

This comment has been minimized.

The DI container migration hard-coded refreshIntervalMs to 0 and never bound
GY.refreshInterval, so the Refresh time property had no effect. Derive the interval
from props and bind the token, mirroring Datagrid. Adds container-level regression tests.

Ticket: WC-3630
@yordan-st
yordan-st force-pushed the fix/WC-3630_gallery-refresh-interval branch from dce857b to eb307a8 Compare October 23, 2026 10:58
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.

1 participant