-
Notifications
You must be signed in to change notification settings - Fork 29
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
Bulk unassign data policy for application #894
Bulk unassign data policy for application #894
Conversation
Bulk_un_assign8.mp4 |
7930267
to
7c28d3d
Compare
514a80e
to
15ced70
Compare
15ced70
to
7af0f3c
Compare
title={title} | ||
variant={variant} | ||
isInline | ||
className="odf-alert" |
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.
Where is this style defined? Please import the relevant files or add the declaration to a new one.
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.
added
); | ||
}; | ||
|
||
export const ListViewMessages: React.FC<ListViewMessagesType> = ({ |
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.
export const ListViewMessages: React.FC<ListViewMessagesType> = ({ | |
export const ListViewMessages: React.FC<ListViewMessagesProps> = ({ |
const { t } = useCustomTranslation(); | ||
const { message, modalActionContext } = state; | ||
return ( | ||
<React.Fragment> |
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.
<React.Fragment> | |
<> |
t={t} | ||
> | ||
<Button variant={ButtonVariant.link} onClick={OnConfirm}> | ||
{t('Confirm unassign')}{' '} |
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.
{t('Confirm unassign')}{' '} | |
{t('Confirm unassign')} |
<React.Fragment> | ||
{(modalActionContext === ModalActionContext.UN_ASSIGNING_POLICIES && ( | ||
<AlertMessage | ||
title={message?.title} |
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.
When can message
be undefined?
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.
at the very beginning in the redux state, I am assigning a message as an empty object {}, also when the model action context is changed the message will be assigned, at least title wont be empty, description can be empty.
([ | ||
ModalActionContext.UN_ASSIGN_POLICIES_SUCCEEDED, | ||
ModalActionContext.UN_ASSIGN_POLICIES_FAILED, | ||
].includes(modalActionContext) && ( |
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.
([ | |
ModalActionContext.UN_ASSIGN_POLICIES_SUCCEEDED, | |
ModalActionContext.UN_ASSIGN_POLICIES_FAILED, | |
].includes(modalActionContext) && ( | |
(hasAssignFailedOrSuceeded(modalActionContext) && ( |
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.
the reason I kept it like this, the list will keep growing in upcoming PRs.
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.
but we can initialise this list outside the FC or create a helper function (with switch case) which will just return true/false based upon checks ??
const AlertMessage: React.FC<AlertMessageType> = (props) => { | ||
const { title, variant, children, t } = props; |
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.
nits: (since I have seen these types of comments on other PRs)
const AlertMessage: React.FC<AlertMessageType> = (props) => { | |
const { title, variant, children, t } = props; | |
const AlertMessage: React.FC<AlertMessageType> = ({ title, variant, children }) => { |
title: string; | ||
variant: AlertVariant; | ||
children?: React.ReactNode; | ||
t: TFunction; |
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.
no need to pass t
function as a prop...
searchText={searchText} | ||
isActionDisabled={!state.policies.length} | ||
onSearchChange={onSearchChange} | ||
setModalActionContext={setModalActionContext} | ||
setMessage={setMessage} | ||
t={t} |
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.
no need to pass t
as a prop...
d84be53
to
9a4e5cf
Compare
Signed-off-by: Gowtham Shanmugasundaram <[email protected]>
9a4e5cf
to
8f0b011
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GowthamShanmugam, SanjalKatiyar 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 |
a3160af
into
red-hat-storage:master
On top of: #892