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

Item alignment for calcite-tree-items #7991

Open
2 of 5 tasks
abp6318 opened this issue Oct 12, 2023 · 2 comments
Open
2 of 5 tasks

Item alignment for calcite-tree-items #7991

abp6318 opened this issue Oct 12, 2023 · 2 comments
Labels
0 - new New issues that need assignment. ArcGIS Hub Issues logged by ArcGIS Hub team members. c-tree Issues that pertain to the calcite-tree and related components calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - sm Small design effort; 1-4 days of design work impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library

Comments

@abp6318
Copy link
Contributor

abp6318 commented Oct 12, 2023

Check existing issues

Description

Context:

The Hub Discovery team is hoping to make our facets on the new search page more consistent and legible. Some facet labels are longer than others and words wrap to the next line (sometimes even twice). We are looking to consistently format our facets like so:

image

This is possible for our facet-options in list form, but not for tree facet items. I was able to create the ideal result in Chrome's inspect tool and locate the CSS class we'd like to be able to flexibly alter:

question.about.overwriting.calcite.css.mov

Other ideas already investigated include:

  • altering the shadow-dom
  • rendering the tree differently
  • using ::part
  • using more specified selectors

Here is the class we are hoping to alter:

Acceptance Criteria

  • Provide a property or CSS variable for calcite tree items to set item alignment for facet labels and checkboxes rather than always using items-center

Relevant Info

No response

Which Component

Tree Item (

)

Example Use Case

No response

Priority impact

p2 - want for current milestone

Calcite package

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

Esri team

ArcGIS Hub

@abp6318 abp6318 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 Oct 12, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Hub Issues logged by ArcGIS Hub team members. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Oct 12, 2023
@ashetland ashetland added the c-tree Issues that pertain to the calcite-tree and related components label Oct 16, 2023
@paulcpederson
Copy link
Member

Want to add a plus one to the item spacing considerations here. Currently tree items have a minimum height, but no padding. So if the item title is short, there is a good amount of space between items, but for longer titles that wrap, they run together. Makes it very difficult to read and understand. I think using padding rather than min height would be better (ie. allow the item to grow and still have space around it.

Here is a codepen demonstrating the use case:

https://codepen.io/paulcp/pen/abxERBB?editors=1000

@ashetland ashetland added design Issues that need design consultation prior to development. estimate - design - sm Small design effort; 1-4 days of design work p - low Issue is non core or affecting less that 10% of people using the library and removed needs triage Planning workflow - pending design/dev review. labels Jul 9, 2024
@ashetland ashetland added this to the Design Backlog milestone Jul 9, 2024
@ashetland
Copy link

Using padding instead of minHeights will be completed in issue #7096

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. ArcGIS Hub Issues logged by ArcGIS Hub team members. c-tree Issues that pertain to the calcite-tree and related components calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - sm Small design effort; 1-4 days of design work impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

3 participants