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

FE: Messages: Implement messages export #740

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alexanderlz
Copy link

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

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.

screenshot

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@alexanderlz alexanderlz requested a review from a team as a code owner December 30, 2024 19:53
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Dec 30, 2024
Copy link

@github-actions github-actions bot left a 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.

Copy link
Member

@Haarolean Haarolean left a 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?

@Haarolean Haarolean changed the title Closes #688 FE: Messages: Implement messages export Jan 1, 2025
@Haarolean Haarolean added type/enhancement En enhancement/improvement to an already existing feature scope/frontend Related to frontend changes area/messages and removed status/triage/manual Manual triage in progress labels Jan 1, 2025
@alexanderlz
Copy link
Author

definitely (both of your questions).

Happy New Year!

@Haarolean
Copy link
Member

definitely (both of your questions).

Happy New Year!

likewise, happy new year 😊

buttonSize="M"
onClick={handleDownload}
>
Download All Messages
Copy link
Contributor

@yeikel yeikel Jan 3, 2025

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

Copy link
Author

Choose a reason for hiding this comment

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

will do.

Comment on lines +39 to +40
const minutes: string = now.getMinutes().toString().padStart(2, '0');
const seconds: string = now.getSeconds().toString().padStart(2, '0');
Copy link
Contributor

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?

Copy link
Author

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

Copy link
Member

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/messages scope/frontend Related to frontend changes status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants