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

refactor: split Checklist into sub-components and hooks #4088

Merged
merged 39 commits into from
Dec 18, 2024

Conversation

jamdelion
Copy link
Contributor

@jamdelion jamdelion commented Dec 18, 2024

In this PR:

  • Extracted out GroupedChecklistOptions, ExclusiveChecklistOption and ChecklistItems from the Public checklist component to make the file easier to read.
  • Extracted logic into hooks, e.g. useExclusiveOption to move the complexity out of the single dense file.

@jamdelion jamdelion changed the title Jh/refactor checklist more refactor: split Checklist into sub-components Dec 18, 2024
Base automatically changed from jh/actual-or-work to main December 18, 2024 15:23
@jamdelion jamdelion force-pushed the jh/refactor-checklist-more branch from 628dc66 to 79b9f86 Compare December 18, 2024 15:36
@jamdelion jamdelion changed the title refactor: split Checklist into sub-components refactor: split Checklist into sub-components and hooks Dec 18, 2024
@jamdelion jamdelion marked this pull request as ready for review December 18, 2024 15:54
Copy link

github-actions bot commented Dec 18, 2024

Removed vultr server and associated DNS entries

@jamdelion jamdelion requested a review from a team December 18, 2024 16:06

export const useExclusiveOption = (
exclusiveOptions: Option[],
formik: FormikProps<{ checked: Array<string> }>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Seeing this prop many times in this PR points towards useFormikContext() being something worth considering. Not a blocker for sure.

@DafyddLlyr
Copy link
Contributor

A few nitpicks but no show stoppers - nice reorganisation, especially pulling logic out into clear and concise hooks 👍

@jamdelion jamdelion merged commit a862db2 into main Dec 18, 2024
12 checks passed
@jamdelion jamdelion deleted the jh/refactor-checklist-more branch December 18, 2024 16:31
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.

3 participants