Skip to content

Action Bar width changes when an Action gets an indicator. #5375

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

Closed
LanceStasinski opened this issue Sep 22, 2022 · 9 comments
Closed

Action Bar width changes when an Action gets an indicator. #5375

LanceStasinski opened this issue Sep 22, 2022 · 9 comments
Assignees
Labels
4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. design Issues that need design consultation prior to, or during, development. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. has workaround Issues have a workaround available in the meantime. p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@LanceStasinski
Copy link

Actual Behavior

The width of an Action Bar component changes when an Action's indicator is toggled which leads to distracting layout changes.
190012279-aadc3751-c757-4efe-a1dc-4937077d2ca8

Expected Behavior

I expect the width of the Action Bar to remain constant when an Action's indicator is toggled.

Reproduction Sample

https://codesandbox.io/s/proud-meadow-eo44tw?file=/src/styles.css

Reproduction Steps

  1. Create an Action component with a toggle-able indicator
  2. Nest that Action component within an Action Group that is nested with an Action Bar
  3. Tie the toggle indicator action to an element outside of the Action Bar - probably a button.
  4. Click the element that triggers the toggle indicator action.
  5. Notice how the width of the Action Bar increases.

Reproduction Version

1.0.0-next.541

Relevant Info

MacOS, Chrome version 105.0.5195.102
Calcite Components version 1.0.0-next.541

We solved this issue temporarily by adding a pseudoelement that takes the place of the indicator when indicator=false. The issue may be fixed by keeping the indicator psuedoelement as a permanent fixture within the component by setting visibility: hidden;, and only changing the visibility when indicator=true.

Regression?

No response

Esri team

ArcGIS Field Apps

@LanceStasinski LanceStasinski added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 22, 2022
@github-actions github-actions bot added the ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. label Sep 22, 2022
@geospatialem geospatialem added design Issues that need design consultation prior to, or during, development. p - medium Issue is non core or affecting less that 60% of people using the library labels Oct 18, 2022
@geospatialem
Copy link
Member

@ashetland + @SkyeSeitz: What are your design thoughts of action-bar where the indicator is added in particular use cases?

In the sample above the component is expanded, and the indicator is added to the text line with the most characters.

@LanceStasinski
Copy link
Author

In case it's of use, we fixed this by modifying the CSS as such:

calcite-action-bar[expanded] calcite-action:not([indicator])::after
  display: inline-block
  content: ''
  width: 1rem

@jcfranco jcfranco added the has workaround Issues have a workaround available in the meantime. label Oct 22, 2022
@driskull
Copy link
Member

What if we changed the indicator to always be in the same place?

image

cc @asangma

@ashetland
Copy link
Contributor

My vote would be to account for the additional space of the indicator rather than keep it attached to the icon. When it's expanded, the indicator feels out-of-place if it's still on the icon.

@SkyeSeitz
Copy link

I would agree with @ashetland. Also curious if there can be an Action Bar with no icons and just text?

@geospatialem geospatialem added enhancement Issues tied to a new feature or request. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. labels Feb 6, 2023
@jcfranco jcfranco added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. and removed enhancement Issues tied to a new feature or request. labels Feb 6, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Feb 16, 2023
@geospatialem geospatialem removed the needs triage Planning workflow - pending design/dev review. label Feb 16, 2023
@jcfranco
Copy link
Member

jcfranco commented Mar 4, 2023

Also curious if there can be an Action Bar with no icons and just text?

Technically, yes (except for the expand/collapse action), but I don't think this is a supported configuration. Looks odd to me.

Screenshot 2023-03-03 at 5 26 33 PM

If the actions used in action-bar/pad are meant to always use their icon, we should update the doc to indicate this. cc @geospatialem


Seems to me like this is ready for implementation. @SkyeSeitz @ashetland Can you confirm?

@jcfranco
Copy link
Member

jcfranco commented Mar 4, 2023

Took a stab with the current information. LMK if this needs further design discussion.

@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Mar 4, 2023
@jcfranco jcfranco assigned jcfranco and unassigned SkyeSeitz and ashetland Mar 4, 2023
jcfranco added a commit that referenced this issue Mar 6, 2023
…splaying text (#6562)

**Related Issue:** #5375 

## Summary

Updates layout to include space for indicator when `text-enabled` is
set.
@jcfranco jcfranco added 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. and removed 2 - in development Issues that are actively being worked on. labels Mar 6, 2023
@github-actions github-actions bot assigned geospatialem and unassigned jcfranco Mar 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. and removed 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. labels Mar 15, 2023
@geospatialem
Copy link
Member

Verified on master

verify-action-bar-indicator-width

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. design Issues that need design consultation prior to, or during, development. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. has workaround Issues have a workaround available in the meantime. p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

8 participants