Skip to content

New info tooltip component#9180

Merged
danjm merged 3 commits intodevelopfrom
info-tooltip
Aug 18, 2020
Merged

New info tooltip component#9180
danjm merged 3 commits intodevelopfrom
info-tooltip

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Aug 11, 2020

This PR adds a component that is an info icon with a tooltip. It can be used in places where we need to give the user information.

Demo gif:
infotooltip

The gif is from the implementation in storybook, which can be seen by checking out the branch and running yarn storybook

@danjm danjm requested a review from a team as a code owner August 11, 2020 13:47
@danjm danjm requested review from Gudahtt and jakehaugen August 11, 2020 13:47
@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Aug 11, 2020

I thought we were trying to deprecate this tooltip? tooltip-v2 is being used in most places. I was hoping to get rid of this one.

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Aug 11, 2020

@Gudahtt Okay, I will update to use the v2 one. Meanwhile we should put comments in ui/app/components/ui/tooltip.js to indicate that it is being deprecated and should not be used or modified for any new work. (I didn't know that it was being depracated.)

@jakehaugen
Copy link
Copy Markdown

Just mocked up these specs, can we have the text left-aligned and match this spacing / font color?

Screen Shot 2020-08-11 at 9 11 06 AM

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Aug 11, 2020

@Gudahtt updated to use tooltip-v2

@jakehaugen updates were also made to match your image above. Updated gif:

infotooltip-2

jakehaugen
jakehaugen previously approved these changes Aug 11, 2020
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [5c4dabf]
Page Load Metrics (583 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27513652
domContentLoaded3276595818541
load3296605838541
domInteractive3276595818541

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c3f6ece]
Page Load Metrics (591 ± 11 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint288638157
domContentLoaded5516225902311
load5526235912211
domInteractive5506225892311

@brad-decker
Copy link
Copy Markdown
Contributor

@danjm work just landed that removes the old tooltip and renamed tooltip-v2 to tooltip. If you consume the component from the 'tooltip' folder it'll be the newest, sanctioned tooltip component. I hope that was English, I feel like I typed tooltip way too many times.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import Tooltip from '../tooltip-v2'
import Tooltip from '../tooltip'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You'll need to carry these changes over to components/ui/tooltip/tooltip

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented Aug 18, 2020

@brad-decker I have rebased and updated this to reflect the latest changes on develop (as per your comments)

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [f18fcaa]
Page Load Metrics (609 ± 87 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31122532612
domContentLoaded299103660718187
load301103860918187
domInteractive299103660718187

@danjm danjm merged commit eb653df into develop Aug 18, 2020
@danjm danjm deleted the info-tooltip branch August 18, 2020 18:15
Gudahtt added a commit that referenced this pull request Aug 19, 2020
* origin/develop: (137 commits)
  Use @metamask/eslint-config@3.1.0 (#9275)
  Standardize scss import practices (#9183)
  Update ESLint shared config to v3 (#9274)
  Add lock icon to default networks (#9269)
  Adds toPrecisionWithoutTrailingZeros utility (#9270)
  Hide gas estimate on non-main network (#9189)
  Move the mascot component to its own directory (#9272)
  Use @metamask/controllers@2.0.5 (#9266)
  Fix padding, alignment of actionable-message; add left aligned story
  Code cleanup and simplification for actionable-message component
  Adds actionable message component and stories
  Fix lint issues (#9265)
  Fix prefer-destructuring issues (#9263)
  colocate confirm-decrypt-message page styles (#9252)
  Tidy up Migrator tests (#9264)
  Adds pulse loader component (#9259)
  Fix import/order issues (#9239)
  Fix radix issues (#9247)
  New info tooltip component (#9180)
  Improve scss naming
  ...
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.

5 participants