Bug - Code Editor - React basic read-only sample does not match HTML sample
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 65/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Comienza con el ejemplo React Code Editor Basic y su prop isReadOnly; después, compáralo con el ejemplo HTML Code Editor Read-only enlazado en el issue. Comprueba si el estado de solo lectura aplica el estilo pf-m-read-only al contenedor exterior del editor y verifica que el área de código de React tenga el mismo fondo gris que la versión HTML.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the problem
There is a visual styling mismatch between the React and HTML implementations of the Code Editor component in a read-only state. Specifically, the React "Basic" sample (when set to read-only) does not match the styling shown on the HTML "Read-only" version. The HTML version renders the code area with a distinct gray background to signify its read-only status, whereas the React version only applies a gray border, leaving the code area background white.
How do you reproduce the problem?
-
Navigate to the PatternFly React Code Editor documentation (https://www.patternfly.org/components/code-editor#basic).
-
View the "Basic" example or configure a basic Code Editor with the isReadOnly prop set to true.
-
Observe the background color of the code input area (it remains white/transparent with only a gray border).
-
Navigate to the PatternFly HTML Code Editor documentation (https://www.patternfly.org/components/code-editor/html#read-only).
-
Observe that the HTML version applies a full gray background variant (.pf-v5-c-code-editor.pf-m-read-only or equivalent utility) to the entire editor body.
Expected behavior
The React CodeEditor component should visually match the HTML implementation when isReadOnly is active. It should render with the full gray background variant across the code area, consistently indicating to the user that the text cannot be edited.
Is this issue blocking you?
No, it is not strictly blocking, but it creates visual inconsistency across our application's forms.
Workaround: Manually passing a custom class or inline styles to force the background color to match the PatternFly read-only token variables.
Screenshots
What is your environment?
- OS: macOS Sonoma
- Browser: Chrome
- Version: 6.5.1
What is your product and what release date are you targeting?
RHOAI 3.5
Any other information?
It appears the React wrapper might not be mapping the isReadOnly prop to the correct modifier class (pf-m-read-only) on the outer container element that the HTML version utilizes.
Jira Issue: PF-4267
- Lenguaje dominante
- TypeScript
- Estrellas
- 862
- Forks
- 392
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
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.
Más de patternfly/patternfly-react
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12651 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
patternfly/patternfly-react#12617 · 1 comentario ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12610 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12600 ·
Todos los issues de patternfly/patternfly-react
Issues similares
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100