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

DiscussionForm component #242

Open
7 tasks
justin-b-yee opened this issue Nov 6, 2024 · 2 comments
Open
7 tasks

DiscussionForm component #242

justin-b-yee opened this issue Nov 6, 2024 · 2 comments
Labels

Comments

@justin-b-yee
Copy link
Contributor

justin-b-yee commented Nov 6, 2024

Specs

<DiscussionForm
    mode = 'readonly',
    vState= 'single',
    schema = {}, 
    uischema = {}, 
/>

Tasks

Note: Provided screenshot of mockup may not match final component design.

  • The component has two modes - 'readonly' or 'edit.'
  • If vState is 'single' (as in single choice), render choices from schema as radio buttons.
  • If 'multi', render choices from schema as checkboxes.

In edit mode:

  • Render a dropdown with options 'Single Choice' and 'Multiple Choice' that updates vState.
  • Render a delete button at the bottom.
  • Add a text input field for the user to input the question.
  • If schema is not provided, default render two blank options with placeholder text "begin typing."

Figma

Image

@ddfridley
Copy link
Contributor

@ddfridley look for json forms creater tool

@ddfridley
Copy link
Contributor

@justin-b-yee JSON Forms says it has a way to create the UI schema from data schema: https://jsonforms.io/examples/gen-uischema

Here's a form builder but I found https://github.com/eclipsesource/jsonforms-editor?tab=License-1-ov-file#readme

But basically I want to use libraries for building forms as much as possible, and maybe make some compromises on the UI implementation to adapt to what's available.

@justin-b-yee justin-b-yee changed the title ChoiceList component DiscussionEditor component Dec 24, 2024
@justin-b-yee justin-b-yee changed the title DiscussionEditor component DiscussionForm component Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants