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

icon picker modal #2908

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

icon picker modal #2908

wants to merge 7 commits into from

Conversation

youssefezzahi96
Copy link
Contributor

ticket
purpose: create icon picker modal
result:
storybook chromatic: https://6622682e70ecd8ecf5027fa1-asvmsschwg.chromatic.com/

@youssefezzahi96 youssefezzahi96 requested a review from a team January 7, 2025 02:30
@youssefezzahi96 youssefezzahi96 self-assigned this Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 63.38028% with 26 lines in your changes missing coverage. Please review.

Project coverage is 93.10%. Comparing base (d22ecc2) to head (fe1266a).
Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
...components/src/molecule/icon-picker-modal/index.js 51.85% 26 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2908      +/-   ##
==========================================
- Coverage   93.44%   93.10%   -0.34%     
==========================================
  Files         414      416       +2     
  Lines        6436     6501      +65     
  Branches      438      439       +1     
==========================================
+ Hits         6014     6053      +39     
- Misses        341      367      +26     
  Partials       81       81              
Files with missing lines Coverage Δ
...rpacademy-components/src/atom/select-icon/index.js 100.00% <100.00%> (ø)
...cademy-components/src/molecule/base-modal/index.js 88.23% <100.00%> (ø)
...s/@coorpacademy-components/src/variables/colors.ts 100.00% <ø> (ø)
...components/src/molecule/icon-picker-modal/index.js 51.85% <51.85%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72a6ea4...fe1266a. Read the comment docs.

import classnames from 'classnames';
import FaIcon from '../icon';

// eslint-disable-next-line css-modules/no-unused-class
Copy link
Member

Choose a reason for hiding this comment

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

inutile

import FaIcon from '../icon';

// eslint-disable-next-line css-modules/no-unused-class
import {COLORS} from '../../variables/colors';
Copy link
Member

Choose a reason for hiding this comment

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

ajoute le white ici pour pouvoir faire un COLOR.white et pas #ffffff en dessous

const ICON_COLOR = COLORS.cm_primary_blue;
const CHECK_ICON_NAME_MAP = {
single: 'circle-check',
multi: 'square-check'
Copy link
Member

Choose a reason for hiding this comment

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

quel est l'application du multi check ? je ne le trouve pas das les design de werner


const {selectionMode, iconColor = ICON_COLOR} = options;

const isSelected = selectionMode === 'single' || selectionMode === 'multi';
Copy link
Member

Choose a reason for hiding this comment

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

weird comme logic: tu definit isSelected sur le mode de selection.

Ds un scenario real le mode de selection peut etre set sans qu'un item soit selectonné

De plus le mode de selection multiple, je ne vois pas l'interet mais c'est un autre pb...

tu devrais plutot avoir un truc comme ca : à minima. ou etre plus explicit sur ton intend here
const isSelected = options.isSelected ?? (selectionMode === 'single' || selectionMode === 'multi');

Copy link
Member

Choose a reason for hiding this comment

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

isSelected est mm pas destructuré des options ici ... il devrait l'etre et default à false je pense.

@youssefezzahi96 youssefezzahi96 force-pushed the CLXP-200-icon-picker-modal branch from 17309cf to fe1266a Compare January 7, 2025 10:06
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