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

Add filter page components #94

Merged
merged 4 commits into from
Jul 16, 2024
Merged

Conversation

lfjnascimento
Copy link
Contributor

@lfjnascimento lfjnascimento commented Jul 15, 2024

Description

  • Add UI Checkbox component;
  • Add Checkbox (a custom version) component;
  • Add CheckboxSection filter component
  • Add TimeRangeSection filter component

Related Issues

Closes #75

How to test it

  • run storybook pnpm run storybook
  • and give a look at Filter CheckboxSection and Filter TimeRangeSection

@lfjnascimento lfjnascimento requested a review from mari1912 July 15, 2024 19:20
@lfjnascimento lfjnascimento self-assigned this Jul 15, 2024
Copy link
Collaborator

@mari1912 mari1912 left a comment

Choose a reason for hiding this comment

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

Nice job!

I just have a couple of questions:

  • This PR aimed to implement only the components of the sections and the Create Filter Page #76 will put everything together? Maybe it would be better to implement the page ui first and than put the logic in it. It will take more time to add the state management, etc
  • In storybook, the checkbox is moving when we click on it, is there an easy way to fix it?

dashboard/src/components/Checkbox/Checkbox.tsx Outdated Show resolved Hide resolved
dashboard/src/components/Filter/CheckboxSection.tsx Outdated Show resolved Hide resolved
dashboard/src/components/Filter/CheckboxSection.tsx Outdated Show resolved Hide resolved
dashboard/src/components/Filter/CheckboxSection.tsx Outdated Show resolved Hide resolved
dashboard/src/components/Filter/CheckboxSection.tsx Outdated Show resolved Hide resolved
</span>
<Input
className={inputClass}
onChange={onMinChange}
Copy link
Collaborator

Choose a reason for hiding this comment

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

in both cases the onChange will update the value, right? I think it is worth it to add a const with useCallback for it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Parent component will probably create two states, one for each input, so we will probably always have two setState also.

@lfjnascimento lfjnascimento force-pushed the feat/filter_page_components branch 2 times, most recently from d78c795 to a8fb19c Compare July 16, 2024 11:31
@lfjnascimento
Copy link
Contributor Author

  • In storybook, the checkbox is moving when we click on it, is there an easy way to fix it?

Fixed

@lfjnascimento lfjnascimento force-pushed the feat/filter_page_components branch from a8fb19c to dceef7b Compare July 16, 2024 12:00
@lfjnascimento lfjnascimento force-pushed the feat/filter_page_components branch from dceef7b to 0b5284a Compare July 16, 2024 12:05
@lfjnascimento lfjnascimento merged commit 0b5284a into main Jul 16, 2024
2 checks passed
@lfjnascimento lfjnascimento deleted the feat/filter_page_components branch July 16, 2024 12:06
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.

Creat Filter Page components
2 participants