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 publishing UI bug #1442

Merged
merged 2 commits into from
Jan 23, 2023
Merged

Fix publishing UI bug #1442

merged 2 commits into from
Jan 23, 2023

Conversation

mvandenburgh
Copy link
Member

To replicate this bug, go to a publishable dandiset and click publish:

https://gui-staging.dandiarchive.org/dandiset/204686?page=6&sortOption=0&sortDir=-1&showDrafts=true&showEmpty=false&pos=41

https://gui-staging.dandiarchive.org/dandiset/204685?page=6&sortOption=0&sortDir=-1&showDrafts=true&showEmpty=false&pos=42

https://gui-staging.dandiarchive.org/dandiset/204677?page=6&sortOption=0&sortDir=-1&showDrafts=true&showEmpty=false&pos=45

https://gui-staging.dandiarchive.org/dandiset/204681?page=6&sortOption=0&sortDir=-1&showDrafts=true&showEmpty=false&pos=44

After clicking publish, the UI immediately starts bugging out and rerendering the DLP every few seconds. This is caused by some reactivity bug with the loading variable in the store. This particular variable is only used in a single component, so I refactored it to a local variable within that component, and now the publish UI behaves as expected.

This variable is only used in one component, DandisetLandingView, so
move it to a local `ref` in that component instead.
Copy link
Member

@jjnesbitt jjnesbitt left a comment

Choose a reason for hiding this comment

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

I can confirm the bug is fixed, although when you finally confirm the publish, the dialog box stays open, with a snackbar at the bottom that says "Dandiset published, go to published dandiset", taking you to the published dandiset. However, the old dialog still says up, allowing for someone to immediately hit publish again, resulting in error. This could be easily done if they simply don't see the bottom snackbar, as it's not extremely visible.

Is this intended behavior? If so, I'm happy to approve this as fixed and file a new issue to address that design, just wanted to make sure there's been no unintended behavior change.

@mvandenburgh
Copy link
Member Author

Good catch, no that wasn't intended - I only tested this change on dandisets I owned, so I never saw that admin dialog. I'll fix that here.

@mvandenburgh mvandenburgh added patch Increment the patch version when merged release Create a release when this pr is merged labels Jan 23, 2023
@mvandenburgh mvandenburgh merged commit 52153ef into master Jan 23, 2023
@mvandenburgh mvandenburgh deleted the fix-publishing-ui-bug branch January 23, 2023 19:45
@dandibot
Copy link
Member

🚀 PR was released in v0.3.11 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants