thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

New feature - side bar #1142

Closed FayCross closed 1 year ago

FayCross commented 2 years ago

Add option to create a collapsible sidebar to XOT template projects. The sidebar would contain various buttons which would normally appear on the footer bar:

Alternatively, the sidebar could contain a table of contents for the project where you can see the structure of the project with ticks for viewed pages.

ronm123 commented 2 years ago

@FayCross sounds good and I'll reply to the separate email discussion but adding a few comments here first... Perhaps one or more custom buttons would also be useful e.g. text box content with option to choose icon and label and perhaps url and target to be able to display other things in addition to what you have already listed. Option to have the sidebar appear right or left and perhaps even top or bottom too. Option to replace the footer and so automatically include the navigation buttons in the sidebar or not. We would obviously need to add relevant styling for the different bundled themes and defaults and guidance for those with custom themes.

FayCross commented 2 years ago

@ronm123 yes - I have the right & left option already working! I like the idea of adding custom buttons but I can't work out the best way to do them in the editor as ideally you'd be able to add as many as you like and have different options for what happens when you click them - text, URL, PDF. I guess using the datagrid in some way with a row for each custom button - but it's complicated because you might want them to upload files etc. rather than just have text box to enter content. There's lots to think about

ronm123 commented 2 years ago

@FayCross yes I can see that's a bit complicated. As there would be a limit to how many buttons are practical anyway what about just a fixed set of perhaps 4 or 5 optional buttons that don't appear if not used? Also is the sidebar permanently displayed or pops out on hover etc? I also wondered if the contents might change as you navigate so buttons that appear/change on a page by page basis like Transcript for example.

FayCross commented 2 years ago

I've committed the first version of this but there's still work to be done. Including:

Themes where side bar appearance needs adjusting:

Themes where the layout breaks when the side bar is added: