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/clin 2989 #539

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Feat/clin 2989 #539

merged 3 commits into from
Oct 15, 2024

Conversation

claudia1296
Copy link
Contributor

#FEAT : Flag Filter

  • closes #TICKET_NUMBER

Description

  • Finalisation du component flagfilter
  • Ajout "filterQueryToIgnore" dans querybuilder pour enlever les queries de filtre dans le querybuilder

JIRA LINK

Acceptance Criterias

Validation

  • Storybook add or modified
  • version Update in package.json and Release.md
  • Code Approved
  • QA Done
  • Design/UI Approved from design

Screenshot

Before

After

image

QA

Copy link

github-actions bot commented Oct 11, 2024

Coverage report for packages/ui

St.
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

0 tests passing in 0 suite.

Report generated by 🧪jest coverage report action from 42e2fd9

Copy link

github-actions bot commented Oct 11, 2024

Project Coverage and Test

Statements : 33.62% ( 10580/31461 )
Branches : 54.6% ( 616/1128 )
Functions : 31.82% ( 197/619 )
Lines : 33.62% ( 10580/31461 )

Test Suites: 58 passed, 58 total
Tests: 262 passed, 262 total
Snapshots: 0 total
Time: 87.102 s
Ran all test suites.

@claudia1296 claudia1296 requested review from emmanuelnau and removed request for dtremblay-sher October 11, 2024 17:42
const hasEmptyQuery = emptyQueries.length >= 1;
const getQueryIndexById = (id: string) => queriesState.queries.findIndex((obj) => obj.id === id);
const getQueryIndexById = (id: string) => queryStateQueriesWithoutFilter.findIndex((obj) => obj.id === id);
const canCombine =
Copy link
Contributor

Choose a reason for hiding this comment

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

Je sais pas si queryStateQueriesWithoutFilter est un gros tableau, mais c'est dommage de le parcourir 2 fois pour setter emptyQueries et canCombine. Je pense qu'il est possible de le parcourir une seule fois et setter les deux ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

Je pense même qu'il est possible de profiter de son iteration pour créé le query bar à la fin et éviter le map ^^

if (!filterQueryToIgnore?.includes(((c as IValueFilter).content as IValueContent).field)) {
toRemove = true;
}
if (Array.isArray((c as IValueFilter).content)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ici le toRemove = false est utile que si toRemove = true non ?
Du coup je pense qu'il peut être mis dans la condition

Copy link
Contributor

@emmanuelnau emmanuelnau left a comment

Choose a reason for hiding this comment

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

C'est ok pour moi (avec des commentaires d'optimisations ;) )

@claudia1296 claudia1296 merged commit 4335ba8 into master Oct 15, 2024
7 checks passed
@claudia1296 claudia1296 deleted the feat/clin-2989 branch October 15, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants