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 the CSV download feature to download projects selected on the My Projects page. #1672

Closed
5 tasks
entrotech opened this issue Apr 18, 2024 · 1 comment · Fixed by #1678
Closed
5 tasks
Assignees
Labels
enhancement Release Note: Shows as visual or user experience Enhancement epic level: medium milestone: missing p-feature: My Projects Page /projects priority: MUST HAVE role: front-end Front End Developer size: 2pt Can be done in 7-12 hours

Comments

@entrotech
Copy link
Member

Overview

Users need to be able to download a CSV file from the My Projects Page that includes projects based on any of three different criteria:

  • Projects that have been selected by checking the checkbox in the first column, OR
  • Projects that meet all the current filter criteria, OR
  • All Project that the user can view (regardless of the current filter criteria).

Action Items

  • Current implementation has a Download All to CSV button. As is, the CSV data for all projects is calculated when the page loads, and the button is only rendered when this calculation is complete. This implementation is driven by the react-csv library which requires that the CSV data be retrieved from the database and formatted before the button is rendered. Since the CSV button is rarely used, this means that the calculation is normally not used, so the calculation and load on the database and network is wasted. We need to re-implement the Download All Projects code such that the CSV data is fetched and formatted only if the user actually chooses to use the feature.
  • The Download Selected Projects to CSV is not yet implemented, but can essentially re-use the code for the Dowload All to CSV feature.
  • The Download Filtered Projects to CSV is also not et implemented, but can also re-use essentially the same code.
  • Find a CSV library that allows execution of the fetching and formatting only when the user chooses one of the CSV options. It's ok if this step takes a while (especially for a large number of projects), since the feature will be rarely used, and the user should expect to wait for it to be generated.
  • The UI design is specified in Issue Design Mockup: Admin view of my projects page #1641 showing a download icon in the Multi-Select Toolbar. Hovering over the download icon brings up a tooltip that allows users to be pick either Download All or Download Selected. It might be better if we pop up a dialog that allows the user to choose one of the three options from radio buttons, possibly an option to give the downloaded file a name and then shows a progress bar as the file is generated and eventually saved.

Resources/Instructions

@entrotech entrotech self-assigned this Apr 18, 2024
@entrotech entrotech added the enhancement Release Note: Shows as visual or user experience Enhancement label Apr 18, 2024
@github-actions github-actions bot added this to New Issue Approval in Product Management Apr 18, 2024
@Parisajf Parisajf moved this from New Issue Approval to In progress (actively working) in Product Management Apr 18, 2024
@Parisajf
Copy link
Member

Emily said in an email at 2024-04-22:

I compared the proposed/new columns to the calculator and it looks pretty good. The two things I noted are not related to the elimination of the "NA" columns:

  • I think "Bike Bonus" is missing from both the old and new output.
  • It would make sense to have a column for the text input of the User-Defined Strategy.

I'm also curious about the output for the test case. The strategies that use drop-down menus appear to have "Y" or "N" as the output. The strategies that use checkboxes appear to have "TRUE" or are blank as the output. I think having blank strategies is potentially confusing. Instead, every strategy field could use Y or N; that would be consistent across the board. Unless there's a reason that drop-down and checkbox strategies should appear different in the csv output? The one exception will be the User-Defined Strategy, which should show the user's input of a number of points, and narrative about the Strategy.

We can discuss next week if there are any questions.

Product Management automation moved this from In progress (actively working) to On Dev - not yet pushed to Prod Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Release Note: Shows as visual or user experience Enhancement epic level: medium milestone: missing p-feature: My Projects Page /projects priority: MUST HAVE role: front-end Front End Developer size: 2pt Can be done in 7-12 hours
Projects
Product Management
  
On Dev - not yet pushed to Prod
Development

Successfully merging a pull request may close this issue.

3 participants