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: updated filters dropdown and created stories for it #3174

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

Conversation

devilkiller-ag
Copy link
Member

@devilkiller-ag devilkiller-ag commented Aug 29, 2024

Description
This PR updates the filters dropdown according to the design proposed in issue #1318 and creates stories for it.

Related issue(s)
Resolves #1318

Summary by CodeRabbit

  • New Features

    • Added Storybook configuration for FiltersDropdown component.
    • Created stories for language and technology filter dropdowns.
  • Improvements

    • Enhanced dropdown functionality with improved interaction and styling.
    • Updated dropdown rendering with more interactive option selection.
    • Refined visual representation of checked and unchecked states.
    • Streamlined state management for dropdown filters using an enum.
  • Chores

    • Adjusted layout and styling class order in CommunityIndexPage.
    • Removed inactive code related to a Card component.
  • Dependency Updates

    • Added Storybook Addons package.

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ec9aa51
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/679ceb015c40cf0008d16680
😎 Deploy Preview https://deploy-preview-3174--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@akshatnema akshatnema added the gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code label Aug 29, 2024
@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Aug 29, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 34
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-3174--asyncapi-website.netlify.app/

@akshatnema
Copy link
Member

@devilkiller-ag Where are stories of dropdown?

@devilkiller-ag
Copy link
Member Author

@devilkiller-ag Where are stories of dropdown?

Added all the stories for filters dropdown.

@sambhavgupta0705
Copy link
Member

/update

@asyncapi asyncapi deleted a comment from asyncapi-bot Sep 14, 2024
Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

Walkthrough

The pull request introduces enhancements to the FiltersDropdown component by adding Storybook stories and updating the component's implementation. The changes focus on improving the dropdown's interactivity, styling, and testing capabilities. A new Storybook configuration is created to demonstrate language and technology dropdown variations, and the component's rendering logic is modified to use more dynamic event handling and visual representation.

Changes

File Change Summary
components/tools/FiltersDropdown.stories.tsx Added Storybook configuration with metadata and stories for language and technology dropdowns
components/tools/FiltersDropdown.tsx Updated component with exported interface, enhanced event handling, and improved rendering logic
package.json Added Storybook addons dependency @storybook/addons@^7.6.17
components/tools/Filters.tsx Introduced enum for managing dropdown state, replacing multiple boolean states
pages/community/index.tsx Modified layout class names and removed inactive code block

Assessment against linked issues

Objective Addressed Explanation
Create dropdown with limited height
Enable scrollable dropdown
Improve UI for filter selection

Possibly related PRs

  • fix: remove hydration errors #3262: The changes in the main PR involve the FiltersDropdown component, which may relate to the AlgoliaSearch component's handling of dynamic content, as both involve dropdowns and user interactions.
  • fix: css alignment of calendar component on the home page #3276: The modifications in the main PR for the FiltersDropdown component's dropdown functionality could be relevant to the changes in the Calendar component's layout and rendering logic, as both involve user interface elements that require proper alignment and interaction.
  • fix: removed the swags and goodies card #3599: The layout adjustments in the CommunityIndexPage may connect with the FiltersDropdown component's integration within the broader community page, as both are part of the user interface enhancements.

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • magicmatatjahu
  • sambhavgupta0705
  • akshatnema
  • Mayaleeeee
  • asyncapi-bot-eve

Poem

🐰 Dropdowns dancing, options so neat,
Scrolling with grace, a UI treat!
Filters refined, no more webpage sprawl,
CodeRabbit's magic conquers all!
Hop, hop, hooray for dropdown delight! 🎉


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4e5a7b and ec9aa51.

📒 Files selected for processing (2)
  • components/tools/Filters.tsx (8 hunks)
  • pages/community/index.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pages/community/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/tools/Filters.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
components/tools/FiltersDropdown.stories.tsx (2)

1-2: Consider importing directly from '@storybook/react'

Since the useArgs hook is also available from @storybook/react, double-check if you want to rely on @storybook/preview-api or the more standard @storybook/react. Consistency across Storybook imports may simplify maintenance.


29-51: Use consistent story naming conventions

Currently, the primary story is defined as Dropdown. For clarity and discoverability, consider naming it DefaultDropdown or something similarly descriptive. This ensures better readability in the Storybook UI alongside your specialized stories.

