richibrics / IoTuring

Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration
https://pypi.org/project/IoTuring/
GNU General Public License v3.0
82 stars 6 forks source link

New configuration UI, small fixes #83

Closed infeeeee closed 12 months ago

infeeeee commented 1 year ago

Configurator rewritten from the ground up.

I used this Inquirer implementation: InquirerPy Docs It had more features than the other one mentioned in #32

In MenuPreset I removed the modify_value_callback argument. The current usage of this tag was replaced by question_type, and InquirerPy has very powerful filters to sanitize the inputs: Filter docs

In MenuPreset, unused configuration options are not saved, simply omitted from the json. As per #73 they are not needed, we read them from defaults on startup.

TODO, Ideas: (maybe in another PR)


Unrelated to this, standardized some parts of the code:

Other files:

I tested this only on my main computer. Please check if it's working as expected on a Mac.

richibrics commented 1 year ago

It's incredible 😍 I'll try on macOS very soon

richibrics commented 1 year ago

Tested on macOS, I think it's working correctly.

The manage entities page is shows like in the picture, so if you don't scroll down the entire page you don't see the add entity button. What if we move it to the top ? And I'd add a "Active entities" label above the list of entities to express that those are the active entities. What do you think ? image

richibrics commented 1 year ago

macOS again: I don't think if it is a bug of the library, but if I am in a page and I press Escape then nothing happens. Then when I press a following key on the keyboard, it comes back to the previous page

richibrics commented 1 year ago

Update: It comes back with escape If you wait 3 seconds after pressing it. Instead if you press instantly another key after escape there is no delay

infeeeee commented 1 year ago

Escape: I also found that it's slow, for me it's not that much, it's a bit annoying, should I remove it?

The manage entities page : That's intended, I mean that's the default settings of max_height, it uses maximum 70% of the screen: https://inquirerpy.readthedocs.io/en/latest/pages/height.html#max-height I can take a look how it looks like at 100%

richibrics commented 1 year ago

Entities: okay but what about if we move the Add button to the top ? It would never disappear in this way. However setting to 100% the max-height (if doesn't look bad) could be an option too, in fact with the white space on the bottom it could seem like there's nothing else under the shown entities.

richibrics commented 12 months ago

Very good work, I read your code and seems good. You really did a great job ! 🚀

infeeeee commented 12 months ago

Do not pull yet, I have to update the new Disk entity first

richibrics commented 12 months ago

Yes sure

infeeeee commented 12 months ago

I think it's ready, questions, I'm not sure about:

richibrics commented 12 months ago

I think for consistency I'd put the Back below the Add. Do you like it ? I'd also leave the Escape button because however it's a great feature and very useful

infeeeee commented 12 months ago

Ok, I will move id up. I had an early version where it was the first in every menu