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

refactor(tree-item): limit padding-y CSS var to top/bottom spacing, remove end indentation #3237

Merged
merged 22 commits into from
Nov 17, 2021

Conversation

caripizza
Copy link
Contributor

@caripizza caripizza commented Oct 13, 2021

Related Issue: #3223

Summary

Refactors calcite-tree-item styles to only apply the --calcite-tree-padding-y CSS var to top/bottom spacing.

Also adds the following stylesheet changes:

  • removes the margin-inline-end styles set on tree-items (no more end indentation, only start)
  • refactors out CSS vars that should not be exposed for style overrides on the host

@caripizza caripizza requested a review from a team as a code owner October 13, 2021 23:51
@github-actions github-actions bot added this to the Sprint 10/11 – 10/22 milestone Oct 13, 2021
@github-actions github-actions bot added the refactor Issues tied to code that needs to be significantly reworked. label Oct 13, 2021
@benelan benelan closed this Oct 20, 2021
@benelan benelan reopened this Oct 20, 2021
@caripizza caripizza closed this Oct 26, 2021
@caripizza caripizza reopened this Oct 26, 2021
@@ -174,4 +174,26 @@ describe("calcite-tree-item", () => {
ancestors.forEach(async (node) => expect(await node.getProperty("indeterminate")).toBe(true));
});
});

describe("CSS Custom Properties for style overrides", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I think we could add a test util for this (outside of this PR). Ideally a spec test since we don't need interaction.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! For now I'll remove this test since we're not exposing the var for style overrides.

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM!

I'll defer to @macandcheese on adding --calcite-tree-padding-y.

@macandcheese
Copy link
Contributor

Should this css variable be internal? I don't see a reason for it to be public.

@caripizza
Copy link
Contributor Author

@jcfranco can you please approve Screener changes on this one?

@jcfranco jcfranco merged commit 3f0fb52 into master Nov 17, 2021
@jcfranco jcfranco deleted the caripizza/3223-tree-item-limit-padding-y-var-spacing branch November 17, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants