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 expansion toggled signal of subpanels in an Accordion Panel #614

Merged
merged 7 commits into from Jul 27, 2023

Conversation

DenisaCG
Copy link
Member

Added an expansionToggled signal to the AccordionPanel class that gets triggered when an element from the AccordionPanel is collapsed or expanded.

The signal makes it useful for saving the layout of the sidebars, including the expansion status of all subpanels, such that once the user collapses a subpanel for example, the layout saves that information for later restoration.

@welcome
Copy link

welcome bot commented Jul 26, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@fcollonval fcollonval added the enhancement New feature or request label Jul 26, 2023
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @DenisaCG

I have some cosmetic comments and a last minute thought that we could provide the index of the widget for which expansion changed to make the signal more powerful.

packages/widgets/src/accordionpanel.ts Outdated Show resolved Hide resolved
packages/widgets/src/accordionpanel.ts Outdated Show resolved Hide resolved
packages/widgets/src/accordionpanel.ts Outdated Show resolved Hide resolved
packages/widgets/tests/src/accordionpanel.spec.ts Outdated Show resolved Hide resolved
packages/widgets/tests/src/accordionpanel.spec.ts Outdated Show resolved Hide resolved
packages/widgets/tests/src/accordionpanel.spec.ts Outdated Show resolved Hide resolved
packages/widgets/src/accordionpanel.ts Outdated Show resolved Hide resolved
packages/widgets/src/accordionpanel.ts Outdated Show resolved Hide resolved
@DenisaCG
Copy link
Member Author

Thanks for the review @fcollonval! I applied the suggested cosmetic changes and added the index of the widget for the signal to provide.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @DenisaCG

This is great.

I push a commit only to fix brackets in the test file that were not separating correctly the unit tests.

@fcollonval
Copy link
Member

The remaining API failure is relevant and due to the extraction of the public API. To solve it, the command yarn && yarn build && yarn api must be run locally and then the changes must be committed.

I did it in 841237e

@DenisaCG
Copy link
Member Author

The remaining API failure is relevant and due to the extraction of the public API. To solve it, the command yarn && yarn build && yarn api must be run locally and then the changes must be committed.

I did it in 841237e

Oh okay, that makes sense. Thank you @fcollonval!

@fcollonval fcollonval merged commit 4eb49be into jupyterlab:main Jul 27, 2023
16 of 17 checks passed
@welcome
Copy link

welcome bot commented Jul 27, 2023

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants