-
-
Notifications
You must be signed in to change notification settings - Fork 692
feat/fix: Toggle "time ago" and timestamp with interactive tooltip #1043
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 “ 8000 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/fix: Toggle "time ago" and timestamp with interactive tooltip #1043
Conversation
Co-authored-by: Roman Lamsal <roman@lamsal.de> Co-authored-by: Ingo Strauch <ingo.strauch@otto.de> Co-authored-by: Fabian Besner <fabian.besner@otto.de> Co-authored-by: Timon Back <timon.back@otto.de> Co-authored-by: Martin Schuenemann <martin.schuenemann@otto.de>
Co-authored-by: Roman Lamsal <roman@lamsal.de> Co-authored-by: Ingo Strauch <ingo.strauch@otto.de> Co-authored-by: Fabian Besner <fabian.besner@otto.de> Co-authored-by: Timon Back <timon.back@otto.de> Co-authored-by: Martin Schuenemann <martin.schuenemann@otto.de>
const isoDate = obj[col.accessor] | ||
const TimeAgoComp = <TimeAgo date={Date.parse(isoDate)} title={""}/> | ||
return ( | ||
<Tooltip arrow title={!this.state.showRelativeTimes ? TimeAgoComp : isoDate} interactive> |
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 material-ui tooltip interactive
prop ensures that the tooltip's content can be copied.
We decided to not add the Might be added to localstorage, any thoughts on this? |
…tludo#938) Co-authored-by: Timon Back <timon.back@otto.de>
Hi, |
Hi @tchiotludo, i'll create a UiOptions property for that and add it to the settings page. Are you nevertheless okay with keeping the toggle in the filter bar of the table? Summary: UiOption backend + UiOption frontend settings page + Toggle in the table header |
@lhanke-dev : Perfect, I didn't notice the toggle, I will look at this weekend if possible. |
I just added the requested settings. During implementation i noticed that in addition to the topic data view, the topic list and tail view also display relative timestamps. I'll enhance the PR to respect the setting in both of these views too. |
…chiotludo#938) - move relative/iso time logic to a dedicated component - add current selection state to Date Format selection in TopicData view
@tchiotludo: The |
1f96a3e
to
898a302
Compare
Fixes the current behavior of not being able to select the ISO date displayed in the tooltips of the TopicData table (see comment below).
Also added a dropdown to switch between displaying relative times via
react-timeago
or plain ISO dates. The tooltip remains, but switches to either option.fixes #938