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

Task/wg 243 manage project #313

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

sophia-massie
Copy link
Contributor

@sophia-massie sophia-massie commented Jan 31, 2025

Overview:

Adds Manage Panel functionality to map

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

  • Adds useUpdateProjectInfo hook as a put request to change name and description of map
  • Creates tabs for each of the menus within manage panel
  • Creates success notification when project is updated or deleted
  • Creates delete button from Manage -> Map tab using DeleteProjectModal component
  • Redirects to homepage with success message when map is deleted
  • Save location tab now links to designsafe

Testing Steps:

  1. Create a map of your own
  2. Navigate through the tabs on Manage panel on the map page.
  3. Try editing, deleting and making public/private.
  4. On staging env, go to the Members tab on the maps below to see differences between paginated tables and smaller lists of members

UI Photos:

Map Tab

Edit

Screenshot 2025-02-04 at 5 55 15 PM

Invalid Edit

Screenshot 2025-02-04 at 5 56 13 PM

Success

Screenshot 2025-02-04 at 5 56 36 PM

Delete returns to home with notification

Screenshot 2025-02-04 at 5 57 24 PM

Members Tab

If map is not associated with a DesignSafe project

Screenshot 2025-02-04 at 6 00 25 PM

Has many members

Screenshot 2025-02-04 at 6 05 10 PM

Public Tab

Is Private

Screenshot 2025-02-04 at 6 07 46 PM

Is Public

Screenshot 2025-02-04 at 6 07 00 PM

Save Tab

Screenshot 2025-02-07 at 5 17 49 PM

Notes:

The Taggit link does not work locally.

  • Create Members, Public, Save tabs
  • Create test
  • Link Taggit from Map tab

nathanfranklin and others added 8 commits January 27, 2025 16:13
Map Tab complete. Other tabs WIP
updates hook, manages hook state on the main panel
- adjusts paginator to fit in panel
- removes debug statement in members tab
- Removes reset so that notifications on map don't bounce on state reset
@sophia-massie
Copy link
Contributor Author

Need clarification of when members should appear. I created a map not related to a DS project and the useProjectUsers hook still brought back users. I tried filtering first to make sure that project.ds_project existed before getting the useProjectUsers data. Using this filter, however, caused all maps, even if they were related to a DS project, to return no users.

@sophia-massie
Copy link
Contributor Author

Open to suggestions on factoring out the success state passed from the delete modal to the homepage after redirect.

@nathanfranklin
Copy link
Collaborator

nathanfranklin commented Feb 5, 2025

Need clarification of when members should appear. I created a map not related to a DS project and the useProjectUsers hook still brought back users. I tried filtering first to make sure that project.ds_project existed before getting the useProjectUsers data. Using this filter, however, caused all maps, even if they were related to a DS project, to return no users.

looks like useProjectUsers is missing the project-id in its key. so that bug in main is probably causing the issue https://github.com/TACC-Cloud/hazmapper/blob/main/react/src/hooks/projects/useProjectUsers.ts#L16

@sophia-massie sophia-massie requested a review from taoteg February 5, 2025 16:14
sophia-massie and others added 5 commits February 5, 2025 11:35
conditional excluding the manage panel sneak back in
map is not associated with DS project
- Adds option to user hook to only get if map is associated with
DS project
@sophia-massie
Copy link
Contributor Author

Need clarification of when members should appear. I created a map not related to a DS project and the useProjectUsers hook still brought back users. I tried filtering first to make sure that project.ds_project existed before getting the useProjectUsers data. Using this filter, however, caused all maps, even if they were related to a DS project, to return no users.

looks like useProjectUsers is missing the project-id in its key. so that bug in main is probably causing the issue https://github.com/TACC-Cloud/hazmapper/blob/main/react/src/hooks/projects/useProjectUsers.ts#L16

Updated the hook. Should be working as expected now. Thanks for the help

Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

Excellent! 💯 Just left some comments to consider.

- Adds links to DesignSafe modeled after angular in the save tab of manage panel
Copy link
Contributor Author

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

Added links to DesignSafe in the Save tab like prod. Addressed requested changes. Ready for another review 👍

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