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

Size tooltip #2573

Merged
merged 9 commits into from
Nov 7, 2019
Merged

Size tooltip #2573

merged 9 commits into from
Nov 7, 2019

Conversation

sajidanower23
Copy link
Contributor

@sajidanower23 sajidanower23 commented Nov 4, 2019

What this PR does

Fixes #2558

Adds a mouse-over tooltip explaining the difference between MB and MiB, KB and KiB, etc.

Checklist

  • Unit tests aren't applicable
  • I've updated CHANGES.md with what I changed.
  • I've linked this PR to an issue in ZenHub (core dev team only)

Screenshot

tooltip_human_file_size

@sajidanower23 sajidanower23 self-assigned this Nov 4, 2019
@t83714
Copy link
Contributor

t83714 commented Nov 4, 2019

Tested in gitlab cluster and works well 👍

@alyce Are you happy with the tooltip text? it now reads as:

Note: 1 KiB = 1024 Bytes, 1 MiB = 1024 KiB

Screenshot:

image

If you want to have a play, here is the test site:

https://2558-size-tooltip.dev.magda.io/dataset/add

@t83714
Copy link
Contributor

t83714 commented Nov 6, 2019

@sajidanower23
Had a chat with @alyce

is it possible to make sure the line break is after the comma, e.g.
Note: 1 KiB = 1024 Bytes,
1 MiB = 1024 KiB
or make the tooltip a bit wider so it's all on one line?

At the moment, the 1 MiB was cut off after 1 in tooltip

@sajidanower23
Copy link
Contributor Author

sajidanower23 commented Nov 6, 2019

@t83714 that works fine for me in both Chrome and Firefox. What version of which browser were you using?
tooltip_size

@t83714
Copy link
Contributor

t83714 commented Nov 6, 2019

@t83714 that works fine for me in both Chrome and Firefox. What version of which browser were you using?
tooltip_size

I am using chrome on a Mac. Probably you can wrap that line with a block element to guarantee a new line?

Copy link
Contributor

@t83714 t83714 left a comment

Choose a reason for hiding this comment

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

Tested in cluster & worked well~
Well done~ 👍

@t83714 t83714 merged commit 29ab0f7 into master Nov 7, 2019
@t83714 t83714 deleted the 2558-size-tooltip branch November 7, 2019 05:29
@magdabot magdabot restored the 2558-size-tooltip branch October 7, 2020 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Tooltip Explaining Size Abbreviations
2 participants