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

feat: Add Tooltip Snap custom UI component #25413

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Jun 19, 2024

Description

This adds the new Tooltip component to the Snap custom UI renderer.

Open in GitHub Codespaces

Related issues

Fixes: #25385

Manual testing steps

  1. Go to tests-snaps.
  2. Install the JSX example snap.
  3. click Show JSX dialog.
  4. hover on the Count text.
  5. Observe the Tooltip

Screenshots/Recordings

image

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@GuillaumeRx GuillaumeRx requested review from a team as code owners June 19, 2024 10:16
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-snaps-platform Snaps Platform team label Jun 19, 2024
content: mapToTemplate({
element:
typeof element.props.content === 'string'
? Text({ children: element.props.content })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wrapped the content prop with the Text element to be able to pass it directly to the propComponents section. This reduces the bloat of having a logic to pass it somewhere else if it's a string. Furthermore we keep a consistent styling.

@GuillaumeRx GuillaumeRx changed the base branch from develop to fb/snaps-bump-v53 June 25, 2024 13:31
@FrederikBolding FrederikBolding merged commit 0117cba into fb/snaps-bump-v53 Jun 25, 2024
9 of 11 checks passed
@FrederikBolding FrederikBolding deleted the gr/tooltip-component branch June 25, 2024 13:47
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Tooltip Snaps custom UI component
3 participants