Browse Source

fix(admin-ui): Improve display of many channels on Product detail

Relates to #1431. There's currently no API that will allow us to partial-load the channels, so the
suggestions of lazy-loading the full list is not quite straightforward.

So for now here's at least a solution that should be usable.
Michael Bromley 3 years ago
parent
commit
87b8a539b0

+ 2 - 0
packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.scss

@@ -54,6 +54,8 @@ vdr-action-bar clr-toggle-wrapper {
 
 
 .channel-assignment {
 .channel-assignment {
     flex-wrap: wrap;
     flex-wrap: wrap;
+    max-height: 144px;
+    overflow-y: auto;
 }
 }
 
 
 .auto-rename-wrapper {
 .auto-rename-wrapper {

+ 11 - 0
packages/admin-ui/src/lib/catalog/src/components/product-variants-list/product-variants-list.component.scss

@@ -20,9 +20,11 @@
 .variant-container {
 .variant-container {
     transition: background-color 0.2s;
     transition: background-color 0.2s;
     min-height: 330px;
     min-height: 330px;
+
     &.disabled {
     &.disabled {
         background-color: var(--color-component-bg-200);
         background-color: var(--color-component-bg-200);
     }
     }
+
     .header-row {
     .header-row {
         display: flex;
         display: flex;
         align-items: center;
         align-items: center;
@@ -46,10 +48,13 @@
             flex-direction: row;
             flex-direction: row;
             height: 36px;
             height: 36px;
         }
         }
+
         .name {
         .name {
             flex: 1;
             flex: 1;
+
             ::ng-deep .clr-control-container {
             ::ng-deep .clr-control-container {
                 width: 100%;
                 width: 100%;
+
                 input.clr-input {
                 input.clr-input {
                     min-width: 100%;
                     min-width: 100%;
                 }
                 }
@@ -113,6 +118,7 @@
 
 
     .pricing {
     .pricing {
         display: flex;
         display: flex;
+
         > div {
         > div {
             margin-right: 12px;
             margin-right: 12px;
         }
         }
@@ -138,6 +144,10 @@
 
 
 .channel-assignment {
 .channel-assignment {
     justify-content: flex-end;
     justify-content: flex-end;
+    flex-wrap: wrap;
+    max-height: 110px;
+    overflow-y: auto;
+
     .btn {
     .btn {
         margin: 6px 12px 6px 0;
         margin: 6px 12px 6px 0;
     }
     }
@@ -146,6 +156,7 @@
 .out-of-stock-threshold-wrapper {
 .out-of-stock-threshold-wrapper {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
+
     clr-toggle-wrapper {
     clr-toggle-wrapper {
         margin-left: 24px;
         margin-left: 24px;
     }
     }