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

[Tree] Content density factor, remove left padding when list is non-nested #5374

Closed
dmartini-zrh opened this issue Sep 22, 2022 · 5 comments
Closed
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members c-tree Issues that pertain to the calcite-tree and related components design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@dmartini-zrh
Copy link

dmartini-zrh commented Sep 22, 2022

Description

This ticket concerns 2 enhancement requests to the Tree component.
They both come from specific use cases but might be beneficial for additional ones.

Actual Behavior

  1. When using a Tree component in combination with action buttons for each item of the list, the latter can appear very narrowly spaced.
 In particular, this is the case when the scale is set to s

Screenshot 2022-09-22 at 11 56 54

  1. If the Tree component displays a non-nested list, the left space – where collapse controls (e.g. chevrons) would appear – is of no use.

Screenshot 2022-09-22 at 11 57 05

Acceptance Criteria

Desired Behavior

  1. The Tree component might have a density variable to choose between a default or "compact" and a cozy or "roomy" layout. In particular use cases, increasing visual separation could also be beneficial to accessibility.

Screenshot 2022-09-22 at 13 10 53

  1. When the Tree component presents a non-nested list, the left padding might be hidden, resulting in more space-efficient layouts.

Screenshot 2022-09-22 at 13 11 28

Relevant Info

No response

Which Component

Tree

Example Use Case

No response

Esri team

ArcGIS Scene Viewer

@dmartini-zrh dmartini-zrh added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Sep 22, 2022
@github-actions github-actions bot added the ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members label Sep 22, 2022
@macandcheese
Copy link
Contributor

Agreed, this would be great to look at, I think there's a lot of valid changes suggested here.

Removing the padding when there is no nested content makes a lot of sense to me. I struggle a bit with the "cozy / compact" terminology - to me cozy insinuates a density that is higher than default. If possible, finding a good default for s/m/l without the need for a secondary layout property would be ideal. Another option we could look at is a css variable for spacing, but even that feels like a workaround.

cc @ashetland

@dmartini-zrh
Copy link
Author

@macandcheese thanks for your reply.
Exact terminologies and defining whether density and size shall be distinct or a single property are design topics that I wanted to suggest... but go beyond this ticket 😉
My idea of "cozy / compact" refers to other design systems such as SAP's Fiori (which basically recommends "cozy" for touch devices) and Microsoft's (e.g. Outlook's UI density settings)
Screenshot 2022-09-23 at 14 04 20

@macandcheese
Copy link
Contributor

Yep, that context makes sense. Usually that ends up being an app-level or across multiple component type of user selection, so perhaps applicable at some point outside of tree specifically.

Maybe in this case if scale updates aren’t sufficient a line item space css var could work.

@ashetland ashetland added c-tree Issues that pertain to the calcite-tree and related components design Issues that need design consultation prior to development. labels Apr 14, 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. needs triage Planning workflow - pending design/dev review. labels Jun 1, 2023
@geospatialem geospatialem added the p - medium Issue is non core or affecting less that 60% of people using the library label Jun 1, 2023
@geospatialem
Copy link
Member

Related #6632

@ashetland
Copy link

Padding for a non-nested list is outlined in issue #7100 as part of epic #6632. Tree Items now support an actions-end slot (issue #3127) which will cause Tree Items to increase in height, adding more visual separation between items than is outlined above. Spacing is being wrapped into token work for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members c-tree Issues that pertain to the calcite-tree and related components design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. 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

5 participants