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

add ability to change product UUID #288

Merged
merged 1 commit into from
May 31, 2024

Conversation

RyanCoulsonCA
Copy link
Member

@RyanCoulsonCA RyanCoulsonCA commented Apr 24, 2024

Related Item(s)

#253

Changes

  • Adds ability to change the name of existing Storylines products.

Notes

The old UUID does not automatically get deleted at the moment. We'll need something on the server side to clean this up.

Testing

Steps:

  1. Open the editor and load an existing product.
  2. Try to change the name of the product and save it. Ensure the config files are updated correctly and that everything still works.
  3. Try to change the name of the product to a UUID that already exists. Ensure that the warning pops up.

This change is Reviewable

Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/fix-253/#/en/editor

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

One bug I found was that both warning messages appeared when attempting to rename a product to a UUID to an existing UUID, assuming this is not intended?

image.png

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA)


src/components/editor/metadata-editor.vue line 918 at r1 (raw file):

    checkUuid(rename?: boolean): void {
        if (!this.loadExisting || rename) {
            fetch(`http://localhost:6040/retrieve/${rename ? this.changeUuid : this.uuid}`).then((res: Response) => {

Might need to be rebased to use the new ENV variables and default to localhost:6040.

@RyanCoulsonCA RyanCoulsonCA force-pushed the fix-253 branch 2 times, most recently from d0c6e80 to 4910258 Compare May 17, 2024 13:13
Copy link
Member Author

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

I think it may be good to keep both warnings up if the user is overwriting another UUID. The two warnings aren't related to each other, and I think it's probably good to inform the user that they'll be overwriting a different product if they proceed.

Open to counter points though!

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @yileifeng)


src/components/editor/metadata-editor.vue line 918 at r1 (raw file):

Previously, yileifeng (Yi Lei Feng) wrote…

Might need to be rebased to use the new ENV variables and default to localhost:6040.

Rebase is done!

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

In that case, is there a valid use case for using rename to overwrite a different product? Was under impression that this would be restricted and a warning will block users from renaming to existing products. If allowed, server version history code would be the most impacted for this case.

Also for the standard warning in above screenshot, aligning the symbol with the text would be a nice fix.

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA)

Copy link
Member Author

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Yeah, I think that's a good point. It's probably best that we don't allow overwriting using the rename feature. I've changed the logic to disable the button if the new UUID would overwrite an existing product. I've also shortened the rename warning message.

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @yileifeng)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member

@dnlnashed dnlnashed left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

@yileifeng yileifeng merged commit ae0afce into ramp4-pcar4:main May 31, 2024
3 checks passed
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.

3 participants