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: Filter improvements #1345

Merged
merged 11 commits into from
Oct 24, 2023
Merged

feat: Filter improvements #1345

merged 11 commits into from
Oct 24, 2023

Conversation

ncomerci
Copy link
Contributor

This closes #1301

@ncomerci ncomerci requested review from 1emu and andyesp October 18, 2023 17:19
@andyesp andyesp temporarily deployed to governance-pr-1345 October 18, 2023 17:35 Inactive
Comment on lines 61 to 70
<Link
{...props}
href={props.href || undefined}
className={classNames(
'CategoryOption',
`CategoryOption--${type}`,
active && 'CategoryOption--active',
className
)}
>
Copy link
Member

Choose a reason for hiding this comment

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

You can move this to a new component to reuse in CategoryOption, GroupedCategoryOption and GrantMultiCategory.

    <>
      <Link
        {...props}
        href={props.href || undefined}
        onClick={onClick}
        className={classNames(
          'CategoryOption',
          `CategoryOption--${type}`,
          active && 'CategoryOption--active',
          className
        )}
      >
        <span className="CategoryOption__TitleContainer">
          <span>
            {icon}
            <Text className="CategoryOption__Title">{title}</Text>
          </span>
        </span>
        {isNumber(count) && (
          <span className={classNames('CategoryOption__Counter', active && 'CategoryOption__Counter--active')}>
            {count}
          </span>
        )}
      </Link>
      {subcategories && (
        <div
          className={classNames(
            'CategoryOption__Subcategories',
            `CategoryOption__Subcategories--${type}`,
            isSubcategoriesExpanded && 'CategoryOption__Subcategories--active'
          )}
        >
          {subcategories}
        </div>
      )}
    </>

Maybe we can do something to add the subcategory component there too. But in the mean time you could also extract that into a "SubcategoryItem"

<Link
  className={classNames(
    'CategoryOption__SubcategoryItem',
    isActive && 'CategoryOption__SubcategoryItem--active'
  )}
  href={href}
>
  <SubItem />
  {title}
</Link>

src/entities/Proposal/outcome.ts Outdated Show resolved Hide resolved
src/entities/Proposal/types.ts Outdated Show resolved Hide resolved
@yemel yemel had a problem deploying to governance-pr-1345 October 20, 2023 22:32 Failure
@yemel yemel temporarily deployed to governance-pr-1345 October 20, 2023 23:23 Inactive
@ginocingolani
Copy link
Member

@ncomerci Comments:

  • Implementation category should be named Governance Process
  • The order of the categories with dropdowns should be Governance Process, Grants, B&T
  • Not 100% related but since you're touching that part od the codebase: Replace "OOB" for "Out of Budget" on the Outcomes section

@yemel yemel temporarily deployed to governance-pr-1345 October 23, 2023 15:04 Inactive
@yemel yemel temporarily deployed to governance-pr-1345 October 23, 2023 15:34 Inactive
src/components/Search/CategoryFilter.tsx Outdated Show resolved Hide resolved
src/components/Search/CategoryFilter.tsx Outdated Show resolved Hide resolved
src/components/Category/CategoryOption.tsx Show resolved Hide resolved
@yemel yemel temporarily deployed to governance-pr-1345 October 24, 2023 18:26 Inactive
@ncomerci ncomerci merged commit 3768788 into master Oct 24, 2023
1 check passed
@ncomerci ncomerci deleted the feat/1301-filter-improvements branch October 24, 2023 19:15
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.

Filtering improvements
5 participants