[PB-6258] feat: add attachments type filter to global search - #2070
[PB-6258] feat: add attachments type filter to global search#2070victor-ferro wants to merge 5 commits into
Conversation
Deploying drive-web with
|
| 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 |
ec16922 to
04906d6
Compare
CandelR
left a comment
There was a problem hiding this comment.
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
| <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> | ||
| ); | ||
| })} |
There was a problem hiding this comment.
I would make clickable all the row instead only the checkbox, ask to designer if have doubts
|
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. |
|



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
typeparam 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
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.