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

[Panel] Add themeable tokens for corner-radius #8675

Open
2 of 6 tasks
Tracked by #7180
macandcheese opened this issue Jan 30, 2024 · 10 comments
Open
2 of 6 tasks
Tracked by #7180

[Panel] Add themeable tokens for corner-radius #8675

macandcheese opened this issue Jan 30, 2024 · 10 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. has workaround Issues have a workaround available in the meantime. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone

Comments

@macandcheese
Copy link
Contributor

macandcheese commented Jan 30, 2024

Check existing issues

Description

Panel should support overriding the default corner-radius css property, which should be set to "sharp" to maintain its current default.

Acceptance Criteria

Panel has --calcite-panel-corner-radius css property that defaults to the semantic "sharp" value

Relevant Info

Panel is often used as a layout container outside a parent like Shell Panel. In these cases, a theming story may include adding a rounded corner value.

Which Component

Panel

Example Use Case

Screenshot 2024-01-30 at 10 58 53 AM

Priority impact

p3 - want for upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

Calcite (design)

@macandcheese macandcheese 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 Jan 30, 2024
@github-actions github-actions bot added Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. labels Jan 30, 2024
@macandcheese macandcheese added the design-tokens Issues requiring design tokens. label Jan 30, 2024
@geospatialem geospatialem added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone and removed p3 - want for upcoming milestone labels May 21, 2024
@macandcheese macandcheese added the p - high Issue should be addressed in the current milestone, impacts component or core functionality label Aug 13, 2024
@geospatialem geospatialem added 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 13, 2024
@geospatialem geospatialem changed the title [Panel] Add themeable tokens for corner-radius and box-shadow [Panel] Add themeable tokens for corner-radius Dec 13, 2024
@geospatialem geospatialem added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels Dec 13, 2024
@github-actions github-actions bot added the p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone label Dec 13, 2024
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Dec 13, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Dec 13, 2024

🍡 Verified locally on dev

@DitwanP DitwanP closed this as completed Dec 13, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Dec 13, 2024
@DitwanP DitwanP reopened this Dec 13, 2024
@DitwanP DitwanP removed the 4 - verified Issues that have been released and confirmed resolved. label Dec 13, 2024
@DitwanP DitwanP added the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Dec 13, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Dec 13, 2024

@macandcheese the token for changing the corner-radius works fine but the panel also has a default border that doesn't follow that radius. I see we have a border color token but no token to for border overall. Is this something we need to account for? Or is there another way to remove the border?
image

@macandcheese
Copy link
Contributor Author

@DitwanP can you share a Codepen with the above? We might need to adjust something...

@DitwanP
Copy link
Contributor

DitwanP commented Dec 14, 2024

@macandcheese
Copy link
Contributor Author

Thanks - we'll want to handle that ... I think we can make sure the component clips, without necessarily adding a default box shadow or border. Could you re-open this and assign it back to me?

@DitwanP DitwanP added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Dec 14, 2024
@DitwanP DitwanP assigned macandcheese and unassigned geospatialem and DitwanP Dec 14, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Dec 14, 2024

@macandcheese One other small thing to change, the description of of the --calcite-panel-header-background-color in the panel.scss file incorrectly says that it changes the color of the components footer.

* @prop --calcite-panel-header-background-color: Specifies the background color of the component's footer.

@macandcheese
Copy link
Contributor Author

Because the :host element is flex displayed, and the panel itself doesn't have css props for box-shadow or border) - this will occur anytime a user sets border or box-shadow directly on the element. There are a few approaches we could take here...

  • set border-radius directly on the :host and reference the user-set --calcite-panel-corner-radius.

  • do nothing, make a user set border-radius: var(--calcite-panel-corner-radius) (or, any value) alongside box-shadow and border they've declared on :host. At that point, do you need the corner-radius variable?

  • Add css properties for border and box-shadow to Panel - and handle this for a user. These would need to "default to off" as the Panel doesn't have a border or box-shadow, and likely require some additional css properties for "outer border" to not have it set when a user overrides the existing properties.

Thoughts on best approach @alisonailea @jcfranco ?

@macandcheese
Copy link
Contributor Author

Though not ideal, a workaround for now is to also set a border-radius on the element itself.

calcite-panel {
  border-radius: 30px;
  --calcite-panel-corner-radius: 30px;
}

@macandcheese macandcheese added the has workaround Issues have a workaround available in the meantime. label Jan 13, 2025
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library and removed p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Jan 13, 2025
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. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. has workaround Issues have a workaround available in the meantime. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone
Projects
None yet
Development

No branches or pull requests

3 participants