-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ban overwriting of UUIDs on new product creation, modify "edit metadata" modal design #499
Conversation
Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/prevent-uuid-overwrite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found that if you enter a UUID that is currently in use and then quickly click "Next" before the "in use" warning pops up, you can still overwrite a product. Maybe we also need to disable the "Next" button while the check is in progress?
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gordlin)
bcf94ca
to
fedaeb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, Donethanks!
Also disabled the "Next" button when the UUID field is blank.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One more quick thing (should've included this in my original review, sorry): when renaming, we show this little spinner next to the "Rename" button while the UUID is being checked:
I'm thinking it would probably be beneficial to include this spinner next to the UUID input box while it's checking the UUID just so that the user knows that something is happening and isn't confused about why the "Next" button is disabled.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @gordlin)
fedaeb1
to
248733d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Donethanks! Also added a spinner to the "Next" button itself to indicate we're loading the editor (although it only seems to show up sometimes, and is frozen when it does appear).
In addition, made some minor modification to the edit metadata modal:
- Moved "Done" button to header
- Made header sticky
- Added bottom border to header for visual separation
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)
248733d
to
53c6979
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Managed to fix the "Next" button spinner "only showing up sometimes" by adding a slightly longer setTimeout
delay. It's still frozen (no spinning), though.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)
53c6979
to
0c2ccd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @gordlin and @RyanCoulsonCA)
a discussion (no related file):
I noticed that when you remove the UUID provided, the spinner will spin forever, and the Next button remains disabled forever. Entering a new UUID doesn't seem to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @IshavSohal and @RyanCoulsonCA)
a discussion (no related file):
Previously, IshavSohal (Ishav Sohal) wrote…
I noticed that when you remove the UUID provided, the spinner will spin forever, and the Next button remains disabled forever. Entering a new UUID doesn't seem to fix it.
Donethanks! Also added an error message when the UUID field on the Create New Storylines Product
page is left blank:
0c2ccd4
to
db4c8d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @IshavSohal)
28db7d9
to
a0bc6d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @IshavSohal, @mohsin-r, and @RyanCoulsonCA)
a discussion (no related file):
Rebased with main. No functional changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @IshavSohal, @mohsin-r, and @RyanCoulsonCA)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mohsin-r, @RyanCoulsonCA, and @yileifeng)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to metadata modal look great 👍
Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gordlin, @IshavSohal, @mohsin-r, and @yileifeng)
src/components/metadata-editor.vue
line 1767 at r5 (raw file):
// Needed in order to show the loading spinner at all // Although it shows, it's still frozen (since app's really just lagging until editor's in) setTimeout(() => {
This is good for now, but I think we should create an issue to look in to removing all of the setTimeout
calls we've added to the project for UI purposes recently. I could be totally wrong but I feel like there's got to be a better solution considering Vue is reactive? May just require a bit of investigation.
a0bc6d9
to
6de69fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @IshavSohal, @mohsin-r, @RyanCoulsonCA, and @yileifeng)
a discussion (no related file):
Rebased with main, resolved merge conflicts.
Some of the recent commits to main seem to have broken the existing UUID checking functionality. I think the problem involves the /check/:id
API endpoint, which isn't detecting existing UUIDs as existing (I used the 00000000-0000-0000-0000-000000000000
product), and so the UUID inputs weren't showing the "Product already exists" error. I've rolled back a few lines of checkUUID()
so it uses the previous /retrieve/:id/:lang
endpoint, and checking seems to work now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @gordlin, @IshavSohal, @mohsin-r, and @yileifeng)
a discussion (no related file):
Previously, gordlin (Gordon Lin) wrote…
Rebased with main, resolved merge conflicts.
Some of the recent commits to main seem to have broken the existing UUID checking functionality. I think the problem involves the
/check/:id
API endpoint, which isn't detecting existing UUIDs as existing (I used the00000000-0000-0000-0000-000000000000
product), and so the UUID inputs weren't showing the "Product already exists" error. I've rolled back a few lines ofcheckUUID()
so it uses the previous/retrieve/:id/:lang
endpoint, and checking seems to work now.
That's interesting... the /check/
endpoint seems to be working for me after pulling the latest changes. Is anyone else experiencing this?
6de69fd
to
f7f3517
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @IshavSohal, @mohsin-r, @RyanCoulsonCA, and @yileifeng)
a discussion (no related file):
Previously, RyanCoulsonCA (Ryan Coulson) wrote…
That's interesting... the
/check/
endpoint seems to be working for me after pulling the latest changes. Is anyone else experiencing this?
Surprisingly it does seem to work now, despite not working yesterday. I've changed it back.
If anyone notices any problems with the "UUID already exists" error not showing up in the rename or new product inputs, please let me know ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gordlin, @IshavSohal, @mohsin-r, @RyanCoulsonCA, and @yileifeng)
a discussion (no related file):
Previously, gordlin (Gordon Lin) wrote…
Surprisingly it does seem to work now, despite not working yesterday. I've changed it back.
If anyone notices any problems with the "UUID already exists" error not showing up in the rename or new product inputs, please let me know ASAP.
Worked great for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gordlin, @IshavSohal, @mohsin-r, @RyanCoulsonCA, and @szczz)
a discussion (no related file):
Previously, szczz (Matt Szczerba) wrote…
Worked great for me.
WOMM
src/components/metadata-editor.vue
line 1767 at r5 (raw file):
Previously, RyanCoulsonCA (Ryan Coulson) wrote…
This is good for now, but I think we should create an issue to look in to removing all of the
setTimeout
calls we've added to the project for UI purposes recently. I could be totally wrong but I feel like there's got to be a better solution considering Vue is reactive? May just require a bit of investigation.
f7f3517
to
7f91ccd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r8, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @IshavSohal, @mohsin-r, @RyanCoulsonCA, and @yileifeng)
Related Item(s)
Issue #445
Changes
This UUID already exists
warning on theCreate New Storylines Product
page into an error, and block the user from continuing until they choose another one.Testing
Steps:
Create New Storylines Product
page.00000000-0000-0000-0000-000000000000
). See the red error that pops up instead of the previous orange warning.Next
button is grayed out. The user must change the UUID to one that doesn't conflict with an existing product in order to continue.Next
button can be clicked.Edit Project Metadata
and play with the modified metadata modal.This change is