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

fix(action): Ensure action content is correctly spaced #8184

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

macandcheese
Copy link
Contributor

@macandcheese macandcheese commented Nov 16, 2023

Related Issue: #6879

Summary

Ensures extra space is not added to an action.

This is solved by:
When an icon is present, the indicator will always be appended to the bottom right. This ensures it remains in the same place whether a parent Action Bar is expanded, or not. The indicator moved a couple of px away - in the future I think we can improve this with a border or clipped ring around the indicator to prevent overlap.

Also resolves #5860, for icon-only uses.

When an icon is not present, the indicator will be positioned adjacent to the text container.

Before After
Screenshot 2023-11-15 at 5 00 35 PM Screenshot 2023-11-15 at 4 58 47 PM
Before After
Screenshot 2023-11-15 at 5 00 25 PM Screenshot 2023-11-15 at 4 59 26 PM

(Note, in this one, the "beaker" image is NOT an icon property, it is just a slotted element - so the indicator is not positioned over it. This isn't really a documented / expected use case.)

Before After
Screenshot 2023-11-15 at 5 00 47 PM Screenshot 2023-11-15 at 5 01 02 PM
Before Screenshot 2023-11-15 at 6 17 38 PM
After Screenshot 2023-11-15 at 6 17 57 PM
Before Screenshot 2023-11-15 at 6 21 22 PM
After Screenshot 2023-11-15 at 6 18 30 PM

@macandcheese macandcheese requested a review from a team as a code owner November 16, 2023 01:06
@macandcheese macandcheese added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Nov 16, 2023
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Nov 16, 2023
@macandcheese
Copy link
Contributor Author

cc @ashetland @SkyeSeitz as there are visual changes here.

Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Amazing ✨ 🪄

@macandcheese
Copy link
Contributor Author

These are some of the Chromatic screenshots - IMO these are expected changes but, depending on perspective, maybe substantial ones. Should this get breaking tag (good timing...), or should we just lump the indicator placement change into the fix?

Screenshot 2023-11-15 at 5 55 52 PM Screenshot 2023-11-15 at 5 56 42 PM

@jcfranco
Copy link
Member

Awesome! 🤩

Should this get breaking tag (good timing...), or should we just lump the indicator placement change into the fix?

I don't think this qualifies as a breaking change, but we should definitely call this out for the next release since it is noticeable in certain configurations. cc @brittneytewks @geospatialem

@macandcheese macandcheese merged commit b18dcc8 into main Nov 16, 2023
19 checks passed
@macandcheese macandcheese deleted the macandcheese/6879-action-indicator-fix branch November 16, 2023 20:38
@github-actions github-actions bot added this to the 2023 November Priorities milestone Nov 16, 2023
DitwanP pushed a commit that referenced this pull request Nov 16, 2023
**Related Issue:** #6879 

## Summary
Ensures extra space is not added to an action. 

This is solved by:
When an icon is present, the indicator will always be appended to the
bottom right. This ensures it remains in the same place whether a parent
Action Bar is expanded, or not. The indicator moved a couple of px away
- in the future I think we can improve this with a border or clipped
ring around the indicator to prevent overlap.

Also resolves #5860,
for icon-only uses.

When an icon is not present, the indicator will be positioned adjacent
to the text container.


| Before  | After |
| ------------- | ------------- |
| <img width="500" alt="Screenshot 2023-11-15 at 5 00 35 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/ae4d202b-260e-411d-b6fc-30fea2c549ea">
| <img width="500" alt="Screenshot 2023-11-15 at 4 58 47 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/284119d3-e8c4-40e1-8272-7ee204a36539">
|


| Before  | After |
| ------------- | ------------- |
| <img width="500" alt="Screenshot 2023-11-15 at 5 00 25 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/fe845c89-abb6-4416-8013-5e105c0b3ebf">
| <img width="500" alt="Screenshot 2023-11-15 at 4 59 26 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/89ef62bf-7a7b-4a1f-ba29-3165df698347">
|

(Note, in this one, the "beaker" image is NOT an `icon` property, it is
just a slotted element - so the indicator is not positioned over it.
This isn't really a documented / expected use case.)


| Before  | After |
| ------------- | ------------- |
| <img width="500" alt="Screenshot 2023-11-15 at 5 00 47 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/c8722108-d9df-4540-b268-e7c8e263afdd">
| <img width="500" alt="Screenshot 2023-11-15 at 5 01 02 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/d5a06b63-92bc-4e53-a348-505c9d173188">
|


| Before | <img width="1030" alt="Screenshot 2023-11-15 at 6 17 38 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/c3ef3696-71bc-4bde-b066-ea56aebd07bd">
|
| ------------- | ------------- |
| After | <img width="1030" alt="Screenshot 2023-11-15 at 6 17 57 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/61d91130-a637-4257-84b2-42df18ecb790">
|


| Before | <img width="1313" alt="Screenshot 2023-11-15 at 6 21 22 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/26289014-9df0-4e3d-ab2e-491be34cf97b">
|
| ------------- | ------------- |
| After | <img width="1313" alt="Screenshot 2023-11-15 at 6 18 30 PM"
src="https://github.com/Esri/calcite-design-system/assets/4733155/d32c2249-86ac-4a4f-9ac8-a7cbde0c322c">
|
benelan added a commit that referenced this pull request Nov 21, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>@esri/eslint-plugin-calcite-components:
0.2.3</summary>

##
[0.2.3](https://github.com/Esri/calcite-design-system/compare/@esri/eslint-plugin-calcite-components@0.2.2...@esri/eslint-plugin-calcite-components@0.2.3)
(2023-11-21)
</details>

<details><summary>@esri/calcite-components: 1.11.0</summary>

##
[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.10.0...@esri/calcite-components@1.11.0)
(2023-11-21)

### Features

* **combobox:** Limit display of selected items with new
selection-display prop
([#7912](#7912))
([58317ae](58317ae))
* **date-picker:** Make component responsive
([#7872](#7872))
([f131218](f131218))
* **input, input-date-picker, input-number, input-text,
input-time-picker:** Truncate value and placeholder when input is narrow
([#8160](#8160))
([533eff3](533eff3))
* **list-item:** Add content-bottom slot for placing content below the
label and description of the component
([#8183](#8183))
([7d400fb](7d400fb))
* **list:** Specify the element types in the `calciteListOrderChange`
event detail.
([#8123](#8123))
([3e81d7e](3e81d7e))
* **pagination:** Introduce responsive design for xxsmall breakpoint
([#8150](#8150))
([ab20eb0](ab20eb0))
* **stepper-item:** Remove support for previousStep and nextStep in
messages
([#8222](#8222))
([213b31d](213b31d))
* **stepper:** Enable responsive layout
([#7744](#7744))
([687ca2b](687ca2b))


### Bug Fixes

* **accordion-item:** Update expanded chevron color
([#8087](#8087))
([d3d7688](d3d7688))
* **action:** Ensure action content is correctly spaced
([#8184](#8184))
([b18dcc8](b18dcc8))
* **action:** Update transparent action styles
([#8194](#8194))
([0f12489](0f12489))
* **block-section:** Wraps long text over to a new line when toggle
switch is displayed
([#8101](#8101))
([3f90780](3f90780))
* **checkbox:** Make label property public
([#8181](#8181))
([d3b9c1f](d3b9c1f))
* **combobox-item:** Hide disabled item icon
([#8095](#8095))
([36552f3](36552f3))
* **input-date-picker:** Fix date-picker wrapper displaying beyond its
bounds
([#8172](#8172))
([01ec024](01ec024))
* **input-number:** Prevents mutating value on blur
([#8226](#8226))
([b89a893](b89a893))
* **input-time-zone:** Fix Indian/Christmas time zone translation
([#8096](#8096))
([d79d591](d79d591))
* **list-item, stack:** Stretch action-menu and handle when placed
inside a list-item or stack.
([#8185](#8185))
([8a16a69](8a16a69))
* **list-item, stack:** Stretch dropdown when placed inside a list-item
or stack
([#8204](#8204))
([05e6b65](05e6b65))
* **list-item:** Adds border between grouped and ungrouped list-items
([#8134](#8134))
([b3c331c](b3c331c))
* **list-item:** Fix rendering of open icon.
([#8207](#8207))
([a6e1766](a6e1766))
* **panel, flow-item:** Remove overflow rule
([#8055](#8055))
([d0c3ed2](d0c3ed2))
* **split-button:** Fix width layout
([#8133](#8133))
([051f332](051f332))

### Dependencies

* The following workspace dependencies were updated
  * devDependencies
* @esri/eslint-plugin-calcite-components bumped from 0.2.3-next.6 to
0.2.3
</details>

<details><summary>@esri/calcite-components-angular: 1.11.0</summary>

## 1.11.0 (2023-11-21)


### Bug Fixes

* **angular:** Publish from the dist directory
([#8151](#8151))
([d813f14](d813f14))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

<details><summary>@esri/calcite-components-react: 1.11.0</summary>

##
[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.10.0...@esri/calcite-components-react@1.11.0)
(2023-11-21)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <no-reply@benelan.dev>
benelan added a commit that referenced this pull request Nov 24, 2023
🤖 I have created a release *beep* *boop*
---

<details><summary>@esri/eslint-plugin-calcite-components:
0.2.3</summary>

[0.2.3](https://github.com/Esri/calcite-design-system/compare/@esri/eslint-plugin-calcite-components@0.2.2...@esri/eslint-plugin-calcite-components@0.2.3)
(2023-11-21)
</details>

<details><summary>@esri/calcite-components: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.10.0...@esri/calcite-components@1.11.0)
(2023-11-21)

* **combobox:** Limit display of selected items with new
selection-display prop
([#7912](#7912))
([58317ae](58317ae))
* **date-picker:** Make component responsive
([#7872](#7872))
([f131218](f131218))
* **input, input-date-picker, input-number, input-text,
input-time-picker:** Truncate value and placeholder when input is narrow
([#8160](#8160))
([533eff3](533eff3))
* **list-item:** Add content-bottom slot for placing content below the
label and description of the component
([#8183](#8183))
([7d400fb](7d400fb))
* **list:** Specify the element types in the `calciteListOrderChange`
event detail.
([#8123](#8123))
([3e81d7e](3e81d7e))
* **pagination:** Introduce responsive design for xxsmall breakpoint
([#8150](#8150))
([ab20eb0](ab20eb0))
* **stepper-item:** Remove support for previousStep and nextStep in
messages
([#8222](#8222))
([213b31d](213b31d))
* **stepper:** Enable responsive layout
([#7744](#7744))
([687ca2b](687ca2b))

* **accordion-item:** Update expanded chevron color
([#8087](#8087))
([d3d7688](d3d7688))
* **action:** Ensure action content is correctly spaced
([#8184](#8184))
([b18dcc8](b18dcc8))
* **action:** Update transparent action styles
([#8194](#8194))
([0f12489](0f12489))
* **block-section:** Wraps long text over to a new line when toggle
switch is displayed
([#8101](#8101))
([3f90780](3f90780))
* **checkbox:** Make label property public
([#8181](#8181))
([d3b9c1f](d3b9c1f))
* **combobox-item:** Hide disabled item icon
([#8095](#8095))
([36552f3](36552f3))
* **input-date-picker:** Fix date-picker wrapper displaying beyond its
bounds
([#8172](#8172))
([01ec024](01ec024))
* **input-number:** Prevents mutating value on blur
([#8226](#8226))
([b89a893](b89a893))
* **input-time-zone:** Fix Indian/Christmas time zone translation
([#8096](#8096))
([d79d591](d79d591))
* **list-item, stack:** Stretch action-menu and handle when placed
inside a list-item or stack.
([#8185](#8185))
([8a16a69](8a16a69))
* **list-item, stack:** Stretch dropdown when placed inside a list-item
or stack
([#8204](#8204))
([05e6b65](05e6b65))
* **list-item:** Adds border between grouped and ungrouped list-items
([#8134](#8134))
([b3c331c](b3c331c))
* **list-item:** Fix rendering of open icon.
([#8207](#8207))
([a6e1766](a6e1766))
* **panel, flow-item:** Remove overflow rule
([#8055](#8055))
([d0c3ed2](d0c3ed2))
* **split-button:** Fix width layout
([#8133](#8133))
([051f332](051f332))

* The following workspace dependencies were updated
  * devDependencies
* @esri/eslint-plugin-calcite-components bumped from 0.2.3-next.6 to
0.2.3
</details>

<details><summary>@esri/calcite-components-angular: 1.11.0</summary>

* **angular:** Publish from the dist directory
([#8151](#8151))
([d813f14](d813f14))

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

<details><summary>@esri/calcite-components-react: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.10.0...@esri/calcite-components-react@1.11.0)
(2023-11-21)

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <no-reply@benelan.dev>
benelan added a commit that referenced this pull request Nov 24, 2023
🤖 I have created a release *beep* *boop*
---

<details><summary>@esri/eslint-plugin-calcite-components:
0.2.3</summary>

[0.2.3](https://github.com/Esri/calcite-design-system/compare/@esri/eslint-plugin-calcite-components@0.2.2...@esri/eslint-plugin-calcite-components@0.2.3)
(2023-11-21)
</details>

<details><summary>@esri/calcite-components: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.10.0...@esri/calcite-components@1.11.0)
(2023-11-21)

* **combobox:** Limit display of selected items with new
selection-display prop
([#7912](#7912))
([58317ae](58317ae))
* **date-picker:** Make component responsive
([#7872](#7872))
([f131218](f131218))
* **input, input-date-picker, input-number, input-text,
input-time-picker:** Truncate value and placeholder when input is narrow
([#8160](#8160))
([533eff3](533eff3))
* **list-item:** Add content-bottom slot for placing content below the
label and description of the component
([#8183](#8183))
([7d400fb](7d400fb))
* **list:** Specify the element types in the `calciteListOrderChange`
event detail.
([#8123](#8123))
([3e81d7e](3e81d7e))
* **pagination:** Introduce responsive design for xxsmall breakpoint
([#8150](#8150))
([ab20eb0](ab20eb0))
* **stepper-item:** Remove support for previousStep and nextStep in
messages
([#8222](#8222))
([213b31d](213b31d))
* **stepper:** Enable responsive layout
([#7744](#7744))
([687ca2b](687ca2b))

* **accordion-item:** Update expanded chevron color
([#8087](#8087))
([d3d7688](d3d7688))
* **action:** Ensure action content is correctly spaced
([#8184](#8184))
([b18dcc8](b18dcc8))
* **action:** Update transparent action styles
([#8194](#8194))
([0f12489](0f12489))
* **block-section:** Wraps long text over to a new line when toggle
switch is displayed
([#8101](#8101))
([3f90780](3f90780))
* **checkbox:** Make label property public
([#8181](#8181))
([d3b9c1f](d3b9c1f))
* **combobox-item:** Hide disabled item icon
([#8095](#8095))
([36552f3](36552f3))
* **input-date-picker:** Fix date-picker wrapper displaying beyond its
bounds
([#8172](#8172))
([01ec024](01ec024))
* **input-number:** Prevents mutating value on blur
([#8226](#8226))
([b89a893](b89a893))
* **input-time-zone:** Fix Indian/Christmas time zone translation
([#8096](#8096))
([d79d591](d79d591))
* **list-item, stack:** Stretch action-menu and handle when placed
inside a list-item or stack.
([#8185](#8185))
([8a16a69](8a16a69))
* **list-item, stack:** Stretch dropdown when placed inside a list-item
or stack
([#8204](#8204))
([05e6b65](05e6b65))
* **list-item:** Adds border between grouped and ungrouped list-items
([#8134](#8134))
([b3c331c](b3c331c))
* **list-item:** Fix rendering of open icon.
([#8207](#8207))
([a6e1766](a6e1766))
* **panel, flow-item:** Remove overflow rule
([#8055](#8055))
([d0c3ed2](d0c3ed2))
* **split-button:** Fix width layout
([#8133](#8133))
([051f332](051f332))

* The following workspace dependencies were updated
  * devDependencies
* @esri/eslint-plugin-calcite-components bumped from 0.2.3-next.6 to
0.2.3
</details>

<details><summary>@esri/calcite-components-angular: 1.11.0</summary>

* **angular:** Publish from the dist directory
([#8151](#8151))
([d813f14](d813f14))

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

<details><summary>@esri/calcite-components-react: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.10.0...@esri/calcite-components-react@1.11.0)
(2023-11-21)

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <no-reply@benelan.dev>
benelan added a commit that referenced this pull request Nov 26, 2023
🤖 I have created a release *beep* *boop*
---

<details><summary>@esri/eslint-plugin-calcite-components:
0.2.3</summary>

[0.2.3](https://github.com/Esri/calcite-design-system/compare/@esri/eslint-plugin-calcite-components@0.2.2...@esri/eslint-plugin-calcite-components@0.2.3)
(2023-11-21)
</details>

<details><summary>@esri/calcite-components: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.10.0...@esri/calcite-components@1.11.0)
(2023-11-21)

* **combobox:** Limit display of selected items with new
selection-display prop
([#7912](#7912))
([58317ae](58317ae))
* **date-picker:** Make component responsive
([#7872](#7872))
([f131218](f131218))
* **input, input-date-picker, input-number, input-text,
input-time-picker:** Truncate value and placeholder when input is narrow
([#8160](#8160))
([533eff3](533eff3))
* **list-item:** Add content-bottom slot for placing content below the
label and description of the component
([#8183](#8183))
([7d400fb](7d400fb))
* **list:** Specify the element types in the `calciteListOrderChange`
event detail.
([#8123](#8123))
([3e81d7e](3e81d7e))
* **pagination:** Introduce responsive design for xxsmall breakpoint
([#8150](#8150))
([ab20eb0](ab20eb0))
* **stepper-item:** Remove support for previousStep and nextStep in
messages
([#8222](#8222))
([213b31d](213b31d))
* **stepper:** Enable responsive layout
([#7744](#7744))
([687ca2b](687ca2b))

* **accordion-item:** Update expanded chevron color
([#8087](#8087))
([d3d7688](d3d7688))
* **action:** Ensure action content is correctly spaced
([#8184](#8184))
([b18dcc8](b18dcc8))
* **action:** Update transparent action styles
([#8194](#8194))
([0f12489](0f12489))
* **block-section:** Wraps long text over to a new line when toggle
switch is displayed
([#8101](#8101))
([3f90780](3f90780))
* **checkbox:** Make label property public
([#8181](#8181))
([d3b9c1f](d3b9c1f))
* **combobox-item:** Hide disabled item icon
([#8095](#8095))
([36552f3](36552f3))
* **input-date-picker:** Fix date-picker wrapper displaying beyond its
bounds
([#8172](#8172))
([01ec024](01ec024))
* **input-number:** Prevents mutating value on blur
([#8226](#8226))
([b89a893](b89a893))
* **input-time-zone:** Fix Indian/Christmas time zone translation
([#8096](#8096))
([d79d591](d79d591))
* **list-item, stack:** Stretch action-menu and handle when placed
inside a list-item or stack.
([#8185](#8185))
([8a16a69](8a16a69))
* **list-item, stack:** Stretch dropdown when placed inside a list-item
or stack
([#8204](#8204))
([05e6b65](05e6b65))
* **list-item:** Adds border between grouped and ungrouped list-items
([#8134](#8134))
([b3c331c](b3c331c))
* **list-item:** Fix rendering of open icon.
([#8207](#8207))
([a6e1766](a6e1766))
* **panel, flow-item:** Remove overflow rule
([#8055](#8055))
([d0c3ed2](d0c3ed2))
* **split-button:** Fix width layout
([#8133](#8133))
([051f332](051f332))

* The following workspace dependencies were updated
  * devDependencies
* @esri/eslint-plugin-calcite-components bumped from 0.2.3-next.6 to
0.2.3
</details>

<details><summary>@esri/calcite-components-angular: 1.11.0</summary>

* **angular:** Publish from the dist directory
([#8151](#8151))
([d813f14](d813f14))

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

<details><summary>@esri/calcite-components-react: 1.11.0</summary>

[1.11.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.10.0...@esri/calcite-components-react@1.11.0)
(2023-11-21)

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from 1.11.0-next.3 to 1.11.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <no-reply@benelan.dev>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance indicator positioning with a wide calcite-action
3 participants