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: codemode to enable-v12-structured-list-visible-icons #18615

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Feb 18, 2025

Closes #18351

codemode updates selectable StructuredList components with new v12 selection structuredList
Added messageConfig option to display post run message if migration provides

It does the following

  • Replaces checkmark icons with radio buttons (by adding selection prop to all StructuredListRow)

  • Identifies StructuredListWrapper components with the selection prop and adds selection prop to all children StructuredListRow

  • Checks if the last StructuredListRow has checkmark icon and removes the cell

          Before migration:
        <StructuredListWrapper selection>
          <StructuredListRow>         --------------------------------------> selection prop will be added here
            <StructuredListCell>Content</StructuredListCell>
            <StructuredListCell><CheckmarkFilled /></StructuredListCell>--->cell with CheckmarkFilled will be removed 
          </StructuredListRow>
        </StructuredListWrapper>
    
      After migration:
        <StructuredListWrapper selection>
          <StructuredListRow selection>
            <StructuredListCell>Content</StructuredListCell>
          </StructuredListRow>
        </StructuredListWrapper>
    

Changelog

New

Added enable-v12-structured-list-visible-icons codemode
Updated test fixtures for the same

Testing / Reviewing

  1. Run yarn install and yarn build at root
  2. run the codemod via below command
  3. npx @carbon/upgrade migrate enable-v12-structured-list-visible-icons --write
  4. verify the a message is seen in console instructing users to turn on the flag in Saas
  5. run react storybook in your local
    cd packages/react
    yarn storybook
    and verify the changes made after running the codemode makes the deafult structuredlist--selection look similar to its feature-flag version

Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 5b3aa0a
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67bf14b10db31e00081465d1
😎 Deploy Preview https://deploy-preview-18615--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5b3aa0a
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67bf14b13bf87900081ea5e5
😎 Deploy Preview https://deploy-preview-18615--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 5b3aa0a
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67bf14b120680200094cfd01
😎 Deploy Preview https://deploy-preview-18615--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 84.26%. Comparing base (84fd364) to head (5b3aa0a).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
packages/upgrade/src/commands/migrate.js 0.00% 7 Missing and 1 partial ⚠️
packages/upgrade/src/upgrades.js 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18615      +/-   ##
==========================================
- Coverage   84.97%   84.26%   -0.72%     
==========================================
  Files         408      408              
  Lines       14543    14659     +116     
  Branches     4765     4795      +30     
==========================================
- Hits        12358    12352       -6     
- Misses       2023     2143     +120     
- Partials      162      164       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@2nikhiltom 2nikhiltom marked this pull request as ready for review February 19, 2025 11:39
@2nikhiltom 2nikhiltom requested review from a team as code owners February 19, 2025 11:40
riddhybansal

This comment was marked as resolved.

@riddhybansal riddhybansal self-requested a review February 20, 2025 13:27
Copy link
Contributor

@riddhybansal riddhybansal left a comment

Choose a reason for hiding this comment

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

After long discussion about this PR with @2nikhiltom I got my confusions cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Research/Write codemod for enable-v12-structured-list-visible-icons
3 participants