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

Core: New Reference Asset - Choice #181

Open
hborawski opened this issue Oct 17, 2023 · 1 comment
Open

Core: New Reference Asset - Choice #181

hborawski opened this issue Oct 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@hborawski
Copy link
Contributor

To reduce the time it takes for new users to evaluate Player, we need to expand the reference asset set to incoporate more common user interaction patterns.

A choice asset represents a single selection choice, often displayed as radio buttons in a web context. This will allow users to test out more complex flows than just inputs + buttons.

Requirements

choice

  • A choice asset must have a title to give the user context on what choice they are making
    • The title should be an asset
  • A choice asset can have an optional note to provide more detailed information about the selection
    • The note should be an asset
  • A choice asset should update the value of a binding property supplied to it
  • A choice asset should retrieve validation information for its binding, and expose that for all rendering platforms to display
  • A choice asset will have an array of choices
    • Each entry in choices will not be an asset, as the choice assets per platform will need direct control over the layout
    • Each entry must have a value that is set to the binding when the option is selected
      • The value should be a primitive
    • Each entry must have a label that describes what value is being selected
      • The label should be an asset

Execution

  1. Create a new choice asset in the core reference assets and add types for the authored content, and the transformed content.
  2. Create a transform for this choice asset
    1. The transform should use the binding and provide functions on the transformed type to make it simple for the rendering platform to select an option, similar to run in the action asset
    2. The transform should populate a property on each choice to indicate its selection status
    3. validation to be populated from the binding/schema information
      1. validation is not a content authored field
  3. Add mocks to the mocks package to exercise required and optional fields, to ease unit testing, and implementations for rendering
  4. Add the DSL Component for choice to allow programmatic content authoring
    1. DSL Docs
    2. Add unit test to verify JSON conversion of the DSL component
  5. Add unit tests for the transform
    1. Verify selecting options
    2. Verify validation information being populated
@LeonDong02
Copy link

Hey, can I take on this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants