-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Added dynamic icons to filters in tools page[Closes #1260] #1309
Open
bhat-shubham
wants to merge
16
commits into
json-schema-org:main
Choose a base branch
from
bhat-shubham:added_dynamic_icons_to_filter_in_tools_page
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+28
−4
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
723fe15
added dynamic icons to the filter in tools page
bhat-shubham 02ac24c
added dynamic icons to the filter in tools page
bhat-shubham 63d02df
added dynamic icons to the filter in tools page
bhat-shubham 8b5c652
added dynamic icons to the filter in tools page
bhat-shubham b41272d
added dynamic icons to the filter in tools page
bhat-shubham 8e903d7
to save before switching
bhat-shubham 3ff4de1
added proper icons to each filter on tools page
bhat-shubham 1a79e9c
Revert "added dynamic icons to the filter in tools page"
bhat-shubham 1641011
Revert "added dynamic icons to the filter in tools page"
bhat-shubham 7b8c534
Revert "to save before switching"
bhat-shubham 42f75f2
reverting changes
bhat-shubham 71bdeca
reverting the changes in sublodules
bhat-shubham bd07ca3
revert submodule changes
bhat-shubham c90a0a4
fixed prettier errors
bhat-shubham 14232ce
Merge branch 'main' into added_dynamic_icons_to_filter_in_tools_page
benjagm a111362
Removed Irrelevant Icon Check
bhat-shubham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
reverting changes
commit 42f75f247db45fa098e915b9cd807b7863b71547
There are no files selected for viewing
Submodule community
updated
5 files
Unchanged files with check annotations Beta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DropdownMenu from './ui/DropdownMenu'; | ||
import Checkbox from './ui/Checkbox'; | ||
import SearchBar from './SearchBar'; | ||
import FilterIcon from '~/public/icons/filter.svg'; | ||
import toTitleCase from '../lib/toTitleCase'; | ||
import type { Transform } from '../hooks/useToolsTransform'; | ||
import type { FilterCriteriaFields } from '../index.page'; | ||
groupBy: prev.groupBy || 'toolingTypes', | ||
languages: formData.getAll('languages').map((value) => value as string), | ||
licenses: formData.getAll('licenses').map((value) => value as string), | ||
drafts: formData.getAll('drafts').map((value) => value) as Transform['drafts'], | ||
toolingTypes: formData.getAll('toolingTypes').map((value) => value as string), | ||
environments: formData.getAll('environments').map((value) => value as string), | ||
showObsolete: | ||
(formData.get('showObsolete') as string) === 'showObsolete' ? 'true' : 'false', | ||
} satisfies Transform; | ||
postAnalytics({ eventType: 'query', eventPayload: newTransform }); | ||
return newTransform; | ||
resetTransform(); | ||
setIsSidebarOpen((prev) => !prev); | ||
}; | ||
const { resolvedTheme } = useTheme(); | ||
return ( | ||
<div className='pb-4 top-12 mx-auto lg:ml-4 lg:mt-8 w-4/5 h-fit'> | ||
<SearchBar transform={transform} /> | ||
{filters.map(({ label, accessorKey }) => { | ||
const checkedValues = transform[accessorKey as keyof Transform] || []; | ||
const IconComponent = filterIcons[accessorKey as keyof typeof filterIcons]; | ||
return ( | ||
<DropdownMenu | ||
key={accessorKey} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert the changes in the community submodule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i have reverted The Changes.