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(structuredList): update to use radio button icon, radios are left aligned under featureflag #15910

Merged

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Mar 7, 2024

Closes #15479 & #15931

New

  • Icons will always be visible at the start of every row by default
  • Adds new Saas flag : "enable-v12-structured-list-visible-icons"
  • Adds focus ring around the row : on click

Changed

  • Unselected/Unchecked icons are always visible at the start of every row
  • Checked/selected icon is visible only when a row is selected
  • Icons are changed : checkmarks to radio icons

Testing / Reviewing

  • Verify Unselected/Unchecked icons are visible on every row
  • Verify Selected/Checked icons is visible only when a row is selected

Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1026137
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65e99d32a5ed8300089b708d
😎 Deploy Preview https://deploy-preview-15910--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

netlify bot commented Mar 7, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e981ded
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65e99dba1531a1000826ff26
😎 Deploy Preview https://deploy-preview-15910--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

netlify bot commented Mar 7, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 4fa3572
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6602fc674b31c50008ccc17f
😎 Deploy Preview https://deploy-preview-15910--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.

@2nikhiltom 2nikhiltom marked this pull request as ready for review March 7, 2024 12:34
@2nikhiltom 2nikhiltom requested a review from a team as a code owner March 7, 2024 12:34
@2nikhiltom
Copy link
Contributor Author

Hey @Kritvi-bhatia17 : Can I get your design review on this .

@Kritvi-bhatia17
Copy link
Contributor

Kritvi-bhatia17 commented Mar 7, 2024

Hey @Kritvi-bhatia17 : Can I get your design review on this .

Yes! sure @2nikhiltom will do that

@2nikhiltom 2nikhiltom marked this pull request as ready for review March 7, 2024 14:41
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Feature flags should be used to modify component source code. The feature flag stories for that component would then show the result of the flag being turned on and the modified behavior of the component source code.

Is the current checkmark functionality built into any of the components' source, or does it require the consumer to compose the checkmark into the proper location within StructredListCell?

If it's already on the consumer to compose this properly, we wouldn't need a feature flag. We could just update the existing stories to show the new icon being used on the right.

Copy link
Contributor

@Kritvi-bhatia17 Kritvi-bhatia17 left a comment

Choose a reason for hiding this comment

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

Looks good to me from design perspective!!
Nice work @2nikhiltom 🔥

Copy link
Contributor

@Kritvi-bhatia17 Kritvi-bhatia17 left a comment

Choose a reason for hiding this comment

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

Hii @2nikhiltom! after speaking with @laurenmrice , I realized that we need to add a prop for both with and without background options under the 'Structured Lists' section for both 'Default' and 'Selection'.

@2nikhiltom 2nikhiltom marked this pull request as draft March 11, 2024 19:29
@tay1orjones
Copy link
Member

tay1orjones commented Mar 12, 2024

I just pushed an update here that adds the feature flag to modify the styling, and also added a new selection prop to StructuredListRow that will handle adding the radio button icon on the left.

One piece remaining is to ensure the blue focus ring is applied to the row on click in addition to on keyboard navigation. Keyboard nav already gets the focus ring, so I think it might be just a change in how we apply focus styling

@tay1orjones
Copy link
Member

@2nikhiltom I think I got the focus ring working actually, take a look and let me know what you think

@tay1orjones
Copy link
Member

The PublicAPI snapshot is failing, just needs a yarn test -u and push up the changes

@2nikhiltom 2nikhiltom requested a review from a team as a code owner March 20, 2024 16:49
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

This is looking great, just a couple things to change and I think this will be good to go.

@2nikhiltom
Copy link
Contributor Author

Hey @tay1orjones , thanks for the review.
I have made suggested changes and few other changes to ensure rows receive focus only when selection is enabled, eliminating focus rings on default stories.

@2nikhiltom 2nikhiltom requested a review from tay1orjones March 21, 2024 08:45
@2nikhiltom
Copy link
Contributor Author

The PublicAPI snapshot is failing, just needs a yarn test -u and push up the changes

Hey @tay1orjones , @andreancardona : it seems like the problem is still there even after running "yarn test -u" and pushing changes. Any ideas on what might be missing?

@tay1orjones
Copy link
Member

@2nikhiltom based on the logs, it was failing on a snapshot change unrelated to the changes you made here. Generally that signals that the PR needs to be updated with the latest from main and then the snapshots updated again.

I pressed the "update with latest" button on the PR interface here, pulled down the PR locally, ran yarn, yarn build, and yarn test -u which resulted in two snapshot changes. I pushed them up - I think this should resolve the CI failures.

@tay1orjones
Copy link
Member

@Kritvi-bhatia17 @andreancardona this is ready for your review

Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

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

looks good to me - nice job @2nikhiltom !

Copy link
Contributor

@Kritvi-bhatia17 Kritvi-bhatia17 left a comment

Choose a reason for hiding this comment

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

Great work Nikhil!! 🔥

@tay1orjones tay1orjones added this pull request to the merge queue Mar 27, 2024
Merged via the queue into carbon-design-system:main with commit b9abee7 Mar 27, 2024
20 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.54.0 was just released that references this issue/PR.

preetibansalui pushed a commit to tay1orjones/carbon that referenced this pull request Apr 24, 2024
…t aligned under featureflag (carbon-design-system#15910)

* feat(structuredList): use of radio button icon,radios are left aligned

* chore: revert few typos

* feat(structuredList): adds feature flag story for structuredList

* feat(structuredlist): add radio button selection, styling behind a flag

* fix(structuredlist): add focus ring on click

* chore(StructuredList): remote JS feature flag, delete unnecessary styles

* chore(StructuredList): revert story to use checkmark icons

* fix(StructuredList): adds onclick focus ring with selection prop

* fix(StructuredList): adds 'selection' props

* fix(structuredlist): focus on click & Tab,handles clickaway events

* chore(StructuredList): add typescript types on refs

* chore(StructuredList): updates PublicAPI snapshot

* chore: update snapshots

* fix(StructuredList): focus rings only on selection prop

* chore: update snaps

---------

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Andrea N. Cardona <[email protected]>
Co-authored-by: Taylor Jones <[email protected]>
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.

[Selectable Components: Structured List] Dev Implementation
4 participants