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

Implement the "Rename Snapshot" feature #1556

Closed
8 of 9 tasks
entrotech opened this issue Dec 7, 2023 · 1 comment · Fixed by #1563 or #1564
Closed
8 of 9 tasks

Implement the "Rename Snapshot" feature #1556

entrotech opened this issue Dec 7, 2023 · 1 comment · Fixed by #1563 or #1564
Labels
enhancement Release Note: Shows as visual or user experience Enhancement level: medium p-feature: My Projects Page /projects priority: MUST HAVE role: back-end Node/Express Development Task role: database Database Development Task role: front-end Front End Developer size: 2pt Can be done in 7-12 hours

Comments

@entrotech
Copy link
Member

entrotech commented Dec 7, 2023

Overview

User should be able to rename an existing snapshot from the context menu on the My Projects Page.

Action Items

  • Create a Project_Rename stored procedure that is similar to the Project_Snapshot stored procedure, except that it does not update the dateSnapshotted column.
  • Create a web api endpoint for PUT to /api/projects/rename that will rename a project. The web api router should use the jwtSession.valdiateUser middleware to verify that the request is from a logged-in user, The request should have the same body as the /api/projects/snapshot endpoint.
  • Create a client-side service that makes the PUT request described above.
  • Modify the context menu to display the "Rename Snapshot menu item in the context menu as shown in the below screenshot when
    • The project is a snapshot (dateSnapshotted is not null)
    • The project is owned by the logged-in user
    • If the project is not a snapshot, the existing "Convert To Snapshot menu Item should be shown instead.
    • If the project is a snapshot, but not owned by the logged-in user, the menu item should be disabled (greyed-out and not responsive to click events.
    • Create a dialog as shown below that prompts the user to supply the new project name. When the user clicks "Rename", the dialog will close and the client service called to effect the snapshot re-naming. You should consult with the UI/UX design team for the exact wording on the dialog, but use the existing SnapshotModalDialog.js in the code for the implementation code that should be used, so we use our "standard" modal dialog design.

Resources/Instructions

image
image

@entrotech entrotech added enhancement Release Note: Shows as visual or user experience Enhancement role: front-end Front End Developer role: back-end Node/Express Development Task role: database Database Development Task level: medium priority: MUST HAVE p-feature: My Projects Page /projects size: 2pt Can be done in 7-12 hours labels Dec 7, 2023
@Jonathanko52
Copy link
Member

  1. New Modal created.
Screenshot 2024-01-03 at 3 51 55 PM
  1. Project Context Menu now:
    1. Shows the "convert to snapshot" option for non-snapshot projects.
    2. Shows the "rename snapshot" option for snapshot projects when user ID matches.
    3. Shows a disabled, greyed out "rename snapshot" option for snapshots projects where user ID does not match.
Screenshot 2024-01-03 at 2 43 15 PM
  1. Client-side PUT and web API endpoint setup.

Todo:

  1. Verification for whether the call comes from a logged-in user is still in progress.

  2. Project_Rename stored procedure not yet created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Release Note: Shows as visual or user experience Enhancement level: medium p-feature: My Projects Page /projects priority: MUST HAVE role: back-end Node/Express Development Task role: database Database Development Task role: front-end Front End Developer size: 2pt Can be done in 7-12 hours
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants