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

feat: exclusive 'or' checklist with grouped options #4116

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

jamdelion
Copy link
Contributor

@jamdelion jamdelion commented Jan 8, 2025

In this PR:

This is version 2 of handling expanded/grouped checklists with an exclusive 'or' option! Originally I had it nested in each grouped checklist. Based on slack feedback, now there is just one exclusive 'or' option at the bottom of all the groups.

🎟️ https://trello.com/c/dXUW9EC1/3146-add-or-option-to-checklists

Overall this component has been complex to work with! There is certainly a lot more to be done to make it easier and more readable. This PR is big so that the editor and public facing changes to the grouped scenario could be done at once.

Done:

  • Split the previously used VisibleChecklist into two separate Checklist types: GroupedChecklist and Checklist, which each manage their own formik state.
  • Added a hook useInitialOptions to replicate what Jess did in a previous PR for now, across the refactored Options components.

Screenshot 2025-01-08 at 16 40 25

Styling thoughts 🎨

  • I had some feedback about moving the 'add or option' button above the input in the editor modal but this would have involved changing the underlying ListManager so I have not implemented this.
  • I also had feedback about making the 'add option' buttons the same size (see slack thread) but I think this is controlled by how many containers the ListManager is in, which is quite difficult to unravel! I wonder if there is a better way to distinguish the buttons without them looking nearly the same (but annoyingly inconsistent).

Copy link

github-actions bot commented Jan 8, 2025

Pizza

Deployed 31a9861 to https://4116.planx.pizza.

Useful links:

@jamdelion jamdelion marked this pull request as ready for review January 8, 2025 16:58
@jamdelion jamdelion changed the title feat: grouped checklists 2 feat: exclusive 'or' checklist with grouped options Jan 8, 2025
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

Successfully merging this pull request may close these issues.

1 participant