Bug Fix #6822

Provide maxSize to be 45% of window width if element is side bar and maxSize is not specified
There needs to be a space between `if` and `(` as well as between `)` and `{` (see if block on line 339 just below for an example).