[MGNLCT-55] Generate a select field to limit entry to a specified set of options Created: 29/Aug/18 Updated: 15/Aug/19 Resolved: 10/Apr/19 |
|
| Status: | Closed |
| Project: | Content Types |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1 |
| Type: | Story | Priority: | Neutral |
| Reporter: | Oanh Thai Hoang | Assignee: | Quach Hao Thien |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 3d 4.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||||||||||
| Patch included: |
Yes
|
||||||||||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||||||||||
| Epic Link: | Content Types finalization | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | Features 8 | ||||||||||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
User story:
Acceptance criteria:
Model suggestion: model: - name: 'firstName' - name: 'category' type: String options: - value: bullet label: Bullet - value: ordered label: Ordered - value: inline label: Inline Note: "label" is optional. |
| Comments |
| Comment by Christopher Zimmermann [ 19/Sep/18 ] |
|
The model above does not provide a way to specify both values and labels. Both are required. I think we should use how the select field configuration works, but remove specifying "value" fields since they are redundant with the name fields. That is - just use the name as the value. (Labels are optional) https://documentation.magnolia-cms.com/display/DOCS57/Select+field
|
| Comment by Christopher Zimmermann [ 19/Sep/18 ] |
|
In the model, I think "options" would be clearer and more descriptive than "enum". |
| Comment by Mikaël Geljić [ 19/Sep/18 ] |
|
Model-wise, we're still primarily interested in the possible values; I suggest not to bother too much with that until
Apart from that, defaultValue is part of property definitions, so no need for the selected flag here. |
| Comment by Christopher Zimmermann [ 20/Sep/18 ] |
|
Agree "selected" is not needed. |
| Comment by Simon Lutz [ 10/Jan/19 ] |
|
Review needed. |
| Comment by Mikaël Geljić [ 28/Jan/19 ] |
|
Apart from that:
|
| Comment by Christopher Zimmermann [ 12/Feb/19 ] |
|
OK, changing "name" to "value". Labels are optional. We have: options: |
| Comment by Quach Hao Thien [ 28/Mar/19 ] |
|
Hi czimmermann and mgeljic, Do you think we should support all properties defined in this link or just basic properties such as name, value, label, and selected, which could be reused from SelectFieldOptionDefinition.java? |
| Comment by Mikaël Geljić [ 29/Mar/19 ] |
|
Hi Thien, In content-types, we're only interested in describing the model / data structure, not the UI behavior. Field behavior can be further customized in the app descriptor. So here it's only about the options, and we just go with value & label (optional), as in Topher's last comment. You can read all previous comments to see how we got there. |