-
Notifications
You must be signed in to change notification settings - Fork 112
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
feat: add toggle switch between time ago and utc time #366
base: main
Are you sure you want to change the base?
feat: add toggle switch between time ago and utc time #366
Conversation
API E2E Test Results207 tests 207 ✅ 19s ⏱️ Results for commit 30fb600. ♻️ This comment has been updated with latest results. |
Unit Test Results 4 files 263 suites 11m 51s ⏱️ Results for commit 30fb600. ♻️ This comment has been updated with latest results. |
Visit the preview URL for this PR: |
@@ -1,7 +1,7 @@ | |||
<template> | |||
<div class="info-field-time" :title="utcStringFromISOString(isoString)"> | |||
<span class="time-ago"> | |||
{{ timeAgo }} | |||
{{ isUtcDate ? localDateFromISOString(isoString) : timeAgo }} |
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.
Why do we need it and not simply use showExactDate
flag?
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.
showExactDate is used for showing the full date next to the "time ago", and it's set as false in all component except the transaction view, one example here: https://sepolia.explorer.zksync.io/tx/0x578366ab5db0538dcab887a1bdd6aeb82dc45e822acf280230d3c5e6dd64023f
I could refactor it, or rename the variables to make it more clear? To rename it to something like "showBothDates" instead of just "showExactDate", and use that name instead of isUtcDate check?
:value="item.receivedAt" | ||
:show-exact-date="false" | ||
:data-testid="$testId.timestamp" | ||
:is-utc-date="!isTimeAgeView" |
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.
Why do we need it and not simply use showExactDate flag?
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.
Explained in the comment above
What ❔
This PR adds the functionality to toggle between "Ago" and "UTC Date" for tx timestamps in the transactions table.
Screen.Recording.2024-12-23.at.14.28.25.mov
Why ❔
For better user experience - previously users could only see for example "4 weeks ago" timestamp for multiple transactions - this enables easier navigation trough the transactions list.
Checklist
This PR fixes #341