patternfly / patternfly/patternfly-react
ClipboardCopy - custom wrapper component
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 862
- Forks
- 392
- Ø Merge
- 4 T. 8 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
ClipboardCopy uses a div element to wrap everything and style the element. When using the component in conjunction with a markdown viewer, this ends up generating invalid html if the ClipboardCopy is used to style inline <code> tags.
An example is this visualization which comes from a markdown content rendered using react-markdown, customized to use ClipboardCopy and CodeBlock components (for single-line and multi-line snippet of code respectively) to style the code tags (visible at the bottom of the screen):
which generates this warning:
This could be solved by either defaulting the ClipboardCopy to use a span element by default, or by providing a customization property for the wrapping element as done for other components in the library.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Ermittle die Implementierung der ClipboardCopy-Komponente und ihre Tests und untersuche anschließend, wie sich ihr div-Wrapper verhält, wenn er um Inline-Code-Elemente aus einem Markdown-Viewer verwendet wird. Als erledigt gilt die Aufgabe, wenn die Komponente das angeforderte Wrapper-Verhalten unterstützt, entweder über ein span als Standard oder über eine Eigenschaft zur Anpassung des Wrappers, ohne ungültiges HTML zu erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100