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

NNS1-3450: New Exports NNS Neurons Snapshot Component #5813

Merged
merged 49 commits into from
Nov 26, 2024

Conversation

yhabib
Copy link
Contributor

@yhabib yhabib commented Nov 19, 2024

Motivation

Feature that allows users to export a snapshot of their Neurons state for the NNS.

We want to show Neurons that:

  • are not empty
  • have any amount, no matter how small

Requirements can be found here
Live version can be found here

Changes

  • New Component to generate and download a csv with a snapshot of the NNS neurons.

Tests

  • Unit test for the new component
  • Manually tested in devenv.

Todos

  • Add entry to changelog (if necessary).

Prev PR: #5840 | Next PR: #5854

@yhabib yhabib force-pushed the NNS1-3450/export-neurons-button branch from b0f3593 to 4ca0a4b Compare November 19, 2024 12:22
@yhabib yhabib force-pushed the NNS1-3450/export-neurons-button branch from 4ca0a4b to 5507458 Compare November 19, 2024 12:25
github-merge-queue bot pushed a commit that referenced this pull request Nov 21, 2024
# Motivation

NNS1-3450 will require functionality to download .csv files.

# Changes

- New utility function to download a string in csv format as a .csv
file.

# Tests

- Unit tests for the utility functions.
- I tested it manually by adding a dummy button to the UI. I called the
function with different inputs and checked that the downloaded file met
expectations.

# Todos

- [ ] Add entry to changelog (if necessary).
Not necessary

Prev PR: #5815 | Next PR: #5813
Base automatically changed from NNS1-3450/download-csv to main November 21, 2024 10:35
github-merge-queue bot pushed a commit that referenced this pull request Nov 21, 2024
# Motivation

The CSV table header is currently paired with the keys of the object
from the array being converted into a CSV. This requires either using
"translated" keys or generating a table with very technical names for
the header.

# Changes

- Extends `generateCsvFileToSave` and `convertToCsv` to expect a label
for the headers so they are decouple from the objects keys.

# Tests

- Added unit test

# Todos

- [ ] Add entry to changelog (if necessary).
Not necessary

Prev PR: #5834  | Next PR: #5813
@yhabib yhabib marked this pull request as ready for review November 22, 2024 09:51
@yhabib yhabib requested a review from a team as a code owner November 22, 2024 09:51
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of comments regarding the code. As for not using page objects for the new components, we might need a third opinion on that.

@yhabib yhabib changed the title NNS1-3450: Export Neurons Snapshot NNS1-3450: Exports NNS Neurons Snapshot Component Nov 25, 2024
@yhabib yhabib changed the title NNS1-3450: Exports NNS Neurons Snapshot Component NNS1-3450: New Exports NNS Neurons Snapshot Component Nov 25, 2024
@yhabib yhabib requested a review from mstrasinskis November 25, 2024 15:56
@yhabib yhabib marked this pull request as ready for review November 25, 2024 16:48
@yhabib yhabib requested a review from dskloetd November 26, 2024 07:30
@yhabib yhabib requested a review from dskloetd November 26, 2024 10:17
@yhabib yhabib requested a review from dskloetd November 26, 2024 10:58
@yhabib yhabib added this pull request to the merge queue Nov 26, 2024
Merged via the queue into main with commit 75603ca Nov 26, 2024
30 checks passed
@yhabib yhabib deleted the NNS1-3450/export-neurons-button branch November 26, 2024 11:24
github-merge-queue bot pushed a commit that referenced this pull request Nov 26, 2024
…enu (#5854)

# Motivation

Adds neuron data export functionality to improve user access to their
data, implemented behind a feature flag.

# Changes

- Adds the `ExportNeuronsButton` component to the `AccountMenu`. The
component is behind a flag.

# Tests

- Unit test for the component's visibility in the main menu based on the
feature flag.
- Manually tested in devenv.

# Todos

- [ ] Add entry to changelog (if necessary).

Prev PR: #5813
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.

3 participants