-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
FE: Messages: Implement messages export #740
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.
Hi alexanderlz! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
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.
Hi, thanks for the PR! Could you please take a look at the linter errors? And could we get some tests for the new functionality?
definitely (both of your questions). Happy New Year! |
likewise, happy new year 😊 |
buttonSize="M" | ||
onClick={handleDownload} | ||
> | ||
Download All Messages |
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 text Download All Messages
may be a bit misleading as this will only download the messages of the current page. Can we reword it to "Download Current Page Messages" or similar?
In the future we may want to expose an actual "Download all the messages" that will paginate and download the messages
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.
will do.
const minutes: string = now.getMinutes().toString().padStart(2, '0'); | ||
const seconds: string = now.getSeconds().toString().padStart(2, '0'); |
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.
Is this padding necessary? Can you add an inline comment explaining why we are doing that if so?
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 padding is for more human readable format (e.g. 07:02:04)
will add a comment for that
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.
can't we use some time lib here? I believe we had some in use already (dayjs?)
What changes did you make? (Give an overview)
Added an option to download all messages that are displayed on page(as csv or json)
as per #688
useDataSaver method is reused here.
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)