ESPUI icon indicating copy to clipboard operation
ESPUI copied to clipboard

Clarification needed for Tabs limitations in the documentation

Open nguzeldere opened this issue 4 years ago • 4 comments

Describe the bug The following description in Tabs section of README is not clear: "Note that the basic functions to add controls like ESPUI.button() or ESPUI.slider() do not add to any tab, so they are good for building small UIs. However if you need to use tabs then you will have to add all your controls using the full ESPUI.addControl() function." To Reproduce Steps to reproduce the behavior:

  1. Go to 'README' Tabs section, see last paragraph.

Expected behavior A clear and concise description of Tabs functionality limitations.

Additional context if you would like to tell that some functions cannot be added to Tabs, it would be nice to provide a better direction such as "ESPUI.button(), ESPUI.slider(), ...... and ....... cannot be combined with Tabs" or "only ...., ......, , ...... functions may be added to Tabs

nguzeldere avatar Apr 11 '22 14:04 nguzeldere

However if you need to use tabs then you will have to add all your controls using the full ESPUI.addControl() function."

That's very clear, at least to me. When using Tabs the ESPUI.addControl() function must be used to add all the control elements.

  • Thomas

thomastech avatar Apr 11 '22 15:04 thomastech

See tabgui example.

nodoubtman avatar Apr 13 '22 03:04 nodoubtman

When I first came to this library I did find it a little surprising that the ESPUI.addControl function is the only one that supports parent controls (tabs, grouped controls etc.).

I think I can probably clarify the documentation a little.

I've been quiet recently because work has ramped up, but I am about to drop a fairly significant addition. I'll roll into it a documentation update covering this point.

iangray001 avatar Apr 13 '22 09:04 iangray001

However if you need to use tabs then you will have to add all your controls using the full ESPUI.addControl() function."

That's very clear, at least to me. When using Tabs the ESPUI.addControl() function must be used to add all the control elements.

  • Thomas

If you start from documentation first it is not easy to understand, it is more meaningful after you have a look at function definitions.

nguzeldere avatar Apr 21 '22 05:04 nguzeldere