Bug - Code Editor - React basic read-only sample does not match HTML sample
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 65/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- react, typescript
- Domaine
- frontend
Piste de recherche
Commencez par l’exemple React Code Editor Basic et sa prop isReadOnly, puis comparez-le avec l’exemple HTML Code Editor Read-only indiqué dans l’issue. Vérifiez si l’état en lecture seule applique le style pf-m-read-only au conteneur externe de l’éditeur et vérifiez que la zone de code React a le même arrière-plan gris que la version HTML.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 860
- Forks
- 391
- Merge moyen
- 3 j 22 h
- PR mergées (30 j)
- 12
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire 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.
Autres issues de patternfly/patternfly-react
-
PF Team
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
patternfly/patternfly-react#12651 ·
Les mainteneurs répondent en général sous 3 jours
-
Bug - [Menu] - Flyout stays open when hovering a disabled itemPeut-être pris @fallmo l’a pris il y a 18 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
patternfly/patternfly-react#12637 ·
Les mainteneurs répondent en général sous 3 jours
-
PF Team
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
patternfly/patternfly-react#12617 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
PF Team
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
patternfly/patternfly-react#12610 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 3 jours
-
Bug - [LoginForm] - `autoComplete` is not exposed and cannot be defined in the LoginForm.Peut-être pris @mnkprs l’a pris il y a 27 jours. OuverteStale
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
patternfly/patternfly-react#12600 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de patternfly/patternfly-react
Issues similaires
-
enhancement good first issue priority: low size: XS
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Empty label or headline exports the editor hint ("LABEL" / "Headline goes here") into the PNGOuverte
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
streamplace/streamplace#1351 ·
Les mainteneurs répondent en général sous 2 jours
-
Link Checker ReportOuverteautomated issue report
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
databendlabs/databend-docs#3511 ·
-
automated issue report
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100