project-alice-assistant / ProjectAlice

Main repository of Project Alice, contains main unit source code
GNU General Public License v3.0
695 stars 62 forks source link

GUI overhaul #307

Closed philipp2310 closed 3 years ago

philipp2310 commented 4 years ago

This is a collection of ideas that should (but don't have to) be improved with the web UI.

Please don't add anymore to this list if it is not REQUIRED for a smooth process in the b5 release as a stabilization phase was started

New Ideas will be in the next Epic found here #360

TODOs for Merge with b5

hipitihop commented 4 years ago

I'd like to add a proposal to the list, consider using React https://reactjs.org/tutorial/tutorial.html#what-is-react

Psychokiller1888 commented 3 years ago

Re parenting... ATM I did not do it as this can easily go down a rabbit hole. We'll see if I get an idea

Now, re multi instances. It basically completly works as of now BUT... Javascript.... Where styles can be "scoped" to their parent div and not override same named classes. JS cannot. That means, on the same page, if you have twice the "time" widget active, only one will work, because well... They use the same target ids, the same function names etc etc and are loaded twice. This is really really problematic. One thing could be made core side though....

Question is, what do I forget?

Psychokiller1888 commented 3 years ago

@hipitihop

I'd like to add a proposal to the list, consider using React https://reactjs.org/tutorial/tutorial.html#what-is-react

Went for Vue.js

LazzaAU commented 3 years ago

Observations noticed while testing the new interface. (viewed on firefox)

1.

Kazam_screenshot_00044

  1. The following buttons seem to of stopped working in the skills tab

Settings button works. The following is in the console , can expand any relevant error if required.

Kazam_screenshot_00046

LazzaAU commented 3 years ago

i can confirm the three buttons work in the skill tab again.

Clicking the "stop" button then refreshing the page takes the skill out of alphabetical order and places it to the bottom of the page. If your unaware of this new shift ( as in someone like me with a small screen that has to scroll) then you may deem it to be broken cause the skill disappears. When in fact it hasn't its just moved

Starting the skill again does not move it back to alphabetical order where you are used to it being. unless you restart

skillOrder

LazzaAU commented 3 years ago

and sorry if i'm jumping ahead of things here but assume your aware of this also

delete skill

philipp2310 commented 3 years ago
Click to expand solved Bugs: - [x] newly installed skills are only shown after reloading the skill page - [x] skills -> shop -> Ok/Install -> Toolbar switches, screen stays in the shop ![link.gif](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/3a9a5f0f-69c0-43bb-841e-979326934138) - [x] skills shop shows already installed skills (like AliceCore) ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/fec3ffbe-fea1-4912-9be8-6212579d55e9) - [x] switching from skill shop to any other page and back creates same inconsistent state with the toolbar as above ![link.gif](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/cf7f558b-d3b4-41ed-8c43-f86783d0adef) - [x] myHome: switching from floor painter to any other tool won't remove the floor tile from the mouse pointer but still will place the correct item. Deselecting floor isn't working as well: Only ESC works - [x] myHome: Adding a device: The skill is shown even if there is no device available for adding (for example it shows ALICECORE, but it is not clickable) Other deviceTypes (AliceSatellite, Vaccum) seem not yet implemented although the skill contains the deviceType dict ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/c09529fc-a59f-442b-9b16-c507dee0bafa) - [x] myHome: Linking starts, but no connection from AliceCore to a room is possible: red border, no error message on click - [x] myHome: Linking from device to device is possible (feature was on my list as well, but isn't intended in that case I guess) ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/f80716ee-98ae-46f3-bf0d-5491cf6ac635) - [x] myHome: Links are not removed when switching to another page, for example widgets: ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/22db83c0-1143-4391-a4f9-c899d99fea95) -->followup error from failed device to device link - [x] skills: Turning off a skill, won't change the icon until reloaded with F5, starting works ![link.gif](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/facbaba8-04b0-4719-8014-f4a5295e824e) - [x] myHome: dragging the map around while clicked on a location is not possible (had to get that device at 50k px -> 50k px large location - hard to miss while dragging..) -> not happens all the time as it seems - [x] uninstalled skill only reappears in the shop after restarting Alice - [x] leaving widgets on tab 2 to another page (skills, myHome..) and returning to widgets, will show the widgets of tab 2, but will show tab 1 as selected ![link.gif](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/94f14772-7b87-458f-b4ab-0159cbcddd33) - [x] widgets not working on second opening of the page - [x] parenting of devices seems to keep absolut x/y values: moved AliceCore from no location to a location, now it is gone, F12 shows it off the screen (NOT ALWAYS! Actually couldn't reproduce a second time - might be caused by rotations as well, they behave strange when you drop a rotated device on or out of rotated rooms): ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/efc2dd62-ac3a-4cfb-a02f-227a25c0f0a0) - [x] myHome: adding two devices to one room gives error: ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/13d02f3b-c25f-4e90-9ad3-b65636cb64b4) - [x] myHome: devices of zigbee/vacuum have a icon on creation, but no icon after restart of alice - [x] myHome: switching from any tool (device or location) to the adding tool required deselection of the prev. tool Added features - after the initial version: - [x] Up- and download of widget presets - [x] myHome removal of links - [x] myHome device settings - [x] myHome link settings -- including for the location the device is in Improvements: - [x] Adding devices should maybe be grouped by skills like widgets? - [x] Syslog should maybe started by default - if you never clicked on it, the screen is empty - [x] Add a direct link from renaming of widget tabs to FA - [x] search functionality for admin options (e.g. one free text field, if there is something entered, hide every option that is not containing that string) - [x] a marking of the center of the 100k*100k area would be nice, maybe even with arrows pointing in that direction once you are lost at 0px*0px (shouldn't be necessary, but once you have to go there, it is hard to come back... - [x] myHome: dragging a location by clicking in the center (on the text) opens the "please enter new name" popup after dropping - [x] myHome: moving a location is not sending the new position (but the old) to aliceCore via API - [x] Skills: FailedSkills are not shown - [x] Skills: FailedSkills don't show enough information and Settings must be available. Skills with API aren't start able without changing the settings manually in the file - [x] Skills: Changing settings gives an error in console - but works ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/9ec50d3b-7802-405e-a6c7-bbfe5e5385d9) - [x] Moving a device to a new location won't create a link to the new parent location --- creating a new link to the parent manually is not possible - [x] Moving a device to a room with active link removes the link after reload, but shows save error right away - [x] live updates of the links --- [ ] creating a new device won't show a link to the parent room until reloading --- [ ] removing a device keeps the link in ui until refreshed ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/71aede48-26ec-4beb-82a0-402d6609a9ca) - [x] Name of the device is shown for mouseOver of the whole - invisible - status bar, even if another device would be exactly in that spot ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/22e31f12-e0b2-4530-acef-6946b9cd773c) - [x] Device._displayName is currently held in two different positions. Once as the variable, and second as default config value. Second one is shown in UI, first one is set for new devices. Device.py line 40 vs line 67 - [x] resizing a rotated widget has wrong (pre-rotation) bounding box - hard to fix, but still worth mentioning.. -- TODO remove vue-draggable-resizable and use same as my home ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/da95473d-4405-49b9-91f9-a9b56a803820) - [x] without ever changing the page for widgets, adding a widget is not possible (guess page id is not set - reproduce by deleting cookies) [WidgetManager] Tried to add widget Clock from skill DateDayTimeYear to page id 0 but the page doesn't exist#033[0m __Not reproduceable anymore, might have been messed up pages?__ - [x] many functions not working when "remember login" is NOT selected, working fine when login is remembered - [x] after clearing cache: Skills Tour seems not to be working anymore "TypeError: this.skills.push is not a function" in skills.js line 123 - [x] Error message at end of skills tour: ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/5ad50e0b-79e4-4fc3-8737-86274d13a6a5) - [x] heartbeat broken edge is blocking clicks - [x] somehow the wrong toolbar in skills is back? Couldn't find a way to call toggle from "extern" ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/162bd8eb-3289-40cb-b8a7-36937f36873c) - [x] Newly installed skills don't appear in UI anymore, only after reload - [x] :snowflake::snowflake::snowflake: widget options, value of slider for visibility and font size isn't fixed width and causes the page to jump a bit - [x] pressing enter in the "change widget tab icon" dialog causes a page reload but won't save the changed icon - [x] clicking on an already opened tab in the widget pages causes the following error for the already present widgets: ![image.png](https://images.zenhubusercontent.com/5f515779be05344e0b2e027e/2b144df9-ebf8-414e-b00e-b60c5ba9e41d) - [x] "Connect" has a confusing state on failed connection when the IP/Port have been saved before: IP and Port are filled, "remember" is set to false. If you connect now, the IP/Port will still be saved (from before) although the remember was set to false. Could maybe show "remember" when displaying IP/Port from earlier and if "remember" is set to false, delete the saved information - [x] personal Opinion: pressing ESC while linking is active from a device should only deselect the device, not deselect the tool.. maybe ;)

rest moved to #369

Improvements: - [x] concept for Telemetry: moved to #360

Psychokiller1888 commented 3 years ago

Devices are grouped by skills, with html dropdown list titles

Psychokiller1888 commented 3 years ago

Re myHome: Linking starts, but no connection from AliceCore to a room is possible: red border, no error message on click

On your screenshot it looks like Alice isn't placed in a location?

philipp2310 commented 3 years ago

correct, it got initially placed in no room (parent was 0 I think)

Psychokiller1888 commented 3 years ago

Yes, because there's no room by default instead of Hive as you had. Maybe we shouldn't display Alice until there's a room created by the user and automatically add Alice to that location?

Psychokiller1888 commented 3 years ago

Or auto create the first location as you did

philipp2310 commented 3 years ago

Should be easily done by just adding it initially to room 1 (just deleted my room with alice inside, added a new one and alice appeared in it)

Psychokiller1888 commented 3 years ago

true

Psychokiller1888 commented 3 years ago

Actually, Imma re-add your first location "The Hive", so when the user first opens the myHome page, there's a location, where we can then play the tour to explain the functions

Psychokiller1888 commented 3 years ago

Uninstall skill will reappear in shop after the shop data has been fetched again`. Core checks every 15 minutes, and UI asks core store data every 5 minutes. I'm hesitating to trigger a store update after a skill deletion, because if a user delete 5 skills in a row, that's 5 store refresh. Thoughts?

Psychokiller1888 commented 3 years ago

Re widgets page bug after changing main page, I honestly have no freaking idea why this happens. Added logs, the activeTabId is always correct, but the wrong class is applied to the tab

philipp2310 commented 3 years ago

Uninstall skill will reappear in shop [...]

In my case it was the broken zigbee stick -> "Let's try reinstalling zigbee2mqtt" How about a "dirty"-flag when you uninstall, that will force a UI reload of the store even if the 5 min aren't passed yet? That shouldn't trigger too often - unless the user really uninstalls one skill -> store -> uninstall next skill -> store... Core store refresh every 15 minutes is more than enough, I wouldn't touch that.

Psychokiller1888 commented 3 years ago

Yeah, did not think about re installing case... We could maybe also use the "skill deleted" mqtt topic and re add the skill in the store, simply?

Psychokiller1888 commented 3 years ago

Re finding the center of floorplan, I started to add an arrow that will show the center of the map. And when you click it the map is reset to center with 1.0 zoom. I also added floorplan position and zoom saving

LazzaAU commented 3 years ago

New Interface Feature ? - Voice selection.

Not sure if this is already added or in the pipeline, but i'd like to suggest

. This would later allow a user to select a TTS voice from a drop down list for the appropriate engine selected.

Psychokiller1888 commented 3 years ago

Yep, wanted that since long

Psychokiller1888 commented 3 years ago

Can't repro the prevent redundant navigation

philipp2310 commented 3 years ago

prevent redundant navigation: just a cosmetic thing, not blocking the merge - I'll take a look after work :)

.then() for admin utils restart contains the switch to syslog - if you switch manually to syslog before the promise is fulfilled, you get the double navigation.

At least that is what I read out of the constellation (was repeatable for me) - if it is true, I should be able to fix it later ^^

Psychokiller1888 commented 3 years ago

Oh, ok, when coming from admin that auto leads to syslog, then I get it

Psychokiller1888 commented 3 years ago

Good if we get rid of them, but I think you don't see those messages in production mode, once built

LazzaAU commented 3 years ago

Have started a thread for observations and bugs noticed with the merged new-interface. Issue #369

philipp2310 commented 3 years ago

Closing this issue and collecting any open points from this issue in the corresponding topics. Awesome job! The new interface feels so good :)