Skip to content

[Feature] Split Interfaces page into separate tab per interface#5498

Merged
TD-er merged 26 commits intoletscontrolit:megafrom
tonhuisman:feature/Menu-interfaces-split-into-tabs
Mar 17, 2026
Merged

[Feature] Split Interfaces page into separate tab per interface#5498
TD-er merged 26 commits intoletscontrolit:megafrom
tonhuisman:feature/Menu-interfaces-split-into-tabs

Conversation

@tonhuisman
Copy link
Copy Markdown
Contributor

@tonhuisman tonhuisman commented Feb 21, 2026

Features:

  • Interfaces page separated into a tab per interface (I2C, SPI, Modbus)
  • Move PCF & MCP I2C Bus-selector (back) to Hardware page
  • Fix Custom SPI GPIO pin selector for User-defined SPI3_HOST
  • Fix compiler warning for i2cscanner command
  • Fix small display issue for P095 and P116 for Backlight pin in devices list

For each available Interfaces type a configuration page is available, currently I2C, SPI and Modbus (though the last one is still empty/TODO):
image
And in dark mode:
image

  • Default selected page is the first available enabled interface page, for most configurations that'll be I2C.
  • This setup allows for multiple Interfaces to be added easily (expected: CAN bus, mBus, w-mBus)

Additional features:

  • Collapsible sections on web pages
Screenshot - 01-03-2026 , 22_45_08
  • The first interface is expanded by default
  • Further interfaces are auto-expanded if they are configured, else they are collapsed by default
  • For I2C, the Multiplexer settings are collapsed by default, unless configured, then they are auto-expanded

TODO:

  • Testing
  • Update documentation (move lots of stuff from Hardware to Interfaces and Network plugin pages)

Screenshots updated: 2026-03-10

@tonhuisman
Copy link
Copy Markdown
Contributor Author

@chromoxdor Are you available for testing this PR, especially the collapsible sections, and the overall look and feel on non-Windows platform(s)?

@chromoxdor
Copy link
Copy Markdown
Contributor

I have not so much time but I am willing to procrastinate for a good cause 🙂

Comment thread docs/source/Network/Ethernet_rmii.repl Outdated
@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Feb 27, 2026

I am a bit unhappy about the structure and the CSS.
With very minimal CSS changes, we could achieve this:
Bildschirmfoto 2026-02-27 um 14 55 35

Bildschirmfoto 2026-02-27 um 14 55 48

The better html structure would be:
Bildschirmfoto 2026-02-27 um 10 44 37

@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Feb 27, 2026

If you want to test my css:

espeasy_default.css

@tonhuisman
Copy link
Copy Markdown
Contributor Author

If you want to test my css:

espeasy_default.css

You probably changed something more than just the css, as I don't get the same submenu display you have in your screenshot 🤔

@chromoxdor
Copy link
Copy Markdown
Contributor

The better html structure would be:

Sorry, I meant using the css with the HTML structure I recommended

@tonhuisman
Copy link
Copy Markdown
Contributor Author

Well, yeah, but to reduce code I used the 2 suffix instead of sub and submenu classes... AFAICS it's only class names that differ, not (really) structure?

@chromoxdor
Copy link
Copy Markdown
Contributor

Well, yeah, but to reduce code I used the 2 suffix instead of sub and submenu classes... AFAICS it's only class names that differ, not (really) structure?

Not quite. You change the whole body classname and put the sub menu in the header of the main menu.
My structure just adds a new header for the sub menu. Actually I wouldn't even need the extra class "sub".
In my opinion, this is the more flexible solution...

@chromoxdor
Copy link
Copy Markdown
Contributor

It is much harder with the given html structure to style the menubars in a way that it looks halfway consistent

@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Feb 27, 2026

I wa playing around and it seems there could be a way to style it with your structure...
Here a test css. but i am not 100% happy with it. :)

espeasy_default.css

@chromoxdor
Copy link
Copy Markdown
Contributor

just updated the css file

@chromoxdor
Copy link
Copy Markdown
Contributor

I got late yesterday, so I did not write anything anymore.
From a "programmers" point of view, I really like your approach with adding the number and the loop.
And we definitely can keep it that way since it can be styled "good enough". In the last CSS file I sent, I almost got it to a similar look as in the pictures I posted. Hope you like it.
I made some additional changes to accommodate the increased number of tabs. I added scrolling to the menubar since I couldn't reach the toolbar on my phone anymore, and cramming more symbols into the given space makes no sense in terms of usability anymore. I also changed white-space: nowrap for the unit name since longer unit names were bleeding into the menubar on smartphones.

@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Feb 28, 2026

Some refinements:

espeasy_default.css
..updated..

@chromoxdor
Copy link
Copy Markdown
Contributor

sorry ton... I made another small change 😬:
espeasy_default.css

@tonhuisman
Copy link
Copy Markdown
Contributor Author

@chromoxdor You haven't made any comments (yet) about the collapsible sections, does that mean it is completely broken and not visible on your browser, or just working as expected?

@chromoxdor
Copy link
Copy Markdown
Contributor

@chromoxdor You haven't made any comments (yet) about the collapsible sections, does that mean it is completely broken and not visible on your browser, or just working as expected?

Ahhh, true...
This worked so well that I completely forgot about it. :)

You might consider adding the following for completeness, but it's not absolutely necessary:

summary {
	cursor: pointer;
}

@chromoxdor
Copy link
Copy Markdown
Contributor

...also not really necessary but nice when adding some padding.
You could add it to an existing entry:

input,
select,
textarea,
summary  {
	margin: 4px;
	padding: 4px 8px
}

