Handling multiple form definitions (ui:annotationForm)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 153
- Forks
- 46
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
It is possible for a single class to be assigned multiple forms with
ui:creationForm or ui:annotationForm
A permanent solution probably requires either a mechanism to give the user a choice, to hardcode an order of preference (e.g. based on the document ui:annotationForm is defined in) or allow a user to specify a priority level for the form.
For my immediate purposes I have the problem that the same ui:annotationForm statement can be specified in multiple documents, which results in the form being rendered multiple times.
The logic to return the form to be used is in:
https://github.com/solid/solid-ui/blob/766c3f7906f991c582baad50f29061c1c9836a55/src/widgets/forms.js#L992
My temporary solution is to remove duplicate forms (i.e. ignore which document the ui:annotationForm statement was defined in). The two lines of code are here:
https://github.com/josephguillaume/my-solidos-patches/blob/afad1a9cc443fc1c996eec5dcc9463f55c670a1f/solid-ui.diff#L46
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
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
Beginne mit der Formularauswahllogik in src/widgets/forms.js um Zeile 992 und vergleiche sie mit dem verknüpften temporären Patch in solid-ui.diff. Ermittle, wie wiederholte ui:annotationForm-Anweisungen aus mehreren Dokumenten dargestellt werden, und definiere die beabsichtigte Behandlung mehrerer Formulare; done sollte verhindern, dass dasselbe Formular wiederholt gerendert wird, und dabei das ungelöste Auswahlverhalten berücksichtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100