Transition from and to compact mode should happen when mouse is outside the sidebar
Currently, the transition is triggered as soon as a certain number of tabs is reached. However, changing it right away means disrupting what the user was doing, so it’s probably better to avoid moving and resizing things under the user’s cursor.