Select the menu width automatically

A follow-up to https://phabricator.wikimedia.org/T76196 .
Somebody may want it for design considerations. We can deprecate it later. I really don't want to stray too much.