ioBroker / ioBroker.admin

user interface for configuration and administration
https://iobroker.net
MIT License
270 stars 79 forks source link

Easy creation of aliases. #1868

Closed GermanBluefox closed 1 year ago

GermanBluefox commented 1 year ago

I as an user want simply create an alias for existing state with context menu or something like this. I want to have an option to change the default path for alias.

Scrounger commented 1 year ago

@GermanBluefox What a coincidence :-)

Two days ago I also started to write / experiment a small adapter to create alias faster and more user friendly. My idea is to be able to create and edit alias for a datapoint via the custom dialog. Would have the advantage that firstly you have an indicator that there is an alias for this data point and you can create the alias directly from the data point. Today you have to do a lot of click or copy and paste work.

However, I have found that the space of the custom dialog is not enough to create a clear table in my opinion and that the menu of autcomplete is no longer legible, here is a screenshot of my attempt: grafik

In my opinion it is important that you get the already existing folder / channel structure suggested by autocomplete, independent of the id - as I had already implemented in the linkeddevices adapter.

These were my first attempts.

But maybe you have better ideas? Maybe an extra custom dialog only for alias would be the better choice? In my opinion, the alias should always be generated from the data point - that was also the feedback I received from linkeddevices from the community.

Apollon77 commented 1 year ago

Please do not do this adapter approach because this will end in chaos because users will expect that all aliases are automatically listed that way which will never be the case. Additionally as soon as someone edits the alias which felt out of such a config in admin directly (or whatever) thenthe data will be different of you need to have a lot of logic to keep all this in sync.

The idea is exactly to have an option "at the datapoint" to easiely create an alias from it (as one time action).

Scrounger commented 1 year ago

I don't understand why this should end in chaos. As you wrote, you have to make sure that everything stays in sync, then everything will be listed. Certainly not trivial but also not different as I have already implemented it with the linkeddevices adapter.

Then I'll wait and see and look forward to the out of the box solution. Hopefully you will focus on the best possible useability. As mentioned above, an autocomplete that maps the folder / channel / devices structure would be a great feature, which would greatly contribute to the useablitiy incl. auto creation of parent objects. I think that for many it is so that the own alias structures grow with time and then it is always tedious to have to click and search through the whole tree.

Apollon77 commented 1 year ago

I don't understand why this should end in chaos.

I agree that it is all possible to develop ... and also easy when you assume that all "parts" of it are executed, But as soon as e.g. "The adapter that wants to manage this" is stopped/crashes (whatever/whyever) or users delete and re-import object trees or or or then it will get very fast very complicated and then it is near to impossible to know what is "the correct state".

In theory we would need the js-controller for such a task and we could imagine to add something like this in controller 5 because we would need only "the master controller" (yes since controler 4 we internally have also in multihost "one controller defined as master") to own this ... but on changeover cases we have a data consistancy issue again ... This is the main reason why we decided against a "two side referenced" alias system and for just the "one side references" as we have it now. It is all about guaranteed data consistancy

foxriver76 commented 1 year ago

I think devices adapter is widely used for this scenario nowadays or do I miss something here?