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

refactor(cc-orga-member-list)!: rework properties to avoid impossible #1306

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

Conversation

florian-sanders-cc
Copy link
Contributor

@florian-sanders-cc florian-sanders-cc commented Jan 17, 2025

Fixes #1164

What does this PR do?

  • Migrates the cc-orga-member-list component to the new state API.

How to review?

  • Check the commit,
  • Check the preview vs prod stories,
  • Run locally and check demo-smart to see if all features still work properly,
  • 3 reviewers would be nice (breaking change + smart impact, better safe than sorry).

@florian-sanders-cc florian-sanders-cc added the breaking-change Something that will required a major semver release label Jan 17, 2025
@florian-sanders-cc florian-sanders-cc self-assigned this Jan 17, 2025
Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/cc-orga-member/migrate-to-new-state/index.html.

This preview will be deleted once this PR is closed.

Copy link
Member

@roberttran-cc roberttran-cc left a comment

Choose a reason for hiding this comment

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

Perfect!

I don't know if it is the right place but maybe we could take the opportunity to factorize the Authorisations interface that is duplicated between src/components/cc-orga-member-card/cc-orga-member-card.types.d.ts and src/components/cc-orga-member-list/cc-orga-member-list.types.d.ts.

interface Authorisations {
  invite: boolean;
  edit: boolean;
  delete: boolean;
}

Copy link
Contributor

@HeleneAmouzou HeleneAmouzou left a comment

Choose a reason for hiding this comment

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

LGTM ! 👏

Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

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

LGTM. Well done Florian.

… states

BREAKING CHANGE: the properties have changed
- `member` property has been renamed to `state`,
- `member.state` property has been renamed to `state.type`.
… states

BREAKING CHANGE: the properties have changed
- `members` property has been renamed to `memberListState`,
- `members.state` property has been renamed to `memberListState.type`,
- `members.value` property has been renamed to
  `memberListState.memberList`,
- same logic applies to `memberList` items where:
  - `member` has been renamed to `state`,
  - `member.state` has been renamed to `state.type`.

Fixes #1164
@florian-sanders-cc florian-sanders-cc force-pushed the cc-orga-member/migrate-to-new-state branch from 898812e to 3bfd2db Compare January 24, 2025 11:37
@florian-sanders-cc florian-sanders-cc changed the title [BREAKING CHANGE: do not merge yet] refactor(cc-orga-member-list)!: rework properties to avoid impossible refactor(cc-orga-member-list)!: rework properties to avoid impossible Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Something that will required a major semver release do-not-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cc-orga-member-*: migrate to the new state API
4 participants