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

feat(frontend): add UI components to allow user actions #3118

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

jorgeepc
Copy link
Contributor

@jorgeepc jorgeepc commented Sep 1, 2023

This PR adds the UI logic to enable edit/configure actions in the application.

Changes

  • enable edit and configure actions

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Loom

https://www.loom.com/share/7a807e4e4f8a49adaefcad2bf137d91e?sid=dee89a54-d94b-46f6-ae43-352123aa028f

@jorgeepc jorgeepc self-assigned this Sep 1, 2023
@jorgeepc jorgeepc marked this pull request as ready for review September 1, 2023 20:28
Copy link
Contributor

@xoscar xoscar left a comment

Choose a reason for hiding this comment

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

GJ!

@@ -11,7 +11,7 @@ const AllowButton = ({operation, ...props}: IProps) => {

return (
<Tooltip title={!isAllowed ? 'You are not allowed to perform this operation' : ''}>
<Button {...props} disabled={!isAllowed} />
<Button {...props} disabled={!isAllowed || props.disabled} />
Copy link
Contributor

Choose a reason for hiding this comment

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

aguer

@@ -62,6 +64,7 @@ const RunActionsMenu = ({resultId, testId, testSuiteId, testSuiteRunId, isRunVie
navigate(`/test/${testId}/run/${resultId}`);
}}
key="edit"
disabled={!getIsAllowed(Operation.Edit)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor but I think for this situations we could do canEdit at the top and reuse the flag for the rest

@jorgeepc jorgeepc merged commit 336563b into main Sep 4, 2023
@jorgeepc jorgeepc deleted the feat-add-allow-functionality branch September 4, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants