h5p / h5p-accordion

Accordion content type for H5P
MIT License
4 stars 67 forks source link

Accordion expand/collapse option #7

Open nmillin opened 7 years ago

nmillin commented 7 years ago

adding the ability to have all panels open, all closed, or just the first open. Multiple panels open functionality added.

This is from https://h5p.org/comment/9900. I used language that made sense to me, but I don't have strong feelings about what the labels, terms, and descriptions are.

Please let me know what you think. Thanks.

-Nate

tajakobsen commented 7 years ago

Hi @nmillin ,

Code looks very good! But I found a bug:

nmillin commented 7 years ago

Thanks for the review tajakobsen. I confirmed the bug. It looks like $expandedTitle & $expandedPanel need to be set on self when the first panel is expanded by default. I'm a bit confused why that is tracked the way it is, but I'm probably missing something.

Please see https://github.com/h5p/h5p-accordion/pull/7/commits/7436468310eeb37d0b0ebcf109768c863277251e with a fix for this bug. Thanks.

fnoks commented 7 years ago

This issue is tracked here: https://h5ptechnology.atlassian.net/browse/HFP-722