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

Add method showHideAccordionItem to Accordion class instead of findParentWithClass #1871

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

ollimeier
Copy link
Collaborator

Please see: #1866 (comment)

@@ -148,6 +148,7 @@ export default class RelatedGlyphPanel extends Panel {

for (const item of this.accordion.items) {
this._updateAccordionItem(item, glyphName, codePoint).then((hasResult) => {
this.accordion.showHideAccordionItem(item, hasResult);
Copy link
Collaborator

@justvanrossum justvanrossum Dec 18, 2024

Choose a reason for hiding this comment

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

Why is this done in a different place than the original parent.hidden = hideAccordionItem? If it was done in _updateAccordionItem() before, I think it should still be done there, or you'll change the bahavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, I now see that it is equivalent, because _updateAccordionItem() is only called in one spot. Perhaps it is better this way.

@justvanrossum justvanrossum merged commit 8fabc91 into main Dec 18, 2024
5 checks passed
@justvanrossum justvanrossum deleted the issue-1865-refactor-findParentWithClass branch December 18, 2024 06:06
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.

2 participants