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

feat: Add slots to allow customizing AccordionItem open/close icons #2285

Merged
merged 5 commits into from
Dec 18, 2023
Merged

feat: Add slots to allow customizing AccordionItem open/close icons #2285

merged 5 commits into from
Dec 18, 2023

Conversation

bshore
Copy link
Contributor

@bshore bshore commented Dec 5, 2023

Linked Issue

N/A - Discussed in Discord #contributors channel.

Description

Adds two optional slots for customizing the AccordionItem icon when open or closed.

  • iconClosed - What to display when the given AccordionItem is closed.
  • iconOpen - What to display when the given AccordionItem is open.

Updated the component documentation page with a showcase + code example.

Preview Link

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm ci:check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

Copy link

changeset-bot bot commented Dec 5, 2023

🦋 Changeset detected

Latest commit: b178e0b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Dec 18, 2023 9:55pm

@niktek niktek marked this pull request as draft December 5, 2023 21:45
@niktek niktek marked this pull request as ready for review December 5, 2023 21:49
@endigo9740
Copy link
Contributor

endigo9740 commented Dec 5, 2023

@bshore one minor issue noted above - FYI I'm currently limited to running PR audits on weekends, so expect a deeper review later this week. Thanks!

@endigo9740
Copy link
Contributor

endigo9740 commented Dec 18, 2023

@bshore I've made a few notable modifications:

  1. I updated the changeset to remove a reference to the Skeleton Docs. We don't keep a changelog for the docs.
  2. I've made a number of refactors to reduce the amount of code, while also preserving backwards compatibility
  3. Namely we allowed folks to customize the built-in caret icon rotation - so we need to continue to support that
  4. When a custom icon slot is provided it then renderings a different UI for handling this (which doesn't rotate)
  5. I've added a FIXME comment for a region prop we'll need to update in our next major release.
  6. We opt for minimal examples in our docs, so I've updated the doc example accordingly.

I'm still not fond of having to update the icons per item, but well chalk that up to a Svelte v4 limitation and plan to revisit for our Svelte v5 rewrite coming soon!

Overall, great job. We appreciate your contribution!

@endigo9740 endigo9740 merged commit 2dc0e81 into skeletonlabs:dev Dec 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants