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 Dropdown for Download Format Selection (JSON/CSV) #392

Open
JordanChen123 opened this issue May 28, 2024 · 0 comments
Open

Implement Dropdown for Download Format Selection (JSON/CSV) #392

JordanChen123 opened this issue May 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request web Website team

Comments

@JordanChen123
Copy link
Contributor

Purpose

Enhance the download functionality by allowing users to choose the file format (JSON or CSV for now, but likely adding more later on) before downloading the sensor data. This will provide users with more flexibility and improve the overall usability of the data export feature.

Description

Currently, the download button triggers a download of sensor data in JSON format. We want to add a feature where the word "JSON" acts as a button. When clicked, it should show a dropdown menu with two options: JSON and CSV. The user should be able to select their preferred format. When the format is set to CSV, the download action should export the data in CSV format instead of JSON.
image

General Steps:

  1. Modify the Dataset component in https://github.com/UBCSailbot/sailbot_workspace/blob/main/src/website/views/components/Dataset/Dataset.tsx to include a button for the file format (defaulted to JSON).

  2. Implement a dropdown menu that appears when the format button is clicked, allowing the user to select either JSON or CSV.

  3. Update the customContents array to reflect the current state of the format selection.

  4. Update the download functions to handle both JSON and CSV formats.

  5. Ensure that the selected format is used when the user clicks the download button.

Resources

@JordanChen123 JordanChen123 added the enhancement New feature or request label May 28, 2024
@JordanChen123 JordanChen123 added the web Website team label May 29, 2024
@JordanChen123 JordanChen123 assigned fyang151 and unassigned dk1702 Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request web Website team
Projects
Status: Backlog
Development

No branches or pull requests

3 participants