-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
1520 multi project menu hide button #1569
Conversation
… for missing ProjectCheckBoxmenu
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.
Let's review this change as a team tomorrow.
for (let projectId of checkedProjects) { | ||
const checkedProj = (await projectService.getById(projectId)).data; | ||
|
||
setSelectedProject(checkedProj); |
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 happens by setting the selection inside the loop?
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.
maybe the better solution is to remove the selectedProject property, and instead just have selectedProjects to subsume both that and checkedProjects.
await projectService.hide([checkedProj.id], !checkedProj.dateHidden); | ||
} | ||
|
||
setCheckedProjects([]); |
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.
Should the selection cleared after hide? is it possible to unhide afterward? e.g. if the filter is set to both visible and hidden? Would this be true for other actions, too?
<div>{checkedProjects.length} Projects Selected</div> | ||
<ul className={classes.list}> | ||
<li> | ||
<button |
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.
are the visuals right here? the button some how feels strange and disconnected. consider double checking with design and having them poke at it. also might need tooltip to match the description from the menu...
<button | ||
onClick={handleHideBoxes} | ||
disabled={ | ||
(criteria.visibility === "all" && isHidden === null) || |
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.
There was something else weird here.
when I did a select all, and the hide button was visible but disabled. it took me a while to figure out that only the owner could hide, and not all of the items were by the owner. maybe this is only awkward because I am logged in as an admin.
I wonder if this is more of an admin feature or a normal user?
@@ -542,6 +637,8 @@ const ProjectsPage = ({ account, contentContainerRef }) => { | |||
handleRenameSnapshotModalOpen | |||
} | |||
handleHide={handleHide} | |||
handleCheckboxChange={handleCheckboxChange} | |||
checkedProjects={checkedProjects} |
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.
better to just pass isChecked specific to this row.
Fixes #1520
What changes did you make?
Why did you make the changes (we will use this info to test)?
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
Visuals after changes are applied