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

Implement Hide/Unhide Project Feature #1435

Closed
8 of 9 tasks
entrotech opened this issue Aug 25, 2023 · 2 comments · Fixed by #1486, #1513 or #1527
Closed
8 of 9 tasks

Implement Hide/Unhide Project Feature #1435

entrotech opened this issue Aug 25, 2023 · 2 comments · Fixed by #1486, #1513 or #1527
Labels
Dependency Issues that cannot be worked on until another issue is closed enhancement Release Note: Shows as visual or user experience Enhancement level: medium p-feature: My Projects Page /projects priority: MUST HAVE role: back-end Node/Express Development Task role: database Database Development Task role: front-end Front End Developer size: 2pt Can be done in 7-12 hours
Milestone

Comments

@entrotech
Copy link
Member

entrotech commented Aug 25, 2023

Dependency

Overview

We want users to be able to "hide" (and "unhide") projects that they own. This allows users to filter out projects that are no longer relevant - perhaps because they are obsolete prior versions of projects, or perhaps "what if" calculations that they do not want cluttering their My Project page. Filtering requirements for the My Project page are TBD, but should, by default not list the hidden project, but have the option to include them on the grid, in case the user wants to unhide them.

Action Items

  • Create a database migration script that adds a dateHidden column to the Project table in the database. This column will be null for visible (i.e. not hidden projects, and have the UTC datetime that the project was hidden for hidden projects. there is no need to record which user hid or unhide the project, since it is the same as the createdBy user.
  • Create a stored procedure called Project_Hide with parameters [id] int, hide bool and loginId int. The array of ids identifies the projects to update. the hide parameter indicates whether to hide (true) or unhide (false) the project, and the loginId must match the loginId column of each or the update should fail and return an error code indicating that the operation is unauthorized.
  • Create a Web API endpoint with the path /api/projects/hide and body object. The request body should contain properties ids (an array of integers) and hide boolean. (The loginId parameter for the user should be extracted from the JSON Web token, to avoid tampering.) Add the appropriate methods to the project.controller.js, project.routes.js, project.service.js methods to implement the endpoint and call the stored procedure. This ensures that the request is coming from a logged in user and reliably determines the loginId of the user.
  • At this time, it's not determined how many different places in the UI that the hide feature may be called. Start by implementing the feature from the "More..." menu that appears on individual lines of the My Project page design. If the project is hidden, the menu choice should be to unhide, if the project is visible (unhidden), the menu choice should be "Hide from View" as shown in this snapshot from a preliminary wireframe for the My Projects Page:

image

(This screenshot shows the TEMPORARY implementation of the My Projects Page, which includes icons to indicate if a project is hidden, trashed or snapshotted, since we need a visual indication of the project statuses until we can implement the desired filtering for the My Projects page.)

  • You will need to create the client-side service to call the Web API endpoint
  • You will need to "wire-up" the service to be called from teh context menu mentioned above. This might be via the useProjects Hook, or by directly calling the service method from the ProjectsPage.js component.
  • We anticipate that it might also be desirable for users to be able to hide/unhide multiple projects at once (hence the above convention to pass an array of (project) ids to the web api endpoint. To do this the selected projects must all have the same hidden vs visible status, so the same operation will be performed on all selected projects. This is NOT part of this issue
  • It may also be desirable to show somewhere on the Project Wizard if a project is hidden or visible and maybe to provide a button to hide/unhide from the wizard. This part is NOT part of this issue

Resources/Instructions

@entrotech entrotech changed the title Requirements for Hide/Unhide Calculation Feature Implement Hide/Unhide ProjectFeature Aug 25, 2023
@entrotech entrotech added enhancement Release Note: Shows as visual or user experience Enhancement role: front-end Front End Developer role: back-end Node/Express Development Task role: database Database Development Task level: medium priority: MUST HAVE p-feature: My Projects Page /projects size: 2pt Can be done in 7-12 hours labels Aug 25, 2023
@entrotech entrotech changed the title Implement Hide/Unhide ProjectFeature Implement Hide/Unhide Project Feature Aug 25, 2023
@Biuwa Biuwa added this to the 10 - Launch milestone Aug 30, 2023
@Biuwa Biuwa added the Dependency Issues that cannot be worked on until another issue is closed label Aug 30, 2023
@joelfuelling joelfuelling self-assigned this Sep 13, 2023
@Biuwa
Copy link
Member

Biuwa commented Oct 12, 2023

@joelfuelling

Please provide update

Progress: "What is the current status of your project? What have you completed and what is left to do?"
Blockers: "Difficulties or errors encountered."
Availability: "How much time will you have this week to work on this issue?"
ETA: "When do you expect this issue to be completed?"
Pictures (if necessary): "Add any pictures that will help illustrate what you are working on.

@joelfuelling
Copy link
Member

joelfuelling commented Oct 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependency Issues that cannot be worked on until another issue is closed enhancement Release Note: Shows as visual or user experience Enhancement level: medium p-feature: My Projects Page /projects priority: MUST HAVE role: back-end Node/Express Development Task role: database Database Development Task role: front-end Front End Developer size: 2pt Can be done in 7-12 hours
Projects
Status: Released
3 participants