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

[PBNTR-576] Tooltip for Truncated Form Pills #3856

Merged
merged 9 commits into from
Nov 5, 2024

Conversation

ElisaShapiro
Copy link
Contributor

@ElisaShapiro ElisaShapiro commented Oct 29, 2024

What does this PR do? A clear and concise description with your runway ticket url.
PBNTR-576 follows up PBNTR-550 by adding a Tooltip containing text or tag content in full of a truncated Form Pill.

This PR does the following:

  • Adds a Tooltip to the text, tag, or avatar name component of a truncated Form Pill. The Tooltip contains the entirety of the text content (does not include avatar image or icon)
  • Expands upon PBNTR-550 by adding the truncate prop to Rails Form Pills as well - all Rails Typeaheads With Pills are react-rendered-rails, so this expands the behavior so React/Rails are consistent. (Note: there are no solo rails form pills in use in Nitro). For Rails Tooltips, an id must be included; if not included, the Form Pill will be truncated but no Tooltip will appear (this is not necessary for React, nor for react-rendered-rails Typeahead).
  • Updates the Truncated Text Rails and React doc examples to include several form pill variations (an avatar, an icon+text tag, and a text tag only) within a Card of a small width to demonstrate the truncation/tooltip in a non-Typeahead environment. Locally I tested many variations (including truncation on a small Form Pill, or one with customized color).

Screenshots: Screenshots to visualize your addition/change
React Truncated Text doc example screenshots showing Tooltip
react doc ex typeahead
react doc ex formpill

Rails Truncated Text doc example screenshots showing Tooltip
for PR rails updated typeahead doc ex
for PR rails updated formpill doc ex

How to test? Steps to confirm the desired behavior:

  1. Go to the truncated text doc example (rails/react).
  2. Go to the Typeahead in the "Truncation Within Typeahead" section and select a name. Hover over the Form Pill that appears with their truncated name and observe the Tooltip in action displaying their full name.
  3. Hover over one/all of the truncated Form Pills in the "Form Pill Truncation" section. Observe the Tooltip in action. For the last Form Pill in the Rails doc ex, note that no Tooltip will appear because it does not have an id.

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • DEPLOY I have added the milano label to show I'm ready for a review.
    - [ ] TESTS I have added test coverage to my code.

@ElisaShapiro ElisaShapiro added enhancement New Features, Props, & Variants (USED IN CHANGELOG) milano 20 MAX - Deploy this PR to a review environment via Milano labels Oct 29, 2024
@ElisaShapiro ElisaShapiro self-assigned this Oct 29, 2024
@powerhome-portal
Copy link

A change to documentation files was detected in your PR. Please visit this link to preview changes: https://portal-staging.powerapp.cloud/docs?filters[kind]=all&filters[user]=all&filters[namespaceFilter]=pbntr-576-tooltip-truncated-formpills

@ElisaShapiro ElisaShapiro marked this pull request as ready for review October 30, 2024 17:28
@ElisaShapiro ElisaShapiro requested review from a team as code owners October 30, 2024 17:28
Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4296

Your Alpha for NPM is 14.6.2-alpha.PBNTR576tooltiptruncatedformpills4296

Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4304

Your Alpha for NPM is 14.6.2-alpha.PBNTR576tooltiptruncatedformpills4304

Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4312

Your Alpha for NPM is 14.6.2-alpha.PBNTR576tooltiptruncatedformpills4312

@nidaqg nidaqg added the Code Approved Approved by a Playbook Admin label Oct 31, 2024
@jasperfurniss jasperfurniss added this pull request to the merge queue Nov 5, 2024
Merged via the queue into master with commit 50fc9f6 Nov 5, 2024
5 checks passed
@jasperfurniss jasperfurniss deleted the PBNTR-576-tooltip-truncated-formpills branch November 5, 2024 13:59
Copy link

github-actions bot commented Nov 5, 2024

You merged this pr to master branch:
- Ruby Gem: 14.7.0.pre.rc.10
- NPM: 14.7.0-rc.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha Code Approved Approved by a Playbook Admin enhancement New Features, Props, & Variants (USED IN CHANGELOG) milano 20 MAX - Deploy this PR to a review environment via Milano
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants