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] Create Custom Multi-Select Dropdown and Style Seasonal Planting Guide #62

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

Conversation

kylezryr
Copy link
Contributor

@kylezryr kylezryr commented Dec 7, 2024

What's new in this PR 🧑‍🌾

Description

  • Refactored FilterDropdownMultiple and FilterDropdownSingle to use Select component from react-select
  • Applied styling changes to dropdowns
  • Applied styling changes to /seasonal-planting-guide
  • TODO: create SeasonalColorKey

Screenshots

image
image
image

How to review

  • Go to /seasonal-planting-guide and check that the styling matches
  • Use the filters and check that styling matches, check that filters still work to filter out rows

Next steps

  • TODO: SeasonalColorKey
  • Change calendar rows to be grid instead of table

Relevant links

Online sources

https://react-select.com/styles
https://react-select.com/components

Related PRs

CC: @ccatherinetan

@ccatherinetan ccatherinetan linked an issue Dec 7, 2024 that may be closed by this pull request
package.json Outdated
@@ -20,6 +20,7 @@
"react": "^18",
"react-dom": "^18",
"react-multi-select-component": "^4.3.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

shall we remove this dependency if we're no longer using this package?

@@ -67,7 +70,10 @@ export default function SeasonalPlantingGuide() {

useEffect(() => {
if (profileReady && profileData) {
setSelectedUsState(profileData.us_state);
setSelectedUsState({
label: profileData.us_state,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be useTitleCase(profileData.us_state)

@kylezryr kylezryr force-pushed the 60-create-custom-multi-select-dropdown branch from c1ad295 to 30a6d4f Compare December 7, 2024 23:38
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.

Create Custom Multi-Select Dropdown
2 participants