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

[Action / Pad / Group] Extra border when using Action Pad / Group / Action in Grid layout #7380

Closed
2 of 3 tasks
macandcheese opened this issue Jul 26, 2023 · 10 comments
Closed
2 of 3 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@macandcheese
Copy link
Contributor

macandcheese commented Jul 26, 2023

Check existing issues

Actual Behavior

When using Action Pad in "Grid" layout, along with an Action Group and set of Actions - there is 1px extra at the left and right edges.

Screenshot 2023-07-26 at 9 56 51 AM

Expected Behavior

I'd expect the Action Group to extend fully to the edges of the Pad and not have 1px transparent border.

Reproduction Sample

https://codepen.io/mac_and_cheese/pen/mdQzRXo?editors=1000

Reproduction Steps

  1. Open Codepen

Reproduction Version

Latest

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react

Esri team

Calcite (design)

@macandcheese macandcheese added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jul 26, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. Calcite (design) Issues logged by Calcite designers. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Jul 26, 2023
@maxpatiiuk
Copy link
Member

Besides 1px gap, there is also a 1px padding (only if layout is grid):

Screenshot 2023-07-26 at 14 38 09

Fortunately, it's easy enough to override with css

@SkyeSeitz
Copy link

I agree Action Group should extend fully to the edges of the Pad without 1px transparent border. However, I could see the dividing borders between Actions remaining on layout=grid to provide some visual structure when there are both rows and columns.

@macandcheese
Copy link
Contributor Author

I think that's a good medium - the visual border isn't needed with a single row Action Pad or Action Group, but when there are multiple rows of Actions in a layout="grid" - I agree having the border there is nice. I will update OP.

@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library estimate - 2 Small fix or update, may require updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Aug 21, 2023
@maxpatiiuk
Copy link
Member

This issue wasn't a big priority before because I could overwrite the padding and gap by setting styles on <calcite-action-grid>, but in Calcite 1.7.0, the grid is now applied on a shadow DOM element, rather than on the host element (ever since commit b34f36d @driskull)

Thus, after Calcite update, I am not able to overwrite these styles without going into shadow dom, which broke my UI:

(before update on the left; after update on the right)

New Project

Can you please either remove padding, or add a CSS variable to customize it?
I would appreciate the removal/customization of gap too, but that is a bit less critical as I can change grid background to mask it (though, there would still be a small issue of a 1px unclickable areas between buttons, which could lead to bad UX for a tacktile widget like a D-pad)

(this is needed before the next JS SDK release a month from now)

@jcfranco
Copy link
Member

jcfranco commented Sep 1, 2023

As a workaround, could you override the background-color of the action-pad to at least make the grid spacing less apparent (see https://codepen.io/jcfranco/pen/MWZePdb?editors=1000)?

@maxpatiiuk
Copy link
Member

yes, that's why I mentioned:

but that is a bit less critical as I can change grid background to mask it

and the consequence:

though, there would still be a small issue of a 1px unclickable areas between buttons, which could lead to bad UX for a tacktile widget like a D-pad

but again, the padding:1px is a larger issue

@jcfranco
Copy link
Member

jcfranco commented Sep 1, 2023

but that is a bit less critical as I can change grid background to mask it

Whoops. Sorry I missed that. 😅

@macandcheese Is there an existing CSS prop we could add to action-pad for this?

@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library and removed p - low Issue is non core or affecting less that 10% of people using the library needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Sep 1, 2023
@driskull
Copy link
Member

driskull commented Sep 6, 2023

I think we would need to introduce a css var on the action-group for this.

@driskull driskull self-assigned this Sep 18, 2023
@driskull driskull added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Sep 18, 2023
driskull added a commit that referenced this issue Sep 18, 2023
driskull added a commit that referenced this issue Sep 19, 2023
…ng when layout is "grid" (#7763)

**Related Issue:** #7380

## Summary

- Adds `--calcite-action-group-gap` CSS variable to set the gap
(gutters) between rows and columns when the `layout` property is
`"grid"`.
- Adds `--calcite-action-group-padding` CSS variable to set the padding
when the `layout` property is `"grid"`.
- Add screenshot test
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Sep 19, 2023
@github-actions github-actions bot assigned geospatialem and unassigned driskull Sep 19, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added enhancement Issues tied to a new feature or request. 4 - verified Issues that have been released and confirmed resolved. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 20, 2023
@geospatialem
Copy link
Member

Verified in 1.9.0-next.5 with the --calcite-action-group-gap and --calcite-action-group-padding css variables (when the Action Group's layout is set to "grid":

  calcite-action-group {
    --calcite-action-group-gap: 0;
    --calcite-action-group-padding: 0;
  }

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 released and confirmed resolved. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive 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

6 participants