-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Resign the policy tab #4232
Resign the policy tab #4232
Conversation
onClose={onCancelViewPolicy} | ||
onRemove={onRemovePolicy} | ||
onToggleActive={onToggleActive} | ||
privileges={privileges} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we had a prop called
"getPrivilegeDisplayName(type: string) => string"
onClose: () => void; | ||
onRemove: () => void; | ||
onToggleActive: (value: boolean) => void; | ||
privileges: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this type to Array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and committed
/> | ||
))} | ||
</Col> | ||
<Col flex={1} style={{ display: 'flex', justifyContent: 'end' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bring the "All Users" tag to the left at the end of the avatar row (same column)
/> | ||
))} | ||
</Col> | ||
<Col flex={1} style={{ display: 'flex', justifyContent: 'end' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use styled components any time there is inline styling overrides
<ActionButtonContainer> | ||
<Button | ||
disabled={!record?.editable} | ||
style={{ marginRight: 16 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to styled components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and committed
/> | ||
))} | ||
</Col> | ||
<Col flex={1} style={{ display: 'flex', justifyContent: 'end' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove inline styling
onClose={onCancelViewPolicy} | ||
onRemove={onRemovePolicy} | ||
onToggleActive={onToggleActive} | ||
privileges={privileges} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
privileges={getPrivileges(focusPolicy)}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And remove the state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and committed
@@ -139,10 +173,31 @@ export const PoliciesPage = () => { | |||
setShowPolicyBuilderModal(false); | |||
}; | |||
|
|||
const getPrivileges = (policy: Policy) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to "getPrivilegeNames"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and committed
|
||
const tableData = policies?.map((policy) => ({ | ||
urn: policy?.urn, | ||
policy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this here? Or can we remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and committed
<PoliciesHeaderContainer> | ||
<PoliciesTitle level={2}>Manage Policies</PoliciesTitle> | ||
<Typography.Paragraph type="secondary"> | ||
Manage access for users & groups of DataHub using Policies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Manage access for Users & Groups of DataHub using Policies."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and committed
"Redesign the Policies tab
Checklist