uio-library / scroll-app

Simple, anonymous Markdown-based e-learning system
https://scroll-app.uio.no/
0 stars 0 forks source link

Option for accordion collapse mode in course #10

Open henriasv opened 6 years ago

henriasv commented 6 years ago

When opening (uncollapsing) a course module, other modules collapse. The interface to the course author should be an optional entry "accordion": True in course.json

danmichaelo commented 6 years ago

Checked the bootstrap-vue docs. Adding the accordion behaviour in itself turns out to be just the matter of adding an attribute to the structure we already have. But as feared, it causes loss of scroll location and instant sea-sickness, so we need to fix #11 first.

danmichaelo commented 6 years ago

10 and #11 are a bit more intertwined than I first thought, so I'm closing #11. In itself, #11 can be easily solved with vue-scrollto, but it does not update the animation target during the animation, so combining them leads to overshooting:

accordion-overshoot-opt

To orchestrate the two animations we need more low-level control of them, which means some work.

Alternatively, one option could also be to drop animation altogether, or drop only the expand/collapse animation.