-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(accordion): restore accordion-items working with accordion across shadow DOM #7466
fix(accordion): restore accordion-items working with accordion across shadow DOM #7466
Conversation
@@ -243,12 +241,35 @@ export class AccordionItem implements ConditionalSlotComponent { | |||
|
|||
@Listen("calciteInternalAccordionChange", { target: "body" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this one should be targeted to document for consistency? 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or vice versa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create an issue to audit all listeners not targeting the element itself and possibly define some guidelines. I think document
makes sense for a direct custom event bus where we don't need capturing nor bubbling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🥼 🔬 👀 Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good!
const [accordion] = event.composedPath(); | ||
const accordionItem = this.el; | ||
|
||
const willBeSyncedByDirectParent = accordionItem.parentElement === accordion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name for this const is great but maybe a link to an issue or more info might be useful in a comment. What do you think?
Ideally, we can just do things one way and this will be cleaned up in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I'll submit a follow-up PR for this to expedite this fix landing.
**Related Issue:** #7466 (comment) ## Summary ✨📚✨
🤖 I have created a release *beep* *boop* --- <details><summary>@esri/calcite-components: 1.5.1</summary> ## [1.5.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-08) ### Bug Fixes * **accordion:** Restore accordion-items working with accordion across shadow DOM ([#7466](#7466)) ([bedb5db](bedb5db)) * **action-bar, action-pad:** Add native tooltip to expand action ([#7452](#7452)) ([9673ef7](9673ef7)) * Fix SSR build error caused by browser-sniffing util ([#7461](#7461)) ([e5381fa](e5381fa)) * **flow-item:** Use a native tooltip for the back button ([#7442](#7442)) ([f38167b](f38167b)) * **input:** Fix clearable from throwing an error when value is undefined ([#7476](#7476)) ([633c2cd](633c2cd)) * **list:** Add missing drag handle locale strings ([#7462](#7462)) ([2b5463e](2b5463e)) * **panel:** Add native tooltip to close button. ([#7434](#7434)) ([70b45cf](70b45cf)) * **panel:** Allow panel content to take full height. ([#7454](#7454)) ([b6bf54f](b6bf54f)) * **panel:** Correct header and action-bar z-indexing display issues ([#7440](#7440)) ([db7eac7](db7eac7)) * **slider:** Numbers remain on one line for locales with space group separators ([#7472](#7472)) ([2747b22](2747b22)) </details> <details><summary>@esri/calcite-components-react: 1.5.1</summary> ## [1.5.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-08) ### Miscellaneous Chores * **@esri/calcite-components-react:** Synchronize undefined versions ### Dependencies * The following workspace dependencies were updated * dependencies * @esri/calcite-components bumped from ^1.5.1-next.4 to ^1.5.1 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Related Issue: #7448
Summary
This updates accordion to sync its children's properties across shadow boundaries via events.