ExpandingSection in Silica Documentation

In the ComponentGallery example project there is a silica component used that is called “ExpandingSection”. I implemented that in a app and it works but the animation is much nicer in the example. Also I did use it without the surrounding ExpandingSectionGroup which I don’t know if it is legal.
I wanted to check the reason for the bad animation in my app and therefore have a look to the documentation. But on https://sailfishos.org/develop/docs/silica/sailfish-silica-all.html/ there is nothing mentioned.

Is there any documentation for that component available that I have not found yet?
Can someone give me a hint what I could have missed using the component regarding the animation?

4 Likes

I found this related question. But it never got answered… https://together.jolla.com/question/220654/better-silica-documentation-expandingsection-example/

Info from last Sailfish Meeting general discussion: It seems, that this component is not yet part of the public API. I plan to bring this up as topic in the next Meeting

2 Likes

Discussed ExpandingSection topic in the community meeting today, but summarizing some design aspects here also.

ExpandingSection is not documented, but allowed component that is part of public API. So far ExpandingSection has seen limited usage, inside platform we have only used it to implement few dual SIM settings. Often when user opens a particular page you want to show all the information in full instead, and allow scrolling through all the content without requiring taps in between to open sections. People app used to have alphabetical grid, which hid all the contacts even when user didn’t have many contacts or alphabetical groups. In the new design you can both scroll your contact list or navigate straight to the section using the scrollbar

Expanding sections has its uses though, if you have repetitive content under many sections. Though if the sections grow big you may want to consider opening new pages instead.

Further expanding sections can be confusing to the users with many animations going on simultaneously (especially if you have large sections there is a lot movement): one section is expanding, other one is collapsing, one section header is moving to the left, the other is moving to the right, all the while the page position is getting updated. Frankly the animation would need a bit of work so it works properly with different number of sections and different section sizes.

1 Like

tl;dr: Don’t use ExpandingSection without ExpandingSectionGroup

Thank you, @jpetrell for your answer here and on the Meeting. Good to know that it is OK to use the component!

I went again over this part of my after some time and with some ‘distance’ and realized why the ‘Left to Right’ Animation was not working in my code but in the componentgallery: I used the ExpandingSection without the ExpandingSectionGroup. Didn’t expect that it is such easy :wink:. So it seems not to be designed to be used without the ExpandingSectionGroup or it is a bug.

I used this component in avaRisk a lot (you can have a look in Harbour/Openrepos or here on github, e.g. here following and here following as it fits the usual presentation style of these avalanche reports nicely from my perspective (or I just like the component :grinning_face_with_smiling_eyes:)

1 Like