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

Added dynamic icons to filters in tools page[Closes #1260] #1309

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reverting changes
bhat-shubham committed Jan 23, 2025

Verified

This commit was signed with the committer’s verified signature.
commit 42f75f247db45fa098e915b9cd807b7863b71547
2 changes: 1 addition & 1 deletion _includes/community
Copy link
Member

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?

Copy link
Contributor Author

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.


Unchanged files with check annotations Beta

import DropdownMenu from './ui/DropdownMenu';
import Checkbox from './ui/Checkbox';
import SearchBar from './SearchBar';
import FilterIcon from '~/public/icons/filter.svg';

Check failure on line 10 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

'FilterIcon' is defined but never used
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'],

Check failure on line 62 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

Replace `.getAll('drafts')` with `⏎··········.getAll('drafts')⏎··········`
toolingTypes: formData.getAll('toolingTypes').map((value) => value as string),

Check failure on line 63 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

Replace `.getAll('toolingTypes')` with `⏎··········.getAll('toolingTypes')⏎··········`
environments: formData.getAll('environments').map((value) => value as string),

Check failure on line 64 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

Replace `.getAll('environments')` with `⏎··········.getAll('environments')⏎··········`
showObsolete:
(formData.get('showObsolete') as string) === 'showObsolete' ? 'true' : 'false',

Check failure on line 66 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

Replace `·?·'true'` with `⏎············?·'true'⏎···········`
} satisfies Transform;
postAnalytics({ eventType: 'query', eventPayload: newTransform });
return newTransform;
resetTransform();
setIsSidebarOpen((prev) => !prev);
};
const { resolvedTheme } = useTheme();

Check failure on line 81 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

'resolvedTheme' is assigned a value but never used
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];

Check failure on line 89 in pages/tools/components/Sidebar.tsx

GitHub Actions / Code Quality Checks

Replace `·filterIcons[accessorKey·as·keyof·typeof·filterIcons];·` with `⏎············filterIcons[accessorKey·as·keyof·typeof·filterIcons];`
return (
<DropdownMenu
key={accessorKey}