Skip to content

EnumListAttribute? #28

Open
Open

Description

@JeremyCaney

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.

Activity

  1. added
    Status 0: Discussion
    Type: Feature
    Area: Attribute Types
    on Mar 28, 2021
  2. changed the title [-]EnumListAttribute?[/-] [+]`EnumListAttribute`?[/+] on Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Attribute TypesPriority: 3Severity 0: Nice to HaveStatus 0: DiscussionType: Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions