OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[chore] introduced floating wrapper
Eric Schubert342be23be772
diff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.htmlindex 346fe3c453d..18e72b2025b 100644--- a/frontend/src/app/spot/spot-docs.component.html+++ b/frontend/src/app/spot/spot-docs.component.html@@ -133,9 +133,13 @@ Currently selected value is {{ toggleValue }}</label></li><li class="spot-list--item">- <label class="spot-list--item-action">- <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Checkbox item with hover menu</div>+ <div class="spot-list--item-floating-wrapper">+ <!-- The floating wrapper enables correct hover effects, when the list items needs floating actions on hover.-->+ <!-- Always wrap the content of the list item and the floating actions into the wrapper, but not any sub lists.-->+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Checkbox item with hover menu</div>+ </label><div class="spot-list--item-floating-actions"><button class="spot-link"><span class="spot-icon spot-icon_folder-open"></span>@@ -147,7 +151,7 @@ Currently selected value is {{ toggleValue }}<span class="spot-icon spot-icon_file-doc"></span></button></div>- </label>+ </div></li><li class="spot-list--item"><label class="spot-list--item-action">@@ -156,15 +160,25 @@ Currently selected value is {{ toggleValue }}</label><ul class="spot-list"><li class="spot-list--item">- <label class="spot-list--item-action">- <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Child checkbox item</div>- </label>+ <div class="spot-list--item-floating-wrapper">+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Child checkbox item</div>+ </label>+ <div class="spot-list--item-floating-actions">+ <button class="spot-link">+ <span class="spot-icon spot-icon_folder-open"></span>+ </button>+ <button class="spot-link">+ <span class="spot-icon spot-icon_file-doc"></span>+ </button>+ </div>+ </div><ul class="spot-list"><li class="spot-list--item"><label class="spot-list--item-action"><spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Secon level child</div>+ <div class="spot-list--item-title">Second level child</div></label></li></ul>@@ -175,6 +189,22 @@ Currently selected value is {{ toggleValue }}<div class="spot-list--item-title">Second child checkbox item</div></label></li>+ <li class="spot-list--item">+ <div class="spot-list--item-floating-wrapper">+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Second child checkbox item with hover menu</div>+ </label>+ <div class="spot-list--item-floating-actions">+ <button class="spot-link">+ <span class="spot-icon spot-icon_folder-open"></span>+ </button>+ <button class="spot-link">+ <span class="spot-icon spot-icon_file-doc"></span>+ </button>+ </div>+ </div>+ </li><li class="spot-list--item"><label class="spot-list--item-action spot-list--item-action_disabled"><spot-checkbox@@ -198,9 +228,13 @@ Currently selected value is {{ toggleValue }}</label></li><li class="spot-list--item">- <label class="spot-list--item-action">- <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Checkbox item with hover menu</div>+ <div class="spot-list--item-floating-wrapper">+ <!-- The floating wrapper enables correct hover effects, when the list items needs floating actions on hover.-->+ <!-- Always wrap the content of the list item and the floating actions into the wrapper, but not any sub lists.-->+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Checkbox item with hover menu</div>+ </label><div class="spot-list--item-floating-actions"><button class="spot-link"><span class="spot-icon spot-icon_folder-open"></span>@@ -212,7 +246,7 @@ Currently selected value is {{ toggleValue }}<span class="spot-icon spot-icon_file-doc"></span></button></div>- </label>+ </div></li><li class="spot-list--item"><label class="spot-list--item-action">@@ -221,15 +255,25 @@ Currently selected value is {{ toggleValue }}</label><ul class="spot-list spot-list_compact"><li class="spot-list--item">- <label class="spot-list--item-action">- <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Child checkbox item</div>- </label>+ <div class="spot-list--item-floating-wrapper">+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Child checkbox item</div>+ </label>+ <div class="spot-list--item-floating-actions">+ <button class="spot-link">+ <span class="spot-icon spot-icon_folder-open"></span>+ </button>+ <button class="spot-link">+ <span class="spot-icon spot-icon_file-doc"></span>+ </button>+ </div>+ </div><ul class="spot-list spot-list_compact"><li class="spot-list--item"><label class="spot-list--item-action"><spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>- <div class="spot-list--item-title">Secon level child</div>+ <div class="spot-list--item-title">Second level child</div></label></li></ul>@@ -240,6 +284,22 @@ Currently selected value is {{ toggleValue }}<div class="spot-list--item-title">Second child checkbox item</div></label></li>+ <li class="spot-list--item">+ <div class="spot-list--item-floating-wrapper">+ <label class="spot-list--item-action">+ <spot-checkbox [(ngModel)]="listCheckboxValue"></spot-checkbox>+ <div class="spot-list--item-title">Second child checkbox item with hover menu</div>+ </label>+ <div class="spot-list--item-floating-actions">+ <button class="spot-link">+ <span class="spot-icon spot-icon_folder-open"></span>+ </button>+ <button class="spot-link">+ <span class="spot-icon spot-icon_file-doc"></span>+ </button>+ </div>+ </div>+ </li><li class="spot-list--item"><label class="spot-list--item-action spot-list--item-action_disabled"><spot-checkboxdiff --git a/frontend/src/app/spot/styles/sass/components/list.sass b/frontend/src/app/spot/styles/sass/components/list.sassindex f827e03e4cd..f2294ec9b07 100644--- a/frontend/src/app/spot/styles/sass/components/list.sass+++ b/frontend/src/app/spot/styles/sass/components/list.sass@@ -13,9 +13,8 @@&-action@include spot-body-big- position: relativedisplay: flex- align-items: center+ align-items: flex-startjustify-content: flex-startpadding: $spot-spacing-0_5 $spot-spacing-1background-color: transparent@@ -26,19 +25,25 @@&:hoverbackground-color: $spot-color-basic-gray-6- .spot-list--item-floating-actions- opacity: 1-&_disabledcolor: $spot-color-basic-gray-3cursor: default+ &-floating-wrapper+ position: relative+ display: flex++ &:hover,+ &:focus-within+ background-color: $spot-color-basic-gray-6+&-floating-actionsopacity: 0position: absoluteright: 0- padding: inherit- background: linear-gradient(90deg, rgba(243, 243, 243, 0) 0%, $spot-color-basic-gray-6 11.98%)+ height: 100%+ padding: $spot-spacing-0_5 $spot-spacing-1+ background: linear-gradient(90deg, rgba($spot-color-basic-gray-6, 0) 0%, $spot-color-basic-gray-6 11.98%)> .spot-link&:not(:first-child)@@ -49,16 +54,23 @@&:not(:first-child)margin-left: $spot-spacing-0_5+&:not(:last-child)margin-left: $spot-spacing-0_5+ &-floating-wrapper:hover > &-floating-actions,+ &-floating-actions:focus-within,+ &-floating-actions:hover+ opacity: 1+&_compact &--item:not(:first-child)margin-top: $spot-spacing-0_25&--item > &_compact > &--item:first-childmargin-top: $spot-spacing-0_25- &_compact &--item-action+ &_compact &--item-action,+ &_compact &--item-floating-actionspadding: $spot-spacing-0_25 $spot-spacing-1$item-list: ""