Bug Fix #6822

Provide maxSize to be 45% of window width if element is side bar and maxSize is not specified

This is for #6822.
An even cleaner approach would be:

* Add `data-maxsize="50%"` to the sidebar DOM (it's in main-view.html)
* When fetching maxSize here, check if it's a string ending in "%" and dynamically convert it to a number in pixels

This way there's no hardcoded knowledge about the sidebar in the generic Resizer code, and there are also no special resize listeners needed in the sidebar code.