patternfly / patternfly/patternfly-react
Truncate - Update Truncate to pass in custom `tooltipContent`.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 862
- Forks
- 392
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Localiza el componente PatternFly Truncate existente y sus pruebas, y luego lee cómo está configurado actualmente el tooltip automático. Añade la API solicitada para contenido personalizado del tooltip para valores de tipo string o element, y verifica que el contenido personalizado reemplace el texto completo predeterminado sin producir dos tooltips.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 68/100