From f7a25a478dfacd1ad4b3d5e451729e46c09aaaec Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 8 Nov 2023 20:54:04 +0100 Subject: [PATCH] [UI] Dropdown component rewrite. Dropdown components should always be rendered under the root element, or nasty effects caused by absolute parenting may end up hiding dropdown elements regardless of their `z-index`. The new approach uses a single `` element in the main `App` file. Each `` component will push updates to the bus whenever it triggers open/close events, and the dropdown component to be rendered will be pushed upstream and rendered in the root element. --- platypush/backend/http/webapp/src/App.vue | 14 +- .../src/components/elements/Dropdown.vue | 125 ++++++++++-------- .../src/components/elements/DropdownBody.vue | 56 ++++++++ .../components/elements/DropdownContainer.vue | 38 ++++++ .../src/components/elements/DropdownItem.vue | 15 ++- .../http/webapp/src/style/themes/light.scss | 1 + 6 files changed, 182 insertions(+), 67 deletions(-) create mode 100644 platypush/backend/http/webapp/src/components/elements/DropdownBody.vue create mode 100644 platypush/backend/http/webapp/src/components/elements/DropdownContainer.vue diff --git a/platypush/backend/http/webapp/src/App.vue b/platypush/backend/http/webapp/src/App.vue index 8a8699a601..e344c906be 100644 --- a/platypush/backend/http/webapp/src/App.vue +++ b/platypush/backend/http/webapp/src/App.vue @@ -8,24 +8,31 @@ Would you like to install this application locally? + - diff --git a/platypush/backend/http/webapp/src/components/elements/DropdownBody.vue b/platypush/backend/http/webapp/src/components/elements/DropdownBody.vue new file mode 100644 index 0000000000..835c1fcca8 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/elements/DropdownBody.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/elements/DropdownContainer.vue b/platypush/backend/http/webapp/src/components/elements/DropdownContainer.vue new file mode 100644 index 0000000000..a39455aeb9 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/elements/DropdownContainer.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/elements/DropdownItem.vue b/platypush/backend/http/webapp/src/components/elements/DropdownItem.vue index 30998a821c..a9fc619b70 100644 --- a/platypush/backend/http/webapp/src/components/elements/DropdownItem.vue +++ b/platypush/backend/http/webapp/src/components/elements/DropdownItem.vue @@ -9,9 +9,9 @@