Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix: Improve big number time format UX #1320

Merged
merged 2 commits into from
Aug 20, 2021

Conversation

etr2460
Copy link
Contributor

@etr2460 etr2460 commented Aug 19, 2021

🐛 Bug Fix
#1278 introduced the ability to show a timestamp for the value of big number, but as a result it overrode the default time format for the tooltip in big number trendline charts to a somewhat obscure (for americans) %d-%m-%Y %H:%M:%S format. This PR:

  • makes the time formatter always visible (so that the big number trendline chart can always set it)
  • Defaults to a format that's used globally, '%Y-%m-%d %H:%M:%S'

to: @krsnik93 @villebro @ktmud

@etr2460 etr2460 requested a review from a team as a code owner August 19, 2021 18:29
@vercel
Copy link

vercel bot commented Aug 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/BNpFLXvFRF89YLpPDc1r4NgdTPEm
✅ Preview: https://superset-ui-git-erik-ritter-big-number-time-format-superset.vercel.app

@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #1320 (466a9cc) into master (3c2d224) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1320   +/-   ##
=======================================
  Coverage   29.93%   29.94%           
=======================================
  Files         487      487           
  Lines        9838     9836    -2     
  Branches     1648     1648           
=======================================
  Hits         2945     2945           
+ Misses       6656     6654    -2     
  Partials      237      237           
Impacted Files Coverage Δ
...et-chart-big-number/src/BigNumber/controlPanel.tsx 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c2d224...466a9cc. Read the comment docs.

@krsnik93
Copy link
Contributor

Hello @etr2460 thanks for the improvements and sorry for defaulting to a non-standard time format.

Changes are completely fine with me.

Copy link
Contributor

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

YYYY-MM-DD for the win!

@ktmud
Copy link
Contributor

ktmud commented Aug 19, 2021

But shouldn't the default be Smart Date? I don't think we even need to provide a default (empty value will be treated like Smart Date, hopefully) if the control is going to be displayed always.

@etr2460
Copy link
Contributor Author

etr2460 commented Aug 19, 2021

Hmm, if that's true then i agree removing it is correct. I'll make the change

Copy link
Contributor

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM

@etr2460 etr2460 merged commit de9bc70 into master Aug 20, 2021
@delete-merged-branch delete-merged-branch bot deleted the erik-ritter--big-number-time-format branch August 20, 2021 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants