Skip to content

feat(accordion-item): enhance component's interactivity states #11935

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

Conversation

aPreciado88
Copy link
Contributor

@aPreciado88 aPreciado88 commented Apr 11, 2025

Related Issue: #10016

Summary

appearance="solid":

  • Update :hover state background color to --calcite-color-foreground-2 and does not change text colors.
  • Update :active state background color to --calcite-color-foreground-3 and does not change text colors.

appearance="transparent":

  • Update :hover state background color to --calcite-color-transparent-hover and does not change text colors.
  • Update :active state background color to --calcite-color-transparent-press and does not change text colors.

appearance="solid" and appearance="transparent":

  • :hover and :active states do not change text colors.
  • :focus does not change text weight or icon color.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Apr 11, 2025
@aPreciado88 aPreciado88 added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Apr 11, 2025
@aPreciado88
Copy link
Contributor Author

@ashetland @SkyeSeitz Can you please take a look?

@ashetland
Copy link
Contributor

ashetland commented Apr 11, 2025

This is looking great! I just discovered, though, that we didn't account for appearance="transparent". The background colors should be

  • :hover --calcite-color-transparent-hover
  • :press --calcite-color-transparent-press

I'll add that to the issue as well.

@aPreciado88 aPreciado88 added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 15, 2025
…ciado88/10016-accordion-item-enhance-component-interactivity-states
@aPreciado88
Copy link
Contributor Author

@ashetland @SkyeSeitz Could you please take a look at the latest snapshots? It looks like they're the usual false positives.

Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

🎉 🌮

@@ -184,6 +191,7 @@ export class AccordionItem extends LitElement {
return;
}

this.appearance = closestAccordionParent.appearance;
Copy link
Member

Choose a reason for hiding this comment

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

can you modify the accordion e2e test to check for this as well? This test:

 it("inheritable props: `iconPosition`, `iconType`, `selectionMode`, and `scale` modified on the parent get passed into items", async () => {

class={{
[CSS.header]: true,
[CSS_UTILITY.rtl]: dir === "rtl",
[`header--${this.appearance}`]: true,
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: it would be nice if these classes were in the CSS object so they could be used in an e2e test if needed.

@SkyeSeitz
Copy link

@ashetland @SkyeSeitz Could you please take a look at the latest snapshots? It looks like they're the usual false positives.

Visual changes to Accordion interaction states look great! Snapshots were false positives. 🚀

@aPreciado88 aPreciado88 added skip visual snapshots Pull requests that do not need visual regression testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 15, 2025
@aPreciado88
Copy link
Contributor Author

@driskull I updated the PR with the requested changes 🚀

@driskull
Copy link
Member

Looks good!

@aPreciado88 aPreciado88 merged commit 2894a57 into dev Apr 16, 2025
10 checks passed
@aPreciado88 aPreciado88 deleted the aPreciado88/10016-accordion-item-enhance-component-interactivity-states branch April 16, 2025 15:15
benelan added a commit that referenced this pull request Apr 17, 2025
…gis-deps

* origin/dev: (31 commits)
  chore: add workflow manager to team issue templates (#11971)
  chore: release next
  feat(accordion-item): enhance component's interactivity states (#11935)
  chore: release next
  build(deps): update dependency lerna to v8.2.2 (#11948)
  feat(switch): enhance component's colors for a11y and usability (#11951)
  chore: release next
  ci: remove redundant test mode environment variable (#11958)
  fix(input-date-picker): allow clearing invalid date value (#11937)
  build: update browserslist db (#11946)
  feat(notice): add token for close icon and title text color (#11938)
  fix(list, block-group): fix drag handle events when lists or blocks are nested (#11816)
  chore: release next
  build(deps): update dependency vite to v5.4.18 (#11949)
  ci: default to stable tests when experimental mode is not set (#11957)
  fix(input-number): cancel arrow down event (#11956)
  refactor: tidy up (#11945)
  docs(checkbox): update icon color prop context (#11950)
  build(deps): bump node minor version (#11927)
  chore: release next
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants