- Issue created by @pdureau
- Merge request !259Issue #3486547 by pdureau, just_like_good_vibes: Add new EnumSetPropType → (Merged) created by pdureau
- 🇫🇷France pdureau Paris
Work in progress. Remaining work to do:
- Test SelectsWidget with 📌 [1.1.0] From Layout Options to UI Patterns 2.x Active
- If possible: Dynamic number of selects elements when no
maxItems
- Update schema compatibility checker?
- Unit tests
- 🇫🇷France pdureau Paris
Current status.
OOS:
- Test SelectsWidget with 📌 [1.1.0] From Layout Options to UI Patterns 2.x Active >> DONE
- Do we put select title only when minItems? >> NO, always, for accesibility
- If possible: Dynamic number of selects elements when no
maxItems
>> NO, let's keep thing simple
TODO:
- Update the management of enumeration in both widgets and prop types
- Update schema compatibility checker?
- Unit tests?
- 🇫🇷France pdureau Paris
Update the management of enumeration in both widgets and prop types
DONE
- 🇫🇷France just_like_good_vibes PARIS
- the function
getAllowedValues
does not live well inPropTypePluginBase
andSourcePluginBase
with the namegetEnumOptions
, let's rather put this in a trait,
and use that trait in enum prop types and appropriate sources.
- there is a typo in "mixItems" inCompatibilityChecker
otherwise i think this is quite a bold move.
- 🇫🇷France pdureau Paris
Thanks you. Changes done.
I was not sure about the naming of the trait, so I did "EnumTrait"
- 🇫🇷France just_like_good_vibes PARIS
in
CompatibilityChecker
,
please change line 165 toif (($reference_schema["uniqueItems"] ?? FALSE) && (!isset($checked_schema["uniqueItems"]) || !$checked_schema["uniqueItems"])) { return FALSE; }
and put
priority: 1
to EnumList prop type in its attributes - 🇫🇷France pdureau Paris
I don't reproduce this on my environment. This is an
enum_list
:offset_xl: title: "Columns offset (extra large)" type: array maxItems: 3 items: type: integer enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
This is an
enum_set
:test: title: "Test" type: array uniqueItems: true maxItems: 3 items: type: integer enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
and put priority: 1 to EnumList prop type in its attributes
But we need to do some changes because it is better and safer to set priority attribute instead of relying on plugin discovery order, but 1 is already the default value and let's update both
enum_set
andenum_list
:- Each
enum
(priority: 10) is also astring
(priority: 1) or anumber
(priority: 1) - Each
identifier
(priority: 100) is also astring
(priority: 1) - Each
url
(priority: 10) is also astring
(priority: 1) - So, each
enum_set
(priority: 10) is also aenum_list
(priority: 1)
Once the change done,
CompatibilityChecker
must also be updated. Thanks for your proposal, it works well. - Each
-
just_like_good_vibes →
committed b71771dd on 2.0.x authored by
pdureau →
Issue #3486547 by pdureau, just_like_good_vibes: add new EnumSetPropType
-
just_like_good_vibes →
committed b71771dd on 2.0.x authored by
pdureau →
-
just_like_good_vibes →
committed 02da2f43 on 2.0.x
Issue #3486547 by pdureau, just_like_good_vibes: add new EnumSetPropType
-
just_like_good_vibes →
committed 02da2f43 on 2.0.x
- 🇫🇷France pdureau Paris
Let's fix that in an otehr issue:
Each enum_set (priority: 10) is also a enum_list (priority: 5) which is also a list (priority: 1)
Automatically closed - issue fixed for 2 weeks with no activity.