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

Make Actions in horizontal ActionBar fill space. #7496

Closed
1 of 3 tasks
asangma opened this issue Aug 9, 2023 · 15 comments
Closed
1 of 3 tasks

Make Actions in horizontal ActionBar fill space. #7496

asangma opened this issue Aug 9, 2023 · 15 comments
Labels
0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.

Comments

@asangma
Copy link
Contributor

asangma commented Aug 9, 2023

Check existing issues

Description

When ActionBar is layout="horizontal AND in a flex container such as Panel, the ActionBar fills the space, and the Actions keep their content-based widths.

image

Propose adding flex: 1 0 auto to Action when in ActionBar and ActionPad to let Action fill the space. OR possibly just setting that style on Action.
image

Please see this codepen to see how it affects the different layouts.

Acceptance Criteria

Make Actions in horizontal ActionBar and ActionPad look better.

Relevant Info

No response

Which Component

Action or ActionBar and ActionPad

Example Use Case

Toolbar in a panel.
See the above codepen.

Priority impact

p4 - not time sensitive

Calcite package

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

Esri team

N/A

@asangma asangma added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Aug 9, 2023
@github-actions github-actions bot added the impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive label Aug 9, 2023
@asangma
Copy link
Contributor Author

asangma commented Aug 9, 2023

Note: this might be considered a bug?

@macandcheese
Copy link
Contributor

I think we'd want to enable this only when Action Bar layout is grid (after we add it #7438). It may require the columns on group to be set in some way.

But I don't think it's a bug or needed by default when in horizontal. I don't think this would always be desirable - for example in horizontal action bar in a shell panel's bottom / top panel slot - or in in this example I think the current fixed width Action is a better design than if they were to all fill available space: https://codepen.io/mac_and_cheese/pen/JjeqpjN?editors=1000

@asangma
Copy link
Contributor Author

asangma commented Aug 9, 2023

Thanks @macandcheese. That totes makes sense.
Do you think it's a prop we could add to either ActionBar/Pad or Action?

@macandcheese
Copy link
Contributor

macandcheese commented Aug 9, 2023

Yeah - it's possible now with Action Pad: https://codepen.io/mac_and_cheese/pen/QWJRQGW?editors=1000

But it has a requirement of using an Action Group and setting columns to an appropriate amount. I do wonder if columns could accept an "auto" or "all" value to avoid needing to know?

In - Dropdown, we require the Dropdown Item to be in a Dropdown Group, where certain properties are set / expected. Not sure if we want to enforce that here.

It seems like we'd also need to adjust the expand-disabled placement in a few configurations.

@asangma
Copy link
Contributor Author

asangma commented Aug 9, 2023

Maybe it could follow the model that Button uses with width="full"?

@ashetland
Copy link
Contributor

Should this just be what the grid layout does? I've always found it confusing that the "grid" can look un-grid-like:

This
CleanShot 2023-08-09 at 11 35 11@2x

vs this
CleanShot 2023-08-09 at 11 31 13@2x

@macandcheese
Copy link
Contributor

That is how grid works currently - https://codepen.io/mac_and_cheese/pen/QWJRQGW?editors=1000

Just need to add it to Bar, I think. The Collapse really is pretty useless in those cases though, at least IMO. I almost wonder if Action Bar / Pad should have expanded off by default vs. having to disable it, since for most horizontal use cases it's not ... always at least ... necessary with tooltip on action, etc.

@ashetland
Copy link
Contributor

This is from the component sample. Is it not configured correctly? https://codepen.io/ashetland/pen/qBQGxzM?editors=1000

@driskull
Copy link
Member

driskull commented Aug 14, 2023

@asangma @macandcheese this was brought up from the Maps SDK team that they felt like the actions here should take up the full space and its weird the "...More" action isn't all the way to the right.

I agree with @asangma that it should probably have an option to take up the available space.

image

@macandcheese
Copy link
Contributor

macandcheese commented Aug 14, 2023

Agreed, I think it's a good option for some cases. As long as .. not doing it.. remains possible.

That said, in that example, I'd expect More and Zoom out to be "docked" to the right and not flex to fill space, since it makes them seem like siblings to "visitation highlights (2022) (unless they are...), especially since the actions directly above don't do that, but... IMO 😄

@asangma
Copy link
Contributor Author

asangma commented Aug 29, 2023

I can see what you're saying about the grouping @macandcheese.
It may be that we would want to have a prop on Action for width similar to what we have on Button...?

@driskull
Copy link
Member

That said, in that example, I'd expect More and Zoom out to be "docked" to the right and not flex to fill space,

I can make zoom out docked to the right. That might help the appearance a bit.

@asangma
Copy link
Contributor Author

asangma commented Aug 29, 2023

That makes sense. Like render "internal" actions in their own group?

@driskull
Copy link
Member

yeah maybe. I think ill hold off for now though

@brittneytewks brittneytewks added the figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists label Mar 26, 2024
@geospatialem
Copy link
Member

Reconsolidating the effort in #7438 for later this year. Closing the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

6 participants