-
Notifications
You must be signed in to change notification settings - Fork 372
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
[ui-storagebrowser] adds change owner and group action #3973
Conversation
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.
Super nice!
@use 'variables' as vars; | ||
|
||
.antd.cuix { | ||
.change-owner-group { |
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.
nit: we prefix classes with hue-
const groupOptions = getDropdownOptions(groups); | ||
|
||
useEffect(() => { | ||
const isOtherUserSelected = !users.includes(files[0].user); |
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.
With files[0].user
you assume there is always at least on file in the array, is that guaranteed?
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.
Yes, the action will not be enabled until at-least one file is selected.
|
||
const { save, loading } = useSaveData(BULK_CHANGE_OWNER_API_URL, { | ||
postOptions: { | ||
qsEncodeData: false |
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.
is this true by default?
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.
yes, It is undefined
by default and const encodeData = options?.qsEncodeData == undefined || options?.qsEncodeData;
condition turns encodeData
value to true
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.
Nice work!
What changes were proposed in this pull request?
How was this patch tested?
Please review Hue Contributing Guide before opening a pull request.