Log in collapsible sections cause content to not render
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start with the LogViewer and ExpandableSection interaction, then reproduce the failure using the linked CodeSandbox, especially with a ref and with the section initially hidden. Investigate why content does not render on the first hidden render; done means LogViewer content renders correctly when the section is opened, with and without a ref.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When using the LogViewer within an ExpandableSection component it might not render correctly. Assigning a ref to the LogViewer makes it happen even more often.
Here is a sandbox setup with a ref that showcases that issue
https://codesandbox.io/s/focused-hooks-m95046?file=/index.tsx
Here is a video of it happening for me in Storybook using ref
Here is a picture of it happening with two nested Cards and one ExpandableSection, without ref
Comment from Juntao Wang from PatternFly Slack
Hi, this is definitely a bug in the react-log-viewer, could you please create an issue in https://github.com/patternfly/react-log-viewer/issues? it’s a little bit tricky because the styles are setting everywhere and seems there are some render problems when using the log viewer with the expandable sections. it will not render correctly when the section is hidden for the first time.
The current workaround is creating a custom component that wraps the LogViewer and setting the ref there, and use React.memo on the whole component. Finally, set that component as the child in the ExpandableSection . However, in this situation, you may need to set the initial state of the isExpanded to true to make the initial render correctly.
I will be on PTO starting tomorrow for ~10 days so I might not have time to do a deeper investigation into this issue but I will check it again after I am back to see if I could find anything. Could you also take a look on this issue when you are available
Jira Issue: PF-2011
- Lingua principale
- TypeScript
- Stelle
- 34
- Fork
- 19
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di patternfly/react-log-viewer
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
patternfly/react-log-viewer#106 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
patternfly/react-log-viewer#101 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
patternfly/react-log-viewer#98 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
patternfly/react-log-viewer#95 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
patternfly/react-log-viewer#91 · 1 commento ·
Tutte le issue di patternfly/react-log-viewer
Issue simili
-
dx hacktoberfest help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
cloudflare/agents#2498 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing repro Platform: Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
software-mansion/react-native-reanimated#10816 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
I maintainer di solito rispondono entro 1 giorno