XH 1.6.4: Icons for the admin and plugin menu

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 1.6.4: Icons for the admin and plugin menu

Post by cmb » Sun Sep 21, 2014 11:31 am

Hello Community,

Termin has made a modification of core.css which adds icons to the admin and the plugin menu: http://www.pixelcom.crimea.ua/css-core- ... le_xh.html.

We had some discussion regarding this topic when we discussed making the admin menu adaptable to the available viewport width.

We should reconsider this topic for XH 1.6.4.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6.4: Icons for the admin and plugin menu

Post by svasti » Wed Dec 10, 2014 8:16 pm

Maybe it could be implemented this way: as long as there is enough space, the menu remains as we have it now, but when there isn't enough space any more, icons will be shown instead of text.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Icons for the admin and plugin menu

Post by cmb » Thu Dec 11, 2014 11:40 pm

svasti wrote:Maybe it could be implemented this way: as long as there is enough space, the menu remains as we have it now, but when there isn't enough space any more, icons will be shown instead of text.
Can this be done with CSS? :? Otherwise it would require JS, what might be overkill.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6.4: Icons for the admin and plugin menu

Post by svasti » Tue Dec 23, 2014 8:55 pm

There is a case which I encountered several times in templates where the menu is on top of everything. When the viewport gets smaller, items of the admin menu are getting on top of the page menu, making it impossible to reach certain pages.

Such templates XH cannot be administered from smartphones etc. If one could swith to icons, administration would be posible again.
cmb wrote:Can this be done with CSS?
I don't see a way to do it. We could add a config variable, or a little java script, e.g. if viewport has less than 800px icons are shown? However as you don't like adding config vars nor java script, how would you do it?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.4: Icons for the admin and plugin menu

Post by cmb » Tue Dec 23, 2014 9:39 pm

svasti wrote:There is a case which I encountered several times in templates where the menu is on top of everything. When the viewport gets smaller, items of the admin menu are getting on top of the page menu, making it impossible to reach certain pages.
Actually, I'd call that a bug. The admin menu reserves a certain amount of space for itself by setting html {margin-top: Npx}, where N is calculated in PHP by catering for whether the "debug mode is on" message is shown or not. This worked fine until we made the admin menu responsive (apparently, I didn't notice the misbehavior while implementing that). I would suggest to fix this bug, what requires some JS. While we'd be at it, we could have as well moved the calculation and setting of the initial margin-top to JS as well -- what would have enabled the possibility to change the height of the menu bar in core.css.

However, the voting has been ended, and it had been decided to implement an icon solution.
svasti wrote:We could add a config variable, or a little java script, e.g. if viewport has less than 800px icons are shown? However as you don't like adding config vars nor java script, how would you do it?
I wouldn't introduce a config option to solve the issue pointed out above, because a user may normally administrate the site with their desktop browser, but occassionally with their mobile browser, so they would have to change the configuration each time. And the admin might even want to quickly test the look of the responsive site by resizing the browser window, or by using a tool such as the web developer toolbar's "View responsive layouts". IMO a JS solution would be overkill for a purely visual improvement, but of course it's fine to fix a real problem.

Anyhow, whatever solution will be implemented, any necessary JS could be added to XH.adaptAdminMenu().
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply