carbon icon indicating copy to clipboard operation
carbon copied to clipboard

[structured list] selection variant needs peristent background for selected state

Open laurenmrice opened this issue 5 years ago • 5 comments

For the selected state, the background needs to stay with the checkmark. The background color should be selected-ui.


Spec:

Screen Shot 2020-01-31 at 10 17 25 AM

laurenmrice avatar Jan 31 '20 16:01 laurenmrice

Seems like this is a larger bug with the actual implementation of the React StructuredList, rather than a simple styling bug. The problem does not exist in vanilla.

Can be bundled in with any changes based on the outcome of discussion regarding larger Structured List updates

https://github.com/carbon-design-system/carbon/issues/5065

tw15egan avatar Feb 04 '20 00:02 tw15egan

@tw15egan Just curious, is there any specific place in code where got an impression that this problem stems from how React StructuredList is implemented? Thanks!

asudoh avatar Feb 04 '20 00:02 asudoh

Just a quick look at it, I'm seeing that it mainly just renders children, so the issue will be with getting the checked value back up to StructuredListRow. Can probably map over children and pass in a ref, but if there are plans to update this component then I'm not too sure how much time we wanted to spend on it right now.

tw15egan avatar Feb 04 '20 01:02 tw15egan

Thanks @tw15egan for clarifying! I think we can listen to change event on <StructuredListRow> by letting the event bubble, but doing so causes an issue with programmatic control of the checked state. So agreed that it may involve a breaking change.

asudoh avatar Feb 06 '20 08:02 asudoh

@asudoh I've been messing around with this one this afternoon, but I'm running into problems with programmatic controls like you said. Wondering if you have ideas on a possible solution to this issue, as well as https://github.com/carbon-design-system/carbon/issues/1937

tw15egan avatar Mar 11 '20 22:03 tw15egan

Need to update specs to v11.

sstrubberg avatar Nov 14 '22 16:11 sstrubberg

updated the spec!

laurenmrice avatar Nov 14 '22 16:11 laurenmrice