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

Project Details Page - Allow Edit and View Details #3286

Conversation

jeff-phillips-18
Copy link
Contributor

@jeff-phillips-18 jeff-phillips-18 commented Oct 1, 2024

Closes RHOAIENG-8571

Description

In the project details page, add a popover to show users the project's resource name and kind.
Also, add actions to allow a provisioned user to edit or delete the project.

How Has This Been Tested?

As a provisioned user, navigate to a project page.
Verify there is a popover indicator next to the project name.
Clicking the indicator shows a popover that shows the project's resource name and show Project for the resource type.
Click on the actions menu to the far right, verify both Edit project and Delete project actions are shown.
Verify that Edit project bring up the Edit project modal.
Verify that Delete project brings up the Delete project modal.

As a non-provisioning user, navigate to a project page.
Verify there is a popover indicator next to the project name.
Clicking the indicator shows a popover that shows the project's resource name and show Project for the resource type.
Verify there is no actions menu shown to the far right.

Test Impact

Added cypress e2e tests.

Mocks

Ref: Figma prototype

image

image

Screen shots

image

image

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

/cc @jgiardino

Copy link
Contributor

openshift-ci bot commented Oct 1, 2024

@jeff-phillips-18: GitHub didn't allow me to request PR reviews from the following users: jgiardino.

Note that only opendatahub-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Closes RHOAIENG-8571

Description

In the project details page, add a popover to show users the project's resource name and kind.
Also, add actions to allow a provisioned user to edit or delete the project.

How Has This Been Tested?

As a provisioned user, navigate to a project page.
Verify there is a popover indicator next to the project name.
Clicking the indicator shows a popover that shows the project's resource name and show Project for the resource type.
Click on the actions menu to the far right, verify both Edit project and Delete project actions are shown.
Verify that Edit project bring up the Edit project modal.
Verify that Delete project brings up the Delete project modal.

As a non-provisioning user, navigate to a project page.
Verify there is a popover indicator next to the project name.
Clicking the indicator shows a popover that shows the project's resource name and show Project for the resource type.
Verify there is no actions menu shown to the far right.

Test Impact

Added cypress e2e tests.

Mocks

image

image

Screen shots

image

image

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

/cc @jgiardino

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (228e221) to head (9842608).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...c/pages/projects/screens/detail/ProjectActions.tsx 90.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3286      +/-   ##
==========================================
- Coverage   84.87%   84.84%   -0.04%     
==========================================
  Files        1306     1308       +2     
  Lines       29196    29225      +29     
  Branches     7885     7893       +8     
==========================================
+ Hits        24780    24795      +15     
- Misses       4416     4430      +14     
Files with missing lines Coverage Δ
frontend/src/components/ResourceNameTooltip.tsx 100.00% <100.00%> (ø)
...c/pages/projects/screens/detail/ProjectDetails.tsx 96.66% <ø> (ø)
...c/pages/projects/screens/detail/ProjectActions.tsx 90.00% <90.00%> (ø)

... and 76 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 228e221...9842608. Read the comment docs.

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Updates look great @jeff-phillips-18 . Tested both self-provisioned and admin users, edit and view details working as expected. Left a comment below.

isOpen={open}
popperProps={{ position: 'right', appendTo: getDashboardMainContainer() }}
>
<DropdownList>
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the mocks, should there be a divider between these "Edit" and "Delete" dropdown items?

Choose a reason for hiding this comment

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

@jenny-s51 - We don't have design guidelines for action menus yet. When I look at other areas of the product, there are pages in the dashboard that consistently display a divider above Delete. But there are places where we have just Edit and Delete in a menu without a divider (Workbenches and Permissions list items in the Project details page).

The only guidelines I see on this topic within PF are under Menu > Red text menu:

A divider should be used to separate the destructive menu items from the non-destructive items.

We aren't using this variant on the Delete menu action (and maybe we should consider that when we draft guidelines), but the point about separating destructive menu items from the non-destructive menu items is the piece that I think is relevant here. I think this recommendation should apply regardless of how many menu items there are. So I am in favor of implementing the UI as designed in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jenny-s51 @jgiardino Looking around the UI, I see:

  • Connections (recently added) does not have the separator.
  • Data connections does not have the separator
  • Cluster storage does not have the separator
  • Permissions (both user and group) do not have the separator
  • Workbenches does not have the separator
  • Pipeline servers does have the separator
  • Pipeline versions does have the separator

I can add it here but it would be mostly inconsistent. I would suggest UX file an issue to make all of the menus consistent and we address all of them at once.

Choose a reason for hiding this comment

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

@jeff-phillips-18 @jenny-s51 @jgiardino I agree with Jeff. I’d prefer to create a separate issue once we have the menu guidelines ready to update the styling for all menus at once and ensure consistency. For now, I’d vote to drop the divider from the implementation of the Project Details action.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for your clarity here @jgiardino. Filing a separate ticket to make all of these menus consistent sounds like a good plan @jeff-phillips-18 @simrandhaliw.

Comment on lines 88 to 93
onClose={() => {
setDeleteOpen(false);
navigate('/projects');
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Only navigate to the projects page if the project was actually deleted.

@christianvogt christianvogt removed the lgtm label Oct 4, 2024
@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, jenny-s51

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Oct 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 3e5d40f into opendatahub-io:main Oct 4, 2024
8 checks passed
lokeshrangineni pushed a commit to TomerFi/odh-dashboard that referenced this pull request Oct 4, 2024
@jeff-phillips-18 jeff-phillips-18 deleted the project-details-edits branch October 4, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants