Skip to content

Commit 51364fd

Browse files
authored
Merge branch 'main' into CHARTS-10533-Support-full-title-on-mobile-widgets
2 parents 4d19643 + e54c82b commit 51364fd

File tree

16 files changed

+70
-37
lines changed

16 files changed

+70
-37
lines changed

.github/workflows/e2e_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
echo "reports/${{ github.head_ref || github.ref_name }}/${{ github.run_id }}/${{ github.run_attempt }}" > ./tests/artifacts/report-link
160160
echo "${{ github.event.pull_request.number }}" > ./tests/artifacts/report-pr
161161
162-
- uses: actions/upload-artifact@v3
162+
- uses: actions/upload-artifact@v4
163163
if: always()
164164
with:
165165
name: playwright-report

.github/workflows/i18n-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ concurrency:
2525
jobs:
2626
i18n_check:
2727
runs-on: ubuntu-latest
28-
if: github.actor != 'WeblateGravity' && github.event.pull_request.draft == false
28+
if: github.actor != 'datalens-weblate-robot' && github.event.pull_request.draft == false
2929
steps:
3030
- uses: actions/checkout@v4
3131
with:

.github/workflows/publish_platform.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ jobs:
8282
run: |
8383
mkdir -p ./workflow_ref
8484
echo "${{ env.NEW_BRANCH }}" > ./workflow_ref/ref
85-
- uses: actions/upload-artifact@v3
85+
- uses: actions/upload-artifact@v4
8686
with:
8787
name: workflow_ref
8888
path: ./workflow_ref/
89-
retention-days: 30
89+
retention-days: 30
90+
overwrite: true

.github/workflows/publish_platform_hotfix.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ jobs:
6262
run: |
6363
mkdir -p ./workflow_ref
6464
echo "${{ env.NEW_BRANCH }}" > ./workflow_ref/ref
65-
- uses: actions/upload-artifact@v3
65+
- uses: actions/upload-artifact@v4
6666
with:
6767
name: workflow_ref
6868
path: ./workflow_ref/
69-
retention-days: 30
69+
retention-days: 30
70+
overwrite: true

.github/workflows/statoscope_tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ jobs:
4141
name: statoscope-report
4242
path: ./report/statoscope/
4343
retention-days: 1
44+
overwrite: true

.github/workflows/statoscope_upload_main_stats.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ jobs:
2020
- uses: actions/upload-artifact@v4
2121
with:
2222
name: main-stats
23-
path: ./reference.json
23+
path: ./reference.json
24+
overwrite: true

package-lock.json

+34-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/server/modes/charts/plugins/datalens/preparers/backend-pivot-table/table-head-generator.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,15 @@ export const getRowHeaderCellMetadata = (args: GetHeaderCellMetadataArgs): Chart
123123
// Formatting a column cell
124124
if (isNumericalDataType(field.data_type)) {
125125
cell.type = 'number';
126-
cell.value = isNaN(Number(value)) ? value : Number(value);
127-
cell.formattedValue = chartKitFormatNumberWrapper(cell.value, {
128-
lang: 'ru',
129-
...getFormatOptions(field),
130-
});
131126
cell.fieldId = field.guid;
127+
128+
if (value !== null) {
129+
cell.value = isNaN(Number(value)) ? value : Number(value);
130+
cell.formattedValue = chartKitFormatNumberWrapper(cell.value, {
131+
lang: 'ru',
132+
...getFormatOptions(field),
133+
});
134+
}
132135
} else if (isDateField(field) && value) {
133136
cell.formattedValue = formatDate({
134137
valueType: field.data_type,

src/shared/types/dash.ts

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export type DashTabItem =
120120
| DashTabItemImage;
121121

122122
type BackgroundSettings = {
123+
enabled?: boolean;
123124
color: string;
124125
};
125126

src/ui/components/DashKit/plugins/Image/Image.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function PluginImage(props: Props, _ref?: React.LegacyRef<HTMLDivElement>) {
3232
w: null,
3333
};
3434
const backgroundEnabled = Boolean(
35-
background?.color && background?.color !== CustomPaletteColors.NONE,
35+
background?.enabled !== false &&
36+
background?.color &&
37+
background?.color !== CustomPaletteColors.NONE,
3638
);
3739
const {classMod, style} = React.useMemo(() => {
3840
return getPreparedWrapSettings(backgroundEnabled, background?.color);

src/ui/components/DashKit/plugins/Text/Text.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ const textPlugin = {
150150
const data = props.data as DashTabItemText['data'];
151151

152152
const showBgColor = Boolean(
153-
data.background?.color && data.background?.color !== CustomPaletteColors.NONE,
153+
data.background?.enabled !== false &&
154+
data.background?.color &&
155+
data.background?.color !== CustomPaletteColors.NONE,
154156
);
155157

156158
const {classMod, style} = getPreparedWrapSettings(showBgColor, data.background?.color);

src/ui/components/DashKit/plugins/Title/Title.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ const titlePlugin: PluginTitle = {
9696
const content = <DashKitPluginTitle {...props} ref={forwardedRef} />;
9797

9898
const showBgColor = Boolean(
99-
data.background?.color && data.background?.color !== CustomPaletteColors.NONE,
99+
data.background?.enabled !== false &&
100+
data.background?.color &&
101+
data.background?.color !== CustomPaletteColors.NONE,
100102
);
101103

102104
const {classMod, style} = getPreparedWrapSettings(showBgColor, data.background?.color);

src/ui/components/DashKit/plugins/Widget/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type CurrentTab = {
2121
autoHeight?: boolean;
2222
enableActionParams?: boolean;
2323
background?: {
24-
enabled: boolean;
24+
enabled?: boolean;
2525
color: string;
2626
};
2727
};

src/ui/components/Widgets/Chart/ChartWidget.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ export const ChartWidget = (props: ChartWidgetProps) => {
496496
}, [editMode, widgetType]);
497497

498498
const showBgColor = Boolean(
499-
currentTab.background?.enabled &&
499+
currentTab?.enabled !== false &&
500500
currentTab.background?.color &&
501501
currentTab.background?.color !== 'transparent',
502502
);

tests/opensource-suites/wizard/visualizations/pivot-table/formatting.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ datalensTest.describe('Wizard', () => {
2121
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));
2222

2323
await wizardPage.createNewFieldWithFormula('Null', 'float(null)');
24+
await wizardPage.sectionVisualization.addFieldByClick(
25+
PlaceholderName.PivotTableColumns,
26+
'Null',
27+
);
28+
await wizardPage.sectionVisualization.addFieldByClick(PlaceholderName.Rows, 'Null');
2429
await wizardPage.sectionVisualization.addFieldByClick(PlaceholderName.Measures, 'Null');
2530

2631
await expect(previewLoader).not.toBeVisible();

0 commit comments

Comments
 (0)