Skip to content

Simplify QuestActionSubForm.tsx #11803

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

Open
mzparacha opened this issue Apr 9, 2025 · 0 comments
Open

Simplify QuestActionSubForm.tsx #11803

mzparacha opened this issue Apr 9, 2025 · 0 comments
Assignees

Comments

@mzparacha
Copy link
Contributor

mzparacha commented Apr 9, 2025

Description

The component in discussion packages/commonwealth/client/scripts/views/pages/CreateQuest/QuestForm/QuestActionSubForm/QuestActionSubForm.tsx

This QuestActionSubForm component is quite complex. Quick break down:

  1. Has multiple configurations and error states
    1. Per chosen action
      1. Multiple different field configurations are used
        1. Values are overridden if action is changed and some overrides require complex state resets
      2. Multiple different validation rules/schemas are used
        1. Some values are optional in some configurations while required in some
        2. Nested validation applies to some specific actions
      3. URL format and Content ID configurations (optional/required) validations for different platforms ex: twitter/common/discord/chain-events.
      4. Default/gated value handling for chosen actions. Some actions only allow specific values.
      5. Conditional instructional messages that change how end-users will interact with the selected action.
    2. Per chosen aura limit <> repetition schedule
      1. Some actions only allow specific repetition types ex: Tweet Engagement
      2. Complex participation limit validations. The repetition counts are different for chosen schedulea and per chosen action.
    3. Per chosen quest type, listed actions change i.e channel vs common quest.

and many more configurations as we continue to add more quest actions and tailoring existing ones to be more specific.

This ticket is about simplifying the component to be more dynamic, accommodate more configurations and be maintainable more easily than in its current state.

--
Use URL() where it can be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant