Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Correctly reset file details after bulk publish #1316

Merged

Conversation

GuySartorelli
Copy link
Member

Fixes an error from https://github.com/silverstripe/silverstripe-asset-admin/actions/runs/3726649898/jobs/6320236803

An element matching css ".font-icon-rocket[name='action_publish']" appears on this page, but it should not. (Behat\Mink\Exception\ExpectationException)

When bulk publishing or bulk unpublishing files, the file details screen wasn't being updated.
This is because react-router now slightly defers its navigation events. If two navigation events occur immediately after one another, the pending navigation is effectively cancelled. So we need to defer the second navigation until the first has finished.

Ultimately it would be better to just re-render the details screen whenever details change,taking advantage of react's state system, but that would require an extensive refactor and partial rewrite of the gallery that I'm just not prepared to do right now.

Parent issue

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

LGTM

@maxime-rainville maxime-rainville merged commit c49737d into silverstripe:2 Jan 11, 2023
@maxime-rainville maxime-rainville deleted the pulls/2/fix-behat branch January 11, 2023 04:42
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.

2 participants