patternfly / patternfly/patternfly-react
Truncate - Update Truncate to pass in custom `tooltipContent`.
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 862
- Forks
- 392
- Merge moyen
- 4 j 8 h
- PR mergées (30 j)
- 9
Description
Is this a new component or an extension of an existing one?
The existing component is the [Truncate /] component.
Describe the feature
The feature is an enhancement to the PatternFly [Truncate /] component that allows a developer to customize or override the content of the tooltip that the component automatically provides.
Any other information?
The existing [Truncate /] component automatically adds a tooltip that displays the full, un-truncated text when the user hovers over the truncated element. This creates an issue when the developer needs to provide a custom tooltip (like one with a description and the full name) because it results in two tooltips appearing simultaneously. This blocks RHCLOUD-41396
The expected behavior is to add a new prop to [Truncate /]}}—perhaps called {{tooltipContent or a function prop that overrides it—that accepts either a string or an element as its value. When this new prop is used, the [Truncate /] component should display the custom content in its tooltip instead of the default un-truncated text. This allows for a single, customized tooltip to be shown when the text is truncated.
Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
Include screenshots or links to Marvel or other mockups.
Example in use:
Jira Issue: PF-2757
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Localisez le composant PatternFly Truncate existant et ses tests, puis examinez comment l’info-bulle automatique est actuellement configurée. Ajoutez l’API demandée pour un contenu d’info-bulle personnalisé prenant en charge les valeurs de type string ou element, et vérifiez que le contenu personnalisé remplace le texte complet par défaut sans produire deux info-bulles.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100