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

[CO-1748] Settings filter #755

Draft
wants to merge 41 commits into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1b42ce9
refator: moved inputs of filter action
FrancescoGottardi Dec 12, 2024
48be72a
refactor: splitting filter action row in multiple sub components
FrancescoGottardi Dec 13, 2024
2768e46
refactor: splitting filter action row in multiple sub components
FrancescoGottardi Dec 13, 2024
30b427e
test: check initialvalue of move-to-folder input is set correctly
frisonisland Dec 13, 2024
98a414b
refactor: pass tempActions to move-to-folder.tsx
frisonisland Dec 13, 2024
85b7646
test: move to folder test fix
FrancescoGottardi Dec 13, 2024
3c6a5e8
test: added filter action tests
FrancescoGottardi Dec 13, 2024
ad3bd24
test: redirect-to.test.tsx
frisonisland Dec 13, 2024
a64dd20
refactor: show tag tests and tipization changes
FrancescoGottardi Dec 16, 2024
bc665af
test: show tag and create filter modals tests update
FrancescoGottardi Dec 16, 2024
f23715d
fix: deprecated iconButton removal
FrancescoGottardi Dec 16, 2024
5a0e5ed
fix: deprecated iconButton removal
FrancescoGottardi Dec 16, 2024
339b03e
fix: styled component no more needed
FrancescoGottardi Dec 16, 2024
6586c84
tests: filter actions row tests
FrancescoGottardi Dec 16, 2024
dac9706
test: update test in filter-actions-rows.test.tsx
frisonisland Dec 17, 2024
5b3aee9
test: create-filter-modal.test.tsx update test names to make them mor…
frisonisland Dec 17, 2024
d355057
test: add specific test for "Active filter"
frisonisland Dec 17, 2024
32b740c
test: re-organize create-filter-modal.test.tsx
frisonisland Dec 17, 2024
35129a3
test: add test to check API call made to mailbox
frisonisland Dec 17, 2024
fa11813
test: add other API tests for create-filter-modal.test.tsx
frisonisland Dec 17, 2024
e3473f7
test: add test for redirect-to and mark-as
frisonisland Dec 17, 2024
09bd3db
test: add test for filter with from condition
frisonisland Dec 17, 2024
66624a0
WIP: create filter modal and inner components tests
FrancescoGottardi Dec 17, 2024
5df5645
WIP: create filter modal and inner components tests
FrancescoGottardi Dec 17, 2024
485e979
FIX: filter tag add the chip with the correct color
FrancescoGottardi Dec 17, 2024
8bbac04
refactor: moved customcomponent of tag and unpdated relative tests
FrancescoGottardi Dec 18, 2024
b9ef352
REFACTOR: converting filter parts utils to ts
FrancescoGottardi Dec 18, 2024
87435f7
WIP(utils): add types in utils.ts. Some of them are incompatible
frisonisland Dec 18, 2024
df11ce4
WIP(mark-as): extract mark as option type and update tests
frisonisland Dec 18, 2024
87d3f10
fix(utils): fix remaining type check.
frisonisland Dec 18, 2024
411e550
fix(filter-tags): add tests to check on default color + add test for …
frisonisland Dec 18, 2024
817ec00
test: filter-action-rows.tsx check when actionTag selected but no val…
frisonisland Dec 18, 2024
804d624
refactor: move tag option color fallback logic in show-tag
frisonisland Dec 18, 2024
3630f2f
test: test rendering of Discard option
frisonisland Dec 18, 2024
99ba2cf
TEST: filter action row tests related to FeatureMailForwardingInFilte…
FrancescoGottardi Dec 18, 2024
35a5c6f
TEST: add/remove tag from tag action
FrancescoGottardi Dec 18, 2024
a4e3db9
test: add tests on discard and changing action
frisonisland Dec 18, 2024
24d257d
test(show-tag): assert visibility
frisonisland Dec 18, 2024
8d4c256
chore: remove setDestination commented code
frisonisland Dec 18, 2024
60978bd
Merge branch 'devel' into CO-1748_settings_filter
frisonisland Dec 18, 2024
f574b0c
test: add test on move to folder action at filter-actions-rows.test.tsx
frisonisland Dec 18, 2024
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
9 changes: 9 additions & 0 deletions src/types/filters/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { ChipProps } from '@zextras/carbonio-design-system';

export type FilterTest = Record<string, string | Array<any>>;
Expand Down Expand Up @@ -94,3 +95,11 @@ export type FilterActions = {
}
];
};
export type MarkAsOption = {
label: string;
value: { actionFlag: { flagName: string }[] };
};
export type MailFilterTag = {
label: string;
color?: number;
};
4 changes: 2 additions & 2 deletions src/views/settings/filters/parts/create-filter-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { v4 as uuidv4 } from 'uuid';
import { CreateFilterContext } from './create-filter-context';
import ModalFooter from './create-filter-modal-footer';
import DefaultCondition from './create-filters-conditions/default';
import FilterTestConditionRow from './filter-test-condition-row';
import FilterConditionsPanel from './filter-conditions-panel';
import FilterActionConditions from './new-filter-action-conditions';
import { getButtonInfo } from './utils';
import ModalHeader from '../../../../carbonio-ui-commons/components/modals/modal-header';
Expand Down Expand Up @@ -196,7 +196,7 @@ const CreateFilterModal: FC<ComponentProps> = ({
maxWidth="100%"
width="100%"
>
<FilterTestConditionRow compProps={filterTestConditionRowProps} />
<FilterConditionsPanel compProps={filterTestConditionRowProps} />
<Padding top="medium" />
<Divider />
<FilterActionConditions compProps={filterActionProps} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { map, omit, reduce } from 'lodash';
import { CreateFilterContext } from './create-filter-context';
import ModalFooter from './create-filter-modal-footer';
import DefaultCondition from './create-filters-conditions/default';
import FilterTestConditionRow from './filter-test-condition-row';
import FilterConditionsPanel from './filter-conditions-panel';
import FilterActionConditions from './new-filter-action-conditions';
import { getButtonInfo } from './utils';
import ModalHeader from '../../../../carbonio-ui-commons/components/modals/modal-header';
Expand Down Expand Up @@ -203,7 +203,7 @@ const CreateOutgoingFilterModal: FC<ComponentProps> = ({
maxWidth="100%"
width="100%"
>
<FilterTestConditionRow compProps={filterTestConditionRowProps} />
<FilterConditionsPanel compProps={filterTestConditionRowProps} />
<Padding top="medium" />
<Divider />
<FilterActionConditions compProps={filterActionProps} />
Expand Down
4 changes: 3 additions & 1 deletion src/views/settings/filters/parts/custom-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { FC, ReactElement, useMemo } from 'react';

import { Row, Select, Text, Padding, Icon, Container } from '@zextras/carbonio-design-system';
import { map } from 'lodash';

import {
ColorContainer,
TextUpperCase
Expand Down Expand Up @@ -80,7 +82,7 @@ const getItems = (items: Array<{ label: string; value: any }>): GetItemsReturnTy

const CustomSelect: FC<{
onChange: (arg: any) => void;
defaultSelection: { label: string; value: any };
defaultSelection?: { label: string; value: any };
label: string;
items: Array<{ label: string; value: any }>;
background?: string;
Expand Down
Loading