calcite-design-system icon indicating copy to clipboard operation
calcite-design-system copied to clipboard

feat(accordion-item,radio-group-item): deprecate iconPosition & icon and add support for iconStart and iconEnd

Open anveshmekala opened this issue 2 years ago • 13 comments

Related Issue: #4688

  • This will allow users to add icon's both at the start and end of accordion-item and radio-group-item
  • iconPosition with icon is deprecated in favor of icon-end and icon-start

Example : <calcite-radio-group-item icon-start="car" icon-end="car" value="car">Car</calcite-radio-group-item>

9F0A5096-2417-45DD-9590-8CE9C5847020_4_5005_c

Note :

  • New props always take precedence.
  • Mixing deprecated props with new ones isn't supported.
  • In radio-group-item use either icon with iconPosition or iconEnd & iconStart props but do not combine them.
  • In accordion-item icon is an alias for iconStart.

Example:

Supported patterns:

<calcite-radio-group-item icon-start="car" icon-end="car" > </calcite-radio-group-item> OR <calcite-radio-group-item icon="car" icon-position="end" > </calcite-radio-group-item>

anveshmekala avatar Jun 27 '22 21:06 anveshmekala

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

github-actions[bot] avatar Jul 07 '22 02:07 github-actions[bot]

@geospatialem @benelan please suggest what would be the best way to include the notes section of the PR in docs. Thanks.

anveshmekala avatar Aug 01 '22 23:08 anveshmekala

@geospatialem @benelan please suggest what would be the best way to include the notes section of the PR in docs. Thanks.

The description following the @deprecated jsdoc tag shows up in the doc, so I'd add it there for these two notes:

In radio-group-item use either icon with iconPosition or iconEnd & iconStart props but do not combine them. In accordion-item icon is an alias for iconStart.

@macandcheese what do you think about adding a tooltip to the deprecated chip that says

Where relevant, using deprecated properties with their replacement is not supported. However, replacement properties take precedence over deprecated properties when both are set.

Did I interpret that correctly for the first two notes Anvesh?

benelan avatar Aug 02 '22 01:08 benelan

Is the behavior from those notes true throughout CC or just for the changes in this PR? If we added a tooltip like I suggested above it would show up on deprecated properties for all components.

benelan avatar Aug 02 '22 01:08 benelan

Is the behavior from those notes true throughout CC or just for the changes in this PR? If we added a tooltip like I suggested above it would show up on deprecated properties for all components.

This is related to the changes in PR but not the whole CC repo.

anveshmekala avatar Aug 02 '22 14:08 anveshmekala

@geospatialem @benelan please suggest what would be the best way to include the notes section of the PR in docs. Thanks.

The description following the @deprecated jsdoc tag shows up in the doc, so I'd add it there for these two notes:

In radio-group-item use either icon with iconPosition or iconEnd & iconStart props but do not combine them. In accordion-item icon is an alias for iconStart.

@macandcheese what do you think about adding a tooltip to the deprecated chip that says

Where relevant, using deprecated properties with their replacement is not supported. However, replacement properties take precedence over deprecated properties when both are set.

Did I interpret that correctly for the first two notes Anvesh?

SPOT ON .

I will add In radio-group-item use either icon with iconPosition or iconEnd & iconStart props but do not combine them. description following @deprecated tag in radio-group-item and for accordion it will be straightforward.

anveshmekala avatar Aug 02 '22 14:08 anveshmekala

@macandcheese this PR will add iconEnd position for accordion-item, please review the design. Thanks!

cc : @ashetland

anveshmekala avatar Aug 02 '22 17:08 anveshmekala

@macandcheese this PR will add iconEnd position for accordion-item, please review the design. Thanks!

cc : @ashetland

@SkyeSeitz Were we already aware of this? I thought I saw this mentioned in our kit....

ashetland avatar Aug 02 '22 18:08 ashetland

@macandcheese this PR will add iconEnd position for accordion-item, please review the design. Thanks! cc : @ashetland

@SkyeSeitz Were we already aware of this? I thought I saw this mentioned in our kit....

Wanted to make sure spacing and alignment match Figma.

anveshmekala avatar Aug 02 '22 23:08 anveshmekala

Can I get a design review for this one. Thanks

anveshmekala avatar Aug 04 '22 17:08 anveshmekala

Can I get a design review for this one. Thanks

We are looking at this today.

ashetland avatar Aug 08 '22 18:08 ashetland

@SkyeSeitz will follow up. Also adding @yelenakreyndel so we can start putting our process in place for design reviews.

ashetland avatar Aug 08 '22 19:08 ashetland

RE: https://github.com/Esri/calcite-components/issues/4996#issuecomment-1210108567 - maybe we shouldn't doc how unsupported functionality behaves? If we really want to doc it, then it should be consistent. cc @jcfranco

benelan avatar Aug 10 '22 03:08 benelan

RE: #4996 (comment) - maybe we shouldn't doc how unsupported functionality behaves? If we really want to doc it, then it should be consistent. cc @jcfranco

The current implementation in this PR deviates from the pattern of keeping props in sync because of the dependency of one prop with the other ( icon and iconPosition ) whereas new props are independent (icon-start , icon-end) which increases the complexity of keeping props in sync. To avoid confusion we are documenting the unsupported behavior.

Referring to #4996 - even if one prop changes the other should change keeping both in sync.

anveshmekala avatar Aug 15 '22 19:08 anveshmekala

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

github-actions[bot] avatar Aug 23 '22 02:08 github-actions[bot]

any update on this one @SkyeSeitz ?

anveshmekala avatar Aug 25 '22 22:08 anveshmekala

any update on this one @SkyeSeitz ?

@ashetland and I have taken a look and this looks good to go. 🚀

SkyeSeitz avatar Sep 02 '22 17:09 SkyeSeitz