zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
41 stars 6 forks source link

Settings: Selecting UI Styling also selects Body Colors and Spacing #132

Closed kakoga closed 4 years ago

kakoga commented 4 years ago

Describe the bug In Settings -> Styles clicking on UI Styling also selects Body Colors & Spacing.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings -> Styles
  2. Under Styles click on UI Styling in the left-hand sidebar
  3. Notice that Body Colors & Spacing is also colored as if it's selected.
  4. Keep clicking on items in the list moving from bottom to top and see which item deselects the Body Colors & Spacing category.

Expected behavior Only 1 style category can be selected at a time.

Screenshots If applicable, add screenshots to help explain your problem.

Screen Shot 2020-09-29 at 4 47 00 PM

Desktop (please complete the following information):

Smartphone (please complete the following information): n/a

Additional context Add any other context about the problem here.

nibblebot commented 4 years ago

this is caused by design-system Node using String.includes to determine selection: props.selected.includes(props.path) ? styles.selected : null

settings/styles/11 includes settings/styles/1 causing both to be selected. Is there a reason this is not an exact match?? @shrunyan

shrunyan commented 4 years ago

@nibblebot ha! not that I can think of. These should be exact matches.

nibblebot commented 4 years ago

fixed https://github.com/zesty-io/design-system/commit/ee988d4b86ae4dae029527c013e0c8c3eb583665