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

1520 multi project menu hide button #1569

Closed
wants to merge 9 commits into from

Conversation

agutiernc
Copy link
Member

Fixes #1520

What changes did you make?

  • Added checkboxes to project rows and a select all checkbox
  • Added menu for checkbox actions
  • Implemented hide button for selected projects

Why did you make the changes (we will use this info to test)?

  • Checkboxes needed for each project to allow for menu actions
  • Hide button sets a project's status
  • Select all checkbox allows for current page's selection

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied

before-checks

Visuals after changes are applied

after-checks

Copy link
Member

@ZekeAranyLucas ZekeAranyLucas left a 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);
Copy link
Member

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?

Copy link
Member

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([]);
Copy link
Member

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
Copy link
Member

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) ||
Copy link
Member

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}
Copy link
Member

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.

@agutiernc
Copy link
Member Author

I have to close this pull request due to merge conflicts with the latest changes in the codebase. A new pull request (#1630) has been submitted with the corrected code, addressing the conflicts. Please review the updated changes in the new pull request (#1630). Thank you!

@agutiernc agutiernc closed this Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On My Projects Page, Implement UI for operations on Multiple Projects
2 participants