Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,21 @@ const ActionCenterFields = ({
)}
</Flex>
</Flex>
<Flex justify="space-between" wrap="wrap" gap="small">
<MonitorFieldsSearchForm
form={form}
{...formProps}
onFinish={(...args) => {
formProps.onFinish(...args);
resetPagination();
resetListSelect();
}}
availableFilters={{
data_category: availableFilters?.data_category ?? undefined,
}}
shortcutCallback={() => setHotkeysHelperModalOpen(true)}
/>
<Flex gap="small">
<Flex justify="space-between" gap="small">
<div className="grid w-full grid-cols-[1fr,1fr,1fr,auto,auto] grid-rows-2 gap-2 overflow-hidden xl:grid-cols-[max-content,1fr,1fr,1fr,1fr,auto,auto] xl:grid-rows-1">
<MonitorFieldsSearchForm
form={form}
{...formProps}
onFinish={(...args) => {
formProps.onFinish(...args);
resetPagination();
resetListSelect();
}}
availableFilters={{
data_category: availableFilters?.data_category ?? undefined,
}}
shortcutCallback={() => setHotkeysHelperModalOpen(true)}
/>
<Dropdown
onOpenChange={onActionDropdownOpenChange}
menu={{
Expand Down Expand Up @@ -402,7 +402,7 @@ const ActionCenterFields = ({
aria-label="Refresh"
/>
</Tooltip>
</Flex>
</div>
</Flex>
<Flex gap="medium" align="center">
<Checkbox id="select-all" {...checkboxProps} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Flex, Form, Icons, Select, Tooltip } from "fidesui";
import { Button, Form, Icons, Select, Tooltip } from "fidesui";
import { capitalize } from "lodash";

import DataCategorySelect from "~/features/common/dropdown/DataCategorySelect";
Expand Down Expand Up @@ -77,32 +77,25 @@ const MonitorFieldsSearchForm = ({
);

return (
<Form
form={form}
{...formProps}
layout="inline"
className="flex grow gap-2"
>
<Flex className="grow gap-2 self-stretch">
<Form.Item name="search" className="!me-0 self-end">
<SearchInput />
</Form.Item>
<Form form={form} {...formProps} layout="inline" className="contents">
<Form.Item name="search" className="col-span-2 !me-0 xl:col-span-1">
<SearchInput className="!min-w-[200]" />
</Form.Item>

<Tooltip title="Display keyboard shortcuts">
<Button
aria-label="Display keyboard shortcuts"
icon={<Icons.Keyboard />}
onClick={shortcutCallback}
/>
</Tooltip>
</Flex>
<Form.Item name="resource_status" className="!me-0 self-end">
<Tooltip title="Display keyboard shortcuts">
<Button
aria-label="Display keyboard shortcuts"
icon={<Icons.Keyboard />}
onClick={shortcutCallback}
className="col-span-3 xl:col-span-1"
/>
</Tooltip>
<Form.Item name="resource_status" className="!me-0">
<Select
options={RESOURCE_STATUS_OPTIONS.map((resourceStatus) => ({
value: resourceStatus,
label: resourceStatus,
}))}
className="!w-[200px]"
placeholder="Status"
allowClear
aria-label="Filter by status"
Expand All @@ -111,13 +104,12 @@ const MonitorFieldsSearchForm = ({
/>
</Form.Item>

<Form.Item name="confidence_bucket" className="!me-0 self-end">
<Form.Item name="confidence_bucket" className="!me-0">
<Select
options={CONFIDENCE_BUCKETS.map((confidenceBucket) => ({
value: confidenceBucket,
label: capitalize(confidenceBucket),
}))}
className="!w-[200px]"
placeholder="Confidence"
allowClear
aria-label="Filter by confidence score"
Expand All @@ -126,16 +118,17 @@ const MonitorFieldsSearchForm = ({
/>
</Form.Item>

<Form.Item name="data_category" className="!me-0 self-end">
<Form.Item name="data_category" className="!me-0 overflow-hidden">
<DataCategorySelect
className="!w-[200px]"
rootClassName="overflow-hidden"
variant="outlined"
allowClear
maxTagCount="responsive"
placeholder="Data categories"
mode="multiple"
options={options}
autoFocus={false}
popupMatchSelectWidth={false}
/>
</Form.Item>
</Form>
Expand Down
Loading