Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnumListAttribute? #28

Open
JeremyCaney opened this issue Mar 28, 2021 · 0 comments
Open

EnumListAttribute? #28

JeremyCaney opened this issue Mar 28, 2021 · 0 comments
Labels
Area: Attribute Types Related to attribute type definitions or plugins. Priority: 3 Severity 0: Nice to Have Status 0: Discussion Needs further evaluation of requirements and prioritization. Type: Feature Introduces a major area of functionality.

Comments

@JeremyCaney
Copy link
Member

Establish a new attribute type which can be associated with a given enum, and will display the options of the enum as a list. This is similar to TopicListAttribute, but the data source would be an enum, not e.g. Topic.Children.

TypeListAttribute

To support this, ideally the EnumListAttribute would dynamically identify all enums in scope, and allow the definition to select an enum, thus ensuring that the fully qualified name can be easily verified. This could be a challenge in that there may be a lot of enums in scope, thus necessitating e.g. a combo box. To support this, we'd likely need an e.g. TypeListAttribute which could be filtered by type (e.g., record, class, enum), extension (e.g., ViewModel, Collection), as well as e.g. a backend TypeQueryService.

Note: A quick and easy compromise here would be to require the editor to type in the fully-qualified enum without any validation. This would dramatically simplify this component, and may be a better option for the first version. This could lead to errors in rendering the attribute type if the enum name was not correctly entered or could not be resolved in scope.

View Component

On the view component itself, we'd need to be able to lookup that type, evaluate its values, and return them as a collection to be bound to the dropdown box source.

@JeremyCaney JeremyCaney added Priority: 3 Severity 0: Nice to Have Status 0: Discussion Needs further evaluation of requirements and prioritization. Type: Feature Introduces a major area of functionality. Area: Attribute Types Related to attribute type definitions or plugins. labels Mar 28, 2021
@JeremyCaney JeremyCaney changed the title EnumListAttribute? EnumListAttribute? Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Attribute Types Related to attribute type definitions or plugins. Priority: 3 Severity 0: Nice to Have Status 0: Discussion Needs further evaluation of requirements and prioritization. Type: Feature Introduces a major area of functionality.
Projects
None yet
Development

No branches or pull requests

1 participant