- const Dropdown: Story = {
+ const DefaultDropdown: Story = {
components/tools/FiltersDropdown.tsx (1)

Line range hint 29-47: Ensure event usage is necessary

handleClickOption includes an event parameter. Currently, the function references only checkedOptions and option. If you don’t need event for specific logic such as stopping propagation or preventing default behavior, it could be removed to simplify the function signature.

- const handleClickOption = (event: React.MouseEvent<HTMLDivElement, MouseEvent>, option: string) => {
+ const handleClickOption = (_: React.MouseEvent<HTMLDivElement, MouseEvent>, option: string) => {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe09451 and 1903c13.

⛔ Files ignored due to path filters (3)
  • package-lock.json is excluded by !**/package-lock.json
  • public/img/illustrations/icons/CheckedIcon.svg is excluded by !**/*.svg
  • public/img/illustrations/icons/UncheckedIcon.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • components/tools/FiltersDropdown.stories.tsx (1 hunks)
  • components/tools/FiltersDropdown.tsx (3 hunks)
  • package.json (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PR testing - if Node project
package.json

[error] Package lock file is out of sync. Missing dependencies in lock file: @storybook/[email protected] and @storybook/[email protected]


[warning] Package '@tisoap/[email protected]' has incompatible engine requirements. Required: node >= 16, npm ^8.0.0. Current: node v20.11.0, npm 10.2.4

⏰ Context from checks skipped due to timeout of 180000ms (3)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (5)
components/tools/FiltersDropdown.stories.tsx (2)

9-25: Good use of argTypes for controlling props in Storybook

Defining argTypes for dataList, checkedOptions, and setCheckedOptions helps maintain clarity around how each prop is expected to be controlled. This is a beneficial setup for customizing story interactions.


53-75: Check for potential overlap between Language and Technology lists

While the LanguageDropdown and TechnologyDropdown stories provide separate data sets, confirm whether there's any overlap or potential naming collisions (e.g., a technology that is also a recognized language) that might produce confusion when searching or filtering. If so, consider unique naming or additional context in the UI.

components/tools/FiltersDropdown.tsx (2)

8-8: Exporting FiltersDropdownProps facilitates reusability

Exporting the interface is valuable, especially if you plan to reuse this dropdown across multiple stories or even other components. This is a positive change in making the codebase more modular.


46-61: Good approach for toggling checked state

Using a single click event and toggling the presence of option in checkedOptions is concise. Maintaining a consistent, minimal approach to toggling states helps keep the UI responsive and straightforward.

package.json (1)

58-58: Confirm Storybook addons integration

Adding "@storybook/addons": "^7.6.17" helps expand Storybook's capabilities. However, ensure it aligns with the other Storybook packages’ versions. Mismatched versions can cause unexpected behavior or build conflicts.

🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] Package lock file is out of sync. Missing dependencies in lock file: @storybook/[email protected] and @storybook/[email protected]


[warning] Package '@tisoap/[email protected]' has incompatible engine requirements. Required: node >= 16, npm ^8.0.0. Current: node v20.11.0, npm 10.2.4

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bca2a91) to head (ec9aa51).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3174   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          732       732           
=========================================
  Hits           732       732           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
components/tools/FiltersDropdown.tsx (3)

38-40: Handle empty data list gracefully.

While the styling updates look good, consider short-circuiting or providing a placeholder message when dataList is empty to improve user feedback.

  return (
    dataList.length === 0 ? (
+     <div>No filter options available</div>
    ) : (
      <div
        className={twMerge(
          `max-w-lg flex flex-col max-h-[40vh] gap-1 overflow-y-auto p-2 px-0 duration-200 delay-150 bg-gray-200 ${className}`
        )}
        data-testid='FiltersDropdown-div'
      >
        ...
      </div>
    )
  );

46-53: Improve accessibility by using a semantically interactive element.

It’s recommended to use a <button> or at least add a role="button" to the clickable <div> elements. This ensures proper focus order and keyboard interaction for users relying on assistive technologies.

-<div
+<button
   key={index}
-  className={twMerge(
-    ...
-  )}
-  onClick={(event) => handleClickOption(event, data.name)}
+  role="button"
+  type="button"
+  onClick={(event) => handleClickOption(event, data.name)}
>
  ...
-</div>
+</button>

54-61: Consider text alternatives for icons.

Using images for checked/unchecked states is fine, but ensure meaningful alt text (e.g., “Selected option” and “Unselected option”) to enhance screen-reader support for accessible user experiences.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1903c13 and f501d55.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • components/tools/FiltersDropdown.tsx (3 hunks)
🔇 Additional comments (2)
components/tools/FiltersDropdown.tsx (2)

8-8: Encapsulating props for broader usage.

Exporting the FiltersDropdownProps interface extends its utility across the codebase, promoting reusability and consistency.


29-29: Good practice: capturing mouse event details.

Adding the event parameter allows more control over the user interaction, such as preventing default actions or stopping event propagation where necessary.

@devilkiller-ag
Copy link
Member Author

@akshatnema this PR is ready for review!

@devilkiller-ag
Copy link
Member Author

@akshatnema I have made the following changes:

  • Restricted user to open one filter dropdown at a time
  • Shortened the height of filters dropdown

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
components/tools/FiltersDropdown.tsx (1)

Line range hint 29-34: Consider removing unused event parameter.

The event parameter is added to the function signature but not used within the function body. If it's not needed for future functionality, consider removing it to keep the code clean.

-  const handleClickOption = (event: React.MouseEvent<HTMLDivElement, MouseEvent>, option: string) => {
+  const handleClickOption = (option: string) => {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50ea482 and e4e5a7b.

📒 Files selected for processing (2)
  • components/tools/Filters.tsx (8 hunks)
  • components/tools/FiltersDropdown.tsx (3 hunks)
🧰 Additional context used
🪛 ESLint
components/tools/Filters.tsx

[error] 27-27: Delete ;

(prettier/prettier)


[error] 40-40: Replace OpenedFiltersDropdownType.NONE with ⏎····OpenedFiltersDropdownType.NONE⏎··

(prettier/prettier)


[error] 190-190: Expected '===' and instead saw '=='.

(eqeqeq)


[error] 193-197: Unexpected negated condition.

(no-negated-condition)


[error] 196-196: Insert ;

(prettier/prettier)


[error] 196-197: Missing semicolon.

(semi)


[error] 208-208: Replace ·className={my-auto·${openedFiltersDropown·==·OpenedFiltersDropdownType.LANGUAGE·?·'rotate-180'·:·''}} with ⏎················className={my-auto·${openedFiltersDropown·==·OpenedFiltersDropdownType.LANGUAGE·?·'rotate-180'·:·''}}⏎·············

(prettier/prettier)


[error] 208-208: Expected '===' and instead saw '=='.

(eqeqeq)


[error] 210-210: Expected '===' and instead saw '=='.

(eqeqeq)


[error] 239-243: Unexpected negated condition.

(no-negated-condition)


[error] 242-242: Insert ;

(prettier/prettier)


[error] 242-243: Missing semicolon.

(semi)


[error] 254-254: Replace ·className={my-auto·${openedFiltersDropown·===·OpenedFiltersDropdownType.TECHNOLOGY·?·'rotate-180'·:·''}} with ⏎················className={my-auto·${openedFiltersDropown·===·OpenedFiltersDropdownType.TECHNOLOGY·?·'rotate-180'·:·''}}⏎·············

(prettier/prettier)


[error] 285-289: Unexpected negated condition.

(no-negated-condition)


[error] 288-288: Insert ;

(prettier/prettier)


[error] 288-289: Missing semicolon.

(semi)


[error] 300-300: Replace ·className={my-auto·${openedFiltersDropown·===·OpenedFiltersDropdownType.CATEGORY·?·'rotate-180'·:·''}} with ⏎················className={my-auto·${openedFiltersDropown·===·OpenedFiltersDropdownType.CATEGORY·?·'rotate-180'·:·''}}⏎·············

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/tools/Filters.tsx

[error] 27-27: Delete semicolon


[error] 40-40: Incorrect formatting of OpenedFiltersDropdownType.NONE


[error] 190-190: Expected '===' and instead saw '=='


[error] 193-193: Unexpected negated condition


[error] 196-196: Missing semicolon


[error] 208-208: Incorrect formatting of className and expected '===' instead of '=='


[error] 210-210: Expected '===' and instead saw '=='


[error] 239-239: Unexpected negated condition


[error] 242-242: Missing semicolon


[error] 254-254: Incorrect formatting of className


[error] 285-285: Unexpected negated condition


[error] 288-288: Missing semicolon


[error] 300-300: Incorrect formatting of className

⏰ Context from checks skipped due to timeout of 180000ms (3)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (3)
components/tools/Filters.tsx (1)

22-27: Great improvement in state management!

The introduction of OpenedFiltersDropdownType enum to manage dropdown states is a clean and maintainable solution, replacing multiple boolean states with a single state variable.

Also applies to: 40-40

🧰 Tools
🪛 ESLint

[error] 27-27: Delete ;

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 27-27: Delete semicolon

components/tools/FiltersDropdown.tsx (2)

Line range hint 8-13: LGTM! Well-structured props interface.

The exported interface is well-typed and properly documented, making it reusable for stories and tests.


38-40: Consider accessibility implications of max-height constraint.

The max height constraint of 20vh with overflow scrolling might impact accessibility:

  1. Users with motor impairments might find it difficult to scroll through a small container.
  2. The content might be cut off on smaller screens.

Consider:

  • Using a larger max height on mobile devices
  • Adding keyboard navigation support
  • Ensuring sufficient contrast for the scrollbar

Comment on lines 192 to 198
onClick={() => {
if (openedFiltersDropown !== OpenedFiltersDropdownType.LANGUAGE) {
setOpenedFiltersDropown(OpenedFiltersDropdownType.LANGUAGE);
} else {
setOpenedFiltersDropown(OpenedFiltersDropdownType.NONE)
}
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Refactor repeated dropdown toggle logic.

The dropdown toggle logic is duplicated across three locations. Consider extracting this into a reusable function to improve maintainability and reduce code duplication.

Here's a suggested implementation:

+ const toggleDropdown = (dropdownType: OpenedFiltersDropdownType) => {
+   setOpenedFiltersDropown(
+     openedFiltersDropown === dropdownType
+       ? OpenedFiltersDropdownType.NONE
+       : dropdownType
+   );
+ };

- onClick={() => {
-   if (openedFiltersDropown !== OpenedFiltersDropdownType.LANGUAGE) {
-     setOpenedFiltersDropown(OpenedFiltersDropdownType.LANGUAGE);
-   } else {
-     setOpenedFiltersDropown(OpenedFiltersDropdownType.NONE)
-   }
- }}
+ onClick={() => toggleDropdown(OpenedFiltersDropdownType.LANGUAGE)}

Apply similar changes for Technology and Category dropdowns.

Also applies to: 238-244, 284-290

🧰 Tools
🪛 ESLint

[error] 193-197: Unexpected negated condition.

(no-negated-condition)


[error] 196-196: Insert ;

(prettier/prettier)


[error] 196-197: Missing semicolon.

(semi)

🪛 GitHub Actions: PR testing - if Node project

[error] 193-193: Unexpected negated condition


[error] 196-196: Missing semicolon

@@ -182,9 +187,15 @@
<div className='w-full'>
<div
className={twMerge(
`px-4 py-2 flex justify-between rounded-lg border border-gray-400 w-full bg-gray-200 text-gray-700 shadow text-sm cursor-pointer ${openLanguage ? 'rounded-b-none' : ''}`
`px-4 py-2 flex justify-between rounded-lg border border-gray-400 w-full bg-gray-200 text-gray-700 shadow text-sm cursor-pointer ${openedFiltersDropown == OpenedFiltersDropdownType.LANGUAGE ? 'rounded-b-none' : ''}`
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix code style issues to pass CI checks.

Several code style issues need to be addressed:

  1. Replace loose equality operators (==) with strict equality (===)
  2. Add missing semicolons

Apply these fixes:

- `${openedFiltersDropown == OpenedFiltersDropdownType.LANGUAGE`
+ `${openedFiltersDropown === OpenedFiltersDropdownType.LANGUAGE`

- setOpenedFiltersDropown(OpenedFiltersDropdownType.NONE)
+ setOpenedFiltersDropown(OpenedFiltersDropdownType.NONE);

Also applies to: 208-208, 210-210, 196-196, 242-242, 288-288

🧰 Tools
🪛 ESLint

[error] 190-190: Expected '===' and instead saw '=='.

(eqeqeq)

🪛 GitHub Actions: PR testing - if Node project

[error] 190-190: Expected '===' and instead saw '=='

Comment on lines +46 to +61
return (
<div
key={index}
className={twMerge(
`hover:bg-gray-300 text-black p-1 py-2 gap-1 flex cursor-pointer items-start ${checked ? 'bg-gray-400' : ''}`
)}
onClick={(event) => handleClickOption(event, data.name)}
>
{checked ? (
<img src='/img/illustrations/icons/CheckedIcon.svg' alt='checked' />
) : (
<img src='/img/illustrations/icons/UncheckedIcon.svg' alt='unchecked' />
)}
<div className='-mt-px mb-px text-xs'>{data.name}</div>
</div>
);
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance accessibility and maintainability.

Several improvements could be made to the rendering logic:

  1. Use semantic HTML:
-          <div
+          <button
             key={index}
             className={twMerge(
-              `hover:bg-gray-300 text-black p-1 py-2 gap-1 flex cursor-pointer items-start ${checked ? 'bg-gray-400' : ''}`
+              `hover:bg-gray-300 text-black p-1 py-2 gap-1 flex items-start ${checked ? 'bg-gray-400' : ''}`
             )}
-            onClick={(event) => handleClickOption(event, data.name)}
+            onClick={() => handleClickOption(data.name)}
-          >
+            type="button"
+            aria-pressed={checked}
+          >
  1. Extract icon paths as constants:
const ICON_PATHS = {
  checked: '/img/illustrations/icons/CheckedIcon.svg',
  unchecked: '/img/illustrations/icons/UncheckedIcon.svg'
} as const;
  1. Consider increasing text size for better readability:
-            <div className='-mt-px mb-px text-xs'>{data.name}</div>
+            <div className='-mt-px mb-px text-sm'>{data.name}</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add proper dropdowns to the Filters Select Menu
4 participants