Bug - Decorator - Cannot destructure property 'addDef' of 'undefined' as it is undefined
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia dalla riga 27 di packages/module/src/components/defs/SVGDefs.tsx e analizza l’uso di Decorator nel branch example-decorator. Riproduci il problema con yarn install && yarn run start, yarn run start-console e la pagina OpenShift Topology. Il lavoro è completato quando il decorator viene renderizzato sul nodo di deployment senza l’errore di destrutturazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the problem
Hi! I'm trying to add a decorator to a OpenShift Console dynamic plugin for use in their Topology page(s), but I'm running into the following error message when using the Decorator: TypeError: Cannot destructure property 'addDef' of 'undefined' as it is undefined
Example snippet: [Decorator x={x} y={y} radius={radius}][/Decorator]
My dev console is pointing here: https://github.com/patternfly/react-topology/blob/main/packages/module/src/components/defs/SVGDefs.tsx#L27
How do you reproduce the problem?
I've put together a branch to illustrate this: https://github.com/aptmac/console-plugin-template/tree/example-decorator
It's an OpenShift dynamic plugin, so you'll need a running instance of OpenShift or CRC to test against.
- In one terminal, install and run the plugin:
yarn install && yarn run start - In another terminal, run a local console frontend:
yarn run start-console - Have a running deployment. Quickest way would be to go to the Developer perspective ->
+Addpage, and under "Create applications using samples" select "Basic Quarkus" and follow the steps to create - Go to the Topology page, and try to view the new deployment
The expected behaviour is that a new decorator should be present in the top left of the deployment node. The actual behaviour is the error message above.
Expected behavior
A clear and concise description of the expected behavior.
Is this issue blocking you?
List the workaround if there is one.
Screenshots
Actual: here's a screenshot of the error
Expected: I'm expecting a decorator and icon to be drawn in the top left of the node. Here I replaced the [Decorator] and used the icon directly instead and it appears, but it would look nicer with the decorator around it
What is your environment?
-
OS: Fedora 42
-
Browser: Chrome
-
Version: 140.0.7339.80
Jira Issue: PF-2650
- Lingua principale
- TypeScript
- Stelle
- 21
- Fork
- 27
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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-topology
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
patternfly/react-topology#150 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
patternfly/react-topology#321 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
patternfly/react-topology#316 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
patternfly/react-topology#308 ·
-
Bug - Docs - Example heightApertaPF Team
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
patternfly/react-topology#307 ·
Tutte le issue di patternfly/react-topology
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
callstackincubator/rozenite#518 ·
I maintainer di solito rispondono entro 1 giorno
-
Area/Workflow Priority/Blocker Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
wso2/product-integrator#2622 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
area:bash bug has repro platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
anthropics/claude-code#98644 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
allure-framework/allure-js#1603 ·
I maintainer di solito rispondono entro 1 giorno