-
Notifications
You must be signed in to change notification settings - Fork 3
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
BL-823_fe_i_want_export_raw-data #25
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really enjoyed the UX for the download button, the progress bar feature makes the site more appealing to me. The code looks clean and easy to read. Good use of reusability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greetings from the CoderHeroes team! I was excited to see this being implemented because we have a component that could use a download to csv feature. Curious if you considered installing react-csv instead of the library you used? ALSO - great job on the progress bar feature. Looks great! If you fix the linting errors (looks like missing semicolons), this should be good to go.
Hi @lisamdespain : I'll be more than glad you can reuse this work ! Reviewing the react-csv will work better for cases when you want to download a .csv in memory already but prior data transformations are needed. So, the 'react-csv' library will work beautifully handling data transformations from array / object / json / string to csv. In addition,it also include typesecript for linter validation, and all react component scafolding to import it as a full react component. Thanks for your review ! |
reopening PR ! Closed by mistake ! |
7ec0b8f
…s upon navigating with office heatmap in view on All
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components look good , like your use of Redux . Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greetings from CoderHeroes! I was happy to see this implemented, as we had something similar over on CH that needs to be implemented, except we were planning on using react-csv. I like how you did this one, especially the progress bar. Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Really extensive PR. Great job being so detailed in exporting the raw data.
function DownloadButton(props){ | ||
const info = props.downloadBtnInfo || defaultInfo; | ||
const { BTN_TXT, MSG_LOADING, DOWNLOAD_TXT, MSG_DOWNLOAD_FINISHED, STYLING } = info; | ||
const [txt, setTxt] = useState(BTN_TXT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job using a hook to update the button text. Very dynamic!
const { set_view } = props; | ||
return ( | ||
<div className="all-offices-route"> | ||
<GraphWrapper set_view={set_view} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job deconstructing set_view from props and passing that to the GraphWrapper component
case 'time-series': | ||
map_to_render = <TimeSeriesAll />; | ||
break; | ||
case 'office-heat-map': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to utilize switch case here instead of if else
SET_DATE_FILTER_FORMAT, | ||
SET_ASYLUM_OFFICE_FILTER, | ||
SET_CONTINENT_FILTER, | ||
SET_GEOPOLITICAL_FILTER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent job cleaning up the imports!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving the new and improved code! Ya'll doing wonderous work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and great explanation of the values
Description
This task implements a 'download data button' that allows a final user to download the whole data set in raw format (.csv) for their own consumption and run it in Excel or some other BI tool.
For this ticket was needed :
Conclusions :
Backend :
currently : REACT_APP_DOWNLOAD_RAW_CSV_DATA_URL=http://localhost:3000/test-raw-data.zip
FrontEnd :
Video Link
Loom Video
Jira Link
BL-823
Type of change
Checklist: