Skip to content

Commit a210ac4

Browse files
committed
feat: decrease default size of popup window
Fixes #4192 in support, this PR also adds media query support for auto-hiding table columns for narrower windows Fixes #4193
1 parent ba679d3 commit a210ac4

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

packages/core/src/webapp/defaults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ export default {
2424
}
2525

2626
export const popupWindowDefaults = {
27-
width: 672,
28-
height: 730
27+
width: 625,
28+
height: 625
2929
}

plugins/plugin-client-common/web/scss/components/Table/badges.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import '../common/narrow-window';
2+
13
.bx--data-table {
24
[data-tag='badge'] {
35
display: flex;
@@ -59,12 +61,6 @@
5961
}
6062
}
6163

62-
@mixin narrow-window {
63-
@media (max-width: 44rem) {
64-
@content;
65-
}
66-
}
67-
6864
@mixin badge-only {
6965
.bx--data-table-container .bx--data-table {
7066
th[data-key='STATUS'],

plugins/plugin-client-common/web/scss/components/Table/tables.scss

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import '../common/narrow-window';
2+
13
body[kui-theme-style] {
24
.bx--select--inline .bx--select-input {
35
fill: var(--color-text-01);
@@ -147,7 +149,15 @@ body .bx--data-table {
147149
}
148150
}
149151

150-
body[kui-theme-style] .repl.sidecar-visible {
152+
@mixin full-width-tables {
153+
.kui--data-table-wrapper {
154+
/* render tables full-width when sidecar is open https://github.com/IBM/kui/issues/3952 */
155+
flex: 1;
156+
}
157+
.kui--paginated-table {
158+
flex: 1;
159+
}
160+
151161
.repl-result {
152162
width: 100%;
153163

@@ -176,10 +186,13 @@ body[kui-theme-style] .repl.sidecar-visible {
176186
}
177187
}
178188

179-
.sidecar-visible .kui--data-table-wrapper {
180-
/* render tables full-width when sidecar is open https://github.com/IBM/kui/issues/3952 */
181-
flex: 1;
189+
body[kui-theme-style] .repl.sidecar-visible {
190+
@include full-width-tables;
191+
}
192+
@include narrow-window {
193+
@include full-width-tables;
182194
}
195+
183196
.kui--data-table-wrapper {
184197
overflow-x: auto;
185198
}
@@ -188,6 +201,3 @@ body[kui-theme-style] .repl.sidecar-visible {
188201
display: flex;
189202
flex-direction: column;
190203
}
191-
.sidecar-visible .kui--paginated-table {
192-
flex: 1;
193-
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@mixin narrow-window {
2+
@media (max-width: 44rem) {
3+
@content;
4+
}
5+
}

0 commit comments

Comments
 (0)