Plugin order in navigation bar

I have 2 plugins that add icons and/or text to navigation bar. The icon of the 1st plugin is always shown, while information presented by another plugin is displayed only when Octoprint is connected to the printer. Both plugins use < li >< /li > HTML tags and both have CSS style set to float: left. The 2nd plugin toggles its CSS style display between block and none

The issue I am having is not a bug but rather inconvenience and I just wonder if there is an easy way to address it. So the 1st is Enclosure plugin and the 2nd is Navbar Temperature plugin. When not connected, Enclosure plugin appears next to Settings icon (and that's where I want it to stay), but when connected, Navbar Temperature plugin "jumps" in between and shifts Enclosure plugin icon to the left.

Here is the image of disconnected state
navbar2

and here is of connected state
navbar1

I tried to set Enclosure plugin style to float: right, but then, by some reason, it reversed all elements of navigation bar.

So the question is - is there any way to keep Enclosure plugin next to Settings icon at all times?

Thanks

1 Like

Take a look at appearance.components.order.navbar in config.yaml:

http://docs.octoprint.org/en/master/configuration/config_yaml.html#appearance

Should be possible to solve your issue with something like this:

appearance:
  components:
    order:
      navbar:
      - plugin_enclosure
      - settings
      - systemmenu
      - login

in config.yaml

1 Like

Under appearance I had only color: red. Is that normal?

appearance:
  color: red

I added those lines and restarted Octoprint, but it did not make any difference

appearance:
  color: red
  components:
    order:
      navbar:
      - plugin_enclosure
      - settings
      - systemmenu
      - login

Thanks

Hm.... try a shift reload in your browser, I might have forgotten to let the order influence the cache keys

@foosel That did not help, but I found a workaround. I can use System Command Editor plugin (that is already installed) instead of Enclosure plugin.

One other quick UI related question - is there a way to keep Settings popup window open after clicking Save button and close it only when Close is clicked?

Thanks

No, that is currently not possible. Possibly stupid question but: why?

I'm building new printer plus am involved in Repetier ver.2 firmware beta testing, plus at the moment helping to troubleshoot Bedvisualizer plugin compatibility with Repetier. I often keep 2 browser windows open - one at Settings page another at one of regular tabs. Every time I change settings and want to test, Settings window goes away :(. Would be nice to have 3 buttons - 'Cancel', 'Apply' and 'Save & Close', but I understand, this is not a typical use case, so probably does not worth troubles changing design.

Thanks!

1 Like