Skip to content

[PB-6258] feat: add attachments type filter to global search - #2070

Open
victor-ferro wants to merge 5 commits into
PB-6258-search-filters-sdkfrom
PB-6258-search-type-filter
Open

[PB-6258] feat: add attachments type filter to global search#2070
victor-ferro wants to merge 5 commits into
PB-6258-search-filters-sdkfrom
PB-6258-search-type-filter

Conversation

@victor-ferro

Copy link
Copy Markdown

Description

Part 2/4 of the PB-6258 stack. Adds the "Attachments" pill with a per-category checkbox dropdown, per Figma: "Any type" means no type param is sent, selecting every category normalizes back to it, and a subset shows the indeterminate mark. A second commit exposes the remaining backend categories (txt, code, csv, xml, figma) beyond the 9 in Figma — pending design sign-off, isolated so it can be dropped if rejected. Includes i18n for the 8 locales.

Blocked by internxt/sdk#429 (see base PR #2069).

Related Issues

Relates to PB-6258 (JIRA).

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Manual browser testing against the local backend: category toggles issue the expected repeated type= params, "Any type" drops the param, deselecting the last category restores it, and focus returns to the search input when the dropdown closes.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 89fb69e
Status: ✅  Deploy successful!
Preview URL: https://d840e666.drive-web.pages.dev
Branch Preview URL: https://pb-6258-search-type-filter.drive-web.pages.dev

View logs

@victor-ferro
victor-ferro marked this pull request as ready for review July 29, 2026 14:42

@CandelR CandelR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @victor-ferro , I don’t find the way the attachments filter works very intuitive at all.
The fact that selecting ‘Any Type’ selects all the items, but clicking it again doesn’t deselect them all, seems like a poorly implemented ‘Select All’ function. Nor do I find it very intuitive that deselecting the last specific filter selects everything, including the ‘any type’ option.
We should discuss this with the design team, as I don’t think it’s been properly thought through

Comment on lines +50 to +64
<div className="flex flex-row items-center gap-2 px-4 py-2">
<Checkbox checked={isAnyType} indeterminate={!isAnyType} onClick={onSelectAny} />
<p className="text-gray-100">{translate('general.searchBar.filters.anyType')}</p>
</div>
<div className="mx-4 border-t border-gray-10" />
{TYPE_FILTER_ITEMS.map(({ id, labelKey, extension }) => {
const Icon = iconService.getItemIcon(id === 'folder', extension);
return (
<div className="flex flex-row items-center gap-2 px-4 py-2" key={id}>
<Checkbox checked={isAnyType || selected.includes(id)} onClick={() => onToggle(id)} />
<Icon className="h-6 w-6 drop-shadow-soft" />
<p className="text-gray-100">{translate(`general.searchBar.filters.${labelKey}`)}</p>
</div>
);
})}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would make clickable all the row instead only the checkbox, ask to designer if have doubts

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@victor-ferro victor-ferro self-assigned this Jul 31, 2026
@victor-ferro

Copy link
Copy Markdown
Author

Okay @CandelR , I'll talk to the design team about this. It also seemed a bit odd to me, but the requirements said that no type filter is applied if all types are selected — therefore, applying no filter is the same as having them all selected. And if, after clicking "any type", you click on a specific type, only that type gets selected. As I said, I'll bring it up with the design team and share this rather unintuitive behaviour with them.

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants