Skip to content

Commit 8fffed7

Browse files
committed
remove side-changes
1 parent d3bf6a2 commit 8fffed7

File tree

11 files changed

+61
-120
lines changed

11 files changed

+61
-120
lines changed

docker-compose-light.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,8 @@ services:
162162
SCARF_ANALYTICS: "${SCARF_ANALYTICS:-}"
163163
# configuring the dev-server to use the host.docker.internal to connect to the backend
164164
superset: "http://superset-light:8088"
165-
# Webpack dev server configuration
166-
WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-127.0.0.1}"
167-
WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}"
168165
ports:
169-
- "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces
166+
- "127.0.0.1:${NODE_PORT:-9001}:9000" # Parameterized port
170167
command: ["/app/docker/docker-frontend.sh"]
171168
env_file:
172169
- path: docker/.env # default

superset-frontend/package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/matrixifyControls.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const matrixifyControls: Record<string, SharedControlConfig<any>> = {};
5353
...dndAdhocMetricControl,
5454
label: t(`Metrics`),
5555
multi: true,
56-
validators: [], // No validation for metrics
56+
validators: [], // No validation - rely on visibility
5757
renderTrigger: true,
5858
visibility: ({ controls }) =>
5959
controls?.[
@@ -109,8 +109,6 @@ const matrixifyControls: Record<string, SharedControlConfig<any>> = {};
109109
controls?.[`matrixify_mode_${axis}`]?.value === 'dimensions',
110110
};
111111

112-
// Dimension picker for TopN mode (just dimension, no values)
113-
// NOTE: This is now handled by matrixify_dimension control, so hiding it
114112
matrixifyControls[`matrixify_topn_dimension_${axis}`] = {
115113
type: 'SelectControl',
116114
label: t('Dimension'),
@@ -237,9 +235,6 @@ matrixifyControls.matrixify_charts_per_row = {
237235
!controls?.matrixify_fit_columns_dynamically?.value,
238236
};
239237

240-
// Remove matrixify_enabled - use layout enables directly
241-
242-
// Progressive disclosure controls for layout sections
243238
matrixifyControls.matrixify_enable_vertical_layout = {
244239
type: 'CheckboxControl',
245240
label: t('Enable vertical layout (rows)'),

superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ test('should create single group when fitting columns dynamically', () => {
7474

7575
const formData = {
7676
viz_type: 'test_chart',
77-
matrixify_enabled: true,
77+
matrixify_enable_vertical_layout: true,
78+
matrixify_enable_horizontal_layout: true,
7879
matrixify_fit_columns_dynamically: true,
7980
matrixify_charts_per_row: 3,
8081
matrixify_show_row_labels: true,
@@ -123,7 +124,8 @@ test('should create multiple groups when not fitting columns dynamically', () =>
123124

124125
const formData = {
125126
viz_type: 'test_chart',
126-
matrixify_enabled: true,
127+
matrixify_enable_vertical_layout: true,
128+
matrixify_enable_horizontal_layout: true,
127129
matrixify_fit_columns_dynamically: false,
128130
matrixify_charts_per_row: 3,
129131
matrixify_show_row_labels: true,
@@ -158,7 +160,8 @@ test('should handle exact division of columns', () => {
158160

159161
const formData = {
160162
viz_type: 'test_chart',
161-
matrixify_enabled: true,
163+
matrixify_enable_vertical_layout: true,
164+
matrixify_enable_horizontal_layout: true,
162165
matrixify_fit_columns_dynamically: false,
163166
matrixify_charts_per_row: 2,
164167
matrixify_show_row_labels: true,
@@ -186,7 +189,8 @@ test('should handle case where charts_per_row exceeds total columns', () => {
186189

187190
const formData = {
188191
viz_type: 'test_chart',
189-
matrixify_enabled: true,
192+
matrixify_enable_vertical_layout: true,
193+
matrixify_enable_horizontal_layout: true,
190194
matrixify_fit_columns_dynamically: false,
191195
matrixify_charts_per_row: 5,
192196
matrixify_show_row_labels: true,
@@ -216,7 +220,8 @@ test('should show headers for each group when wrapping occurs', () => {
216220

217221
const formData = {
218222
viz_type: 'test_chart',
219-
matrixify_enabled: true,
223+
matrixify_enable_vertical_layout: true,
224+
matrixify_enable_horizontal_layout: true,
220225
matrixify_fit_columns_dynamically: false,
221226
matrixify_charts_per_row: 2,
222227
matrixify_show_row_labels: true,
@@ -250,7 +255,8 @@ test('should show headers only on first row when not wrapping', () => {
250255

251256
const formData = {
252257
viz_type: 'test_chart',
253-
matrixify_enabled: true,
258+
matrixify_enable_vertical_layout: true,
259+
matrixify_enable_horizontal_layout: true,
254260
matrixify_fit_columns_dynamically: true, // No wrapping
255261
matrixify_show_row_labels: true,
256262
matrixify_show_column_headers: true,
@@ -279,7 +285,8 @@ test('should hide headers when disabled', () => {
279285

280286
const formData = {
281287
viz_type: 'test_chart',
282-
matrixify_enabled: true,
288+
matrixify_enable_vertical_layout: true,
289+
matrixify_enable_horizontal_layout: true,
283290
matrixify_show_row_labels: false,
284291
matrixify_show_column_headers: false,
285292
};
@@ -306,7 +313,8 @@ test('should place cells correctly in wrapped layout', () => {
306313

307314
const formData = {
308315
viz_type: 'test_chart',
309-
matrixify_enabled: true,
316+
matrixify_enable_vertical_layout: true,
317+
matrixify_enable_horizontal_layout: true,
310318
matrixify_fit_columns_dynamically: false,
311319
matrixify_charts_per_row: 2,
312320
matrixify_show_row_labels: true,
@@ -336,7 +344,8 @@ test('should handle null grid gracefully', () => {
336344

337345
const formData = {
338346
viz_type: 'test_chart',
339-
matrixify_enabled: true,
347+
matrixify_enable_vertical_layout: true,
348+
matrixify_enable_horizontal_layout: true,
340349
};
341350

342351
const { container } = renderWithTheme(
@@ -357,7 +366,8 @@ test('should handle empty grid gracefully', () => {
357366

358367
const formData = {
359368
viz_type: 'test_chart',
360-
matrixify_enabled: true,
369+
matrixify_enable_vertical_layout: true,
370+
matrixify_enable_horizontal_layout: true,
361371
};
362372

363373
const { container } = renderWithTheme(
@@ -381,7 +391,8 @@ test('should use default values for missing configuration', () => {
381391

382392
const formData = {
383393
viz_type: 'test_chart',
384-
matrixify_enabled: true,
394+
matrixify_enable_vertical_layout: true,
395+
matrixify_enable_horizontal_layout: true,
385396
// Missing optional configurations
386397
};
387398

superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,13 @@ function MatrixifyGridRenderer({
128128
[formData],
129129
);
130130

131-
// Determine layout parameters
132-
const showRowLabels = formData.matrixify_show_row_labels ?? true;
133-
const showColumnHeaders = formData.matrixify_show_column_headers ?? true;
131+
// Determine layout parameters - only show headers/labels if layout is enabled
132+
const showRowLabels =
133+
formData.matrixify_enable_vertical_layout === true &&
134+
(formData.matrixify_show_row_labels ?? true);
135+
const showColumnHeaders =
136+
formData.matrixify_enable_horizontal_layout === true &&
137+
(formData.matrixify_show_column_headers ?? true);
134138
const rowHeight = formData.matrixify_row_height || DEFAULT_ROW_HEIGHT;
135139
const fitColumnsDynamically =
136140
formData.matrixify_fit_columns_dynamically ?? true;

superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.test.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ test('isMatrixifyEnabled should return false when no matrixify configuration exi
3737
expect(isMatrixifyEnabled(formData)).toBe(false);
3838
});
3939

40-
test('isMatrixifyEnabled should return false when matrixify_enabled is false', () => {
40+
test('isMatrixifyEnabled should return false when layout controls are false', () => {
4141
const formData = {
4242
viz_type: 'table',
43-
matrixify_enabled: false,
43+
matrixify_enable_vertical_layout: false,
44+
matrixify_enable_horizontal_layout: false,
4445
matrixify_mode_rows: 'metrics',
4546
matrixify_rows: [createMetric('Revenue')],
4647
} as MatrixifyFormData;
@@ -51,7 +52,7 @@ test('isMatrixifyEnabled should return false when matrixify_enabled is false', (
5152
test('isMatrixifyEnabled should return true for valid metrics mode configuration', () => {
5253
const formData = {
5354
viz_type: 'table',
54-
matrixify_enabled: true,
55+
matrixify_enable_vertical_layout: true,
5556
matrixify_mode_rows: 'metrics',
5657
matrixify_mode_columns: 'metrics',
5758
matrixify_rows: [createMetric('Revenue')],
@@ -64,7 +65,7 @@ test('isMatrixifyEnabled should return true for valid metrics mode configuration
6465
test('isMatrixifyEnabled should return true for valid dimensions mode configuration', () => {
6566
const formData = {
6667
viz_type: 'table',
67-
matrixify_enabled: true,
68+
matrixify_enable_vertical_layout: true,
6869
matrixify_mode_rows: 'dimensions',
6970
matrixify_mode_columns: 'dimensions',
7071
matrixify_dimension_rows: { dimension: 'country', values: ['USA'] },
@@ -77,7 +78,7 @@ test('isMatrixifyEnabled should return true for valid dimensions mode configurat
7778
test('isMatrixifyEnabled should return true for mixed mode configuration', () => {
7879
const formData = {
7980
viz_type: 'table',
80-
matrixify_enabled: true,
81+
matrixify_enable_vertical_layout: true,
8182
matrixify_mode_rows: 'metrics',
8283
matrixify_mode_columns: 'dimensions',
8384
matrixify_rows: [createMetric('Revenue')],
@@ -90,7 +91,7 @@ test('isMatrixifyEnabled should return true for mixed mode configuration', () =>
9091
test('isMatrixifyEnabled should return true for topn dimension selection mode', () => {
9192
const formData = {
9293
viz_type: 'table',
93-
matrixify_enabled: true,
94+
matrixify_enable_vertical_layout: true,
9495
matrixify_mode_rows: 'dimensions',
9596
matrixify_mode_columns: 'dimensions',
9697
matrixify_dimension_rows: {
@@ -109,7 +110,7 @@ test('isMatrixifyEnabled should return true for topn dimension selection mode',
109110
test('isMatrixifyEnabled should return false when both axes have empty metrics arrays', () => {
110111
const formData = {
111112
viz_type: 'table',
112-
matrixify_enabled: true,
113+
matrixify_enable_vertical_layout: true,
113114
matrixify_mode_rows: 'metrics',
114115
matrixify_mode_columns: 'metrics',
115116
matrixify_rows: [],
@@ -122,7 +123,7 @@ test('isMatrixifyEnabled should return false when both axes have empty metrics a
122123
test('isMatrixifyEnabled should return false when both dimensions have empty values and no topn mode', () => {
123124
const formData = {
124125
viz_type: 'table',
125-
matrixify_enabled: true,
126+
matrixify_enable_vertical_layout: true,
126127
matrixify_mode_rows: 'dimensions',
127128
matrixify_mode_columns: 'dimensions',
128129
matrixify_dimension_rows: { dimension: 'country', values: [] },
@@ -140,7 +141,7 @@ test('getMatrixifyConfig should return null when no matrixify configuration exis
140141
test('getMatrixifyConfig should return valid config for metrics mode', () => {
141142
const formData = {
142143
viz_type: 'table',
143-
matrixify_enabled: true,
144+
matrixify_enable_vertical_layout: true,
144145
matrixify_mode_rows: 'metrics',
145146
matrixify_mode_columns: 'metrics',
146147
matrixify_rows: [createMetric('Revenue')],
@@ -158,7 +159,7 @@ test('getMatrixifyConfig should return valid config for metrics mode', () => {
158159
test('getMatrixifyConfig should return valid config for dimensions mode', () => {
159160
const formData = {
160161
viz_type: 'table',
161-
matrixify_enabled: true,
162+
matrixify_enable_vertical_layout: true,
162163
matrixify_mode_rows: 'dimensions',
163164
matrixify_mode_columns: 'dimensions',
164165
matrixify_dimension_rows: { dimension: 'country', values: ['USA'] },
@@ -182,7 +183,7 @@ test('getMatrixifyConfig should return valid config for dimensions mode', () =>
182183
test('getMatrixifyConfig should handle topn selection mode', () => {
183184
const formData = {
184185
viz_type: 'table',
185-
matrixify_enabled: true,
186+
matrixify_enable_vertical_layout: true,
186187
matrixify_mode_rows: 'dimensions',
187188
matrixify_mode_columns: 'dimensions',
188189
matrixify_dimension_rows: {
@@ -212,7 +213,7 @@ test('getMatrixifyValidationErrors should return empty array when matrixify is n
212213
test('getMatrixifyValidationErrors should return empty array when properly configured', () => {
213214
const formData = {
214215
viz_type: 'table',
215-
matrixify_enabled: true,
216+
matrixify_enable_vertical_layout: true,
216217
matrixify_mode_rows: 'metrics',
217218
matrixify_mode_columns: 'metrics',
218219
matrixify_rows: [createMetric('Revenue')],
@@ -225,7 +226,7 @@ test('getMatrixifyValidationErrors should return empty array when properly confi
225226
test('getMatrixifyValidationErrors should return error when enabled but no configuration exists', () => {
226227
const formData = {
227228
viz_type: 'table',
228-
matrixify_enabled: true,
229+
matrixify_enable_vertical_layout: true,
229230
} as MatrixifyFormData;
230231

231232
const errors = getMatrixifyValidationErrors(formData);
@@ -235,7 +236,7 @@ test('getMatrixifyValidationErrors should return error when enabled but no confi
235236
test('getMatrixifyValidationErrors should return error when metrics mode has no metrics', () => {
236237
const formData = {
237238
viz_type: 'table',
238-
matrixify_enabled: true,
239+
matrixify_enable_vertical_layout: true,
239240
matrixify_mode_rows: 'metrics',
240241
matrixify_rows: [],
241242
matrixify_columns: [],
@@ -261,7 +262,7 @@ test('should handle empty form data object', () => {
261262
test('should handle partial configuration with one axis only', () => {
262263
const formData = {
263264
viz_type: 'table',
264-
matrixify_enabled: true,
265+
matrixify_enable_vertical_layout: true,
265266
matrixify_mode_rows: 'metrics',
266267
matrixify_rows: [createMetric('Revenue')],
267268
// No columns configuration

superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ export interface MatrixifyAxisConfig {
9696
* Complete Matrixify configuration in form data
9797
*/
9898
export interface MatrixifyFormData {
99-
// Enable/disable matrixify functionality (legacy)
99+
// Enable/disable matrixify functionality
100100
matrixify_enabled?: boolean;
101101

102-
// New layout enable controls
102+
// Layout enable controls
103103
matrixify_enable_vertical_layout?: boolean;
104104
matrixify_enable_horizontal_layout?: boolean;
105105

0 commit comments

Comments
 (0)