But it all adds to the size, so I leave the decision to you. ;)

@tonhuisman
Copy link
Copy Markdown
Contributor Author

tonhuisman commented Mar 1, 2026

Looks much better, and also more (mobile) touch-friendly, those margins/paddings.
I'll set the cursor to default on the details element, instead of on summary. reverted that

@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Mar 4, 2026

Hey Ton, I actually chose the colour for the borders on purpose and I am not happy with the recent changes. It doesn’t look good in dark mode:
Bildschirmfoto 2026-03-04 um 23 09 03

Also, here it looks out of place. The dark mode actually doesn't need a border. That’s why I chose a colour that makes it look invisible.

Bildschirmfoto 2026-03-04 um 23 20 23 Bildschirmfoto 2026-03-04 um 23 20 35

@chromoxdor
Copy link
Copy Markdown
Contributor

Screenshot - 01-03-2026 , 22_40_31

Also, which browser did you use for the screenshot?
The bottom border of "interfaces" shouldn't be visually distinguishable from the menubar2 border.

Bildschirmfoto 2026-03-04 um 23 33 29

@tonhuisman
Copy link
Copy Markdown
Contributor Author

I'll do some more fine-tuning 👍

@tonhuisman
Copy link
Copy Markdown
Contributor Author

tonhuisman commented Mar 9, 2026

@chromoxdor I've restored the dark borders in dark mode, as by your adjustments, and slightly adjusted the height/top to achieve a more clean menu layout.
Screenshots in the initial comment are updated.

@chromoxdor
Copy link
Copy Markdown
Contributor

Almost ;)
If this is displayed correct in your browser we need to find another approach.
I am testing with safari, chrome, firefox and edge....
Bildschirmfoto 2026-03-10 um 19 49 08

@chromoxdor
Copy link
Copy Markdown
Contributor

Also the headermenu2 is not aligned anymore in relation to the menubar2...

Bildschirmfoto 2026-03-10 um 20 10 04

I could realign it all for you, but then we would be back at square one where I sent you my last CSS file.
Can you tell me what you want to archive/change.

@chromoxdor
Copy link
Copy Markdown
Contributor

Here the version that works perfectly on my side:
espeasy_default.css

@tonhuisman
Copy link
Copy Markdown
Contributor Author

I'm quite pleased with your corrections, so I'd say let's do this 😄

@tonhuisman
Copy link
Copy Markdown
Contributor Author

If this is displayed correct in your browser

I'm not using a MacBook, so don't have a Retina display, just a mere Full-HD display, and aging eyes... Used Zoom-it magnifying tool, but it didn't reveal that misalignment. Guess we'll have to leave the high-res graphics stuff to you 🤣

@chromoxdor
Copy link
Copy Markdown
Contributor

I'm not using a MacBook, so don't have a Retina display, just a mere Full-HD display,

Hey Ton, it's 2026! Retina displays are not exclusively an Apple thing anymore. Please go outside and treat yourself to a new computer...

and aging eyes...

...one with a big screen.
😜

@TD-er
Copy link
Copy Markdown
Member

TD-er commented Mar 10, 2026

I'm not using a MacBook, so don't have a Retina display, just a mere Full-HD display,

Hey Ton, it's 2026! Retina displays are not exclusively an Apple thing anymore. Please go outside and treat yourself to a new computer...

and aging eyes...

...one with a big screen. 😜

Ehhmm... it is 2026... have you seen the prices of RAM and a videocard?
Just the (non-Apple) RAM alone would already be close to 1000 euro.

@chromoxdor
Copy link
Copy Markdown
Contributor

Ehhmm... it is 2026... have you seen the prices of RAM and a videocard?
Just the (non-Apple) RAM alone would already be close to 1000 euro.

I did not. It has been a while since I bought myself a dedicated video card or RAM. Probably it's bad, and it gets worse.
But I would think the latest notebooks are not so much affected by it by now....

@tonhuisman

Can you add the following (best after line 476) for compatibility (browser before 2024)?

[class^="menubar"]::-webkit-scrollbar {
  display: none;
}

@tonhuisman
Copy link
Copy Markdown
Contributor Author

I'm not using a MacBook, so don't have a Retina display, just a mere Full-HD display,

Hey Ton, it's 2026! Retina displays are not exclusively an Apple thing anymore. Please go outside and treat yourself to a new computer...

and aging eyes...

...one with a big screen. 😜

Most of the work I put into ESPEasy is done with a lap-top laptop 🤣, there's a set of 27" QHD screens in my home-office, but those aren't welcome in the living room, and working in the home-office during the evenings and weekends also isn't 'socially accepted'... 😨
I'm already looking out for a new laptop, considering even an MBP, but the finances department still has some objections...

@chromoxdor
Copy link
Copy Markdown
Contributor

chromoxdor commented Mar 10, 2026

but those aren't welcome in the living room, and working in the home-office during the evenings and weekends also isn't 'socially accepted'... 😨

So you are allowed to work in the living room.... that's something 😁

I'm already looking out for a new laptop, considering even an MBP, but the finances department still has some objections...

I totally understand. These Apple products are eyewatering expensive, and if I hadn't had help, I wouldn't have bought a new one in 2023. It’s a 16" M2 MacBook Pro. But I am so happy with it and see no urge to upgrade anytime soon. It's still more than fast enough and the battery lasts almost the whole day. Most importantly, compiling ESPEasy is incredibly fast and the fan is even not turning on while doing it...

@TD-er TD-er merged commit ed8bc32 into letscontrolit:mega Mar 17, 2026
@tonhuisman tonhuisman deleted the feature/Menu-interfaces-split-into-tabs branch March 18, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants