Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change transparent font settings #1823

Merged
merged 31 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5be63df
Change pransparrent font settings
DaryaLari Nov 19, 2024
71b490a
Change pransparrent font settings
DaryaLari Nov 19, 2024
4c9dc82
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Nov 19, 2024
7b3cc2c
Remove background enabling checkboxes & change title size switcher
DaryaLari Nov 21, 2024
0e17e39
Fix spacing
DaryaLari Nov 21, 2024
cfea5f3
Change pransparrent font settings
DaryaLari Nov 19, 2024
1e5a368
Remove background enabling checkboxes & change title size switcher
DaryaLari Nov 21, 2024
5508dfb
Fix spacing
DaryaLari Nov 21, 2024
d923900
Widgets refactoring
DaryaLari Nov 25, 2024
59db7a4
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Nov 28, 2024
08e424e
Merge branch 'main' into CHARTS-10652
DaryaLari Dec 2, 2024
944ac29
Merge branch 'main' into CHARTS-10652
DaryaLari Dec 2, 2024
35081bf
Merge branch 'main' into CHARTS-10652
DaryaLari Dec 3, 2024
acdb04a
Design fixes
DaryaLari Dec 5, 2024
e52607b
Design fixes
DaryaLari Dec 5, 2024
3c5971c
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Dec 5, 2024
3e04428
Change pransparrent font settings
DaryaLari Nov 19, 2024
dbb19ec
Remove background enabling checkboxes & change title size switcher
DaryaLari Nov 21, 2024
c2caebd
Fix spacing
DaryaLari Nov 21, 2024
de9cab3
Widgets refactoring
DaryaLari Nov 25, 2024
3b5dbf2
Change pransparrent font settings
DaryaLari Nov 19, 2024
836a1c5
Remove background enabling checkboxes & change title size switcher
DaryaLari Nov 21, 2024
6221dae
Fix spacing
DaryaLari Nov 21, 2024
365047f
Design fixes
DaryaLari Dec 5, 2024
362c7b8
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Dec 5, 2024
e70f44b
Change pransparrent font settings
DaryaLari Nov 19, 2024
16b8ae4
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Dec 5, 2024
f4a0abd
Change transparrent font settings
DaryaLari Nov 19, 2024
086fec8
Change sizes order
DaryaLari Dec 6, 2024
e01cd4e
Merge remote-tracking branch 'weblate/CHARTS-10652' into CHARTS-10652
DaryaLari Dec 6, 2024
e5038d0
Fix title input size
DaryaLari Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/i18n-keysets/dash.dialogs-common.edit/en.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"button_back": "Back"
"button_back": "Back",
"title_widget-settings": "Widget settings"
}
3 changes: 2 additions & 1 deletion src/i18n-keysets/dash.dialogs-common.edit/ru.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"button_back": "Назад"
"button_back": "Назад",
"title_widget-settings": "Настройки виджета"
}
1 change: 1 addition & 0 deletions src/i18n-keysets/dash.palette-background/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tooltip_click-to-select": "Select value",
"value_default": "Basic",
"value_transparent": "Transparent"
}
1 change: 1 addition & 0 deletions src/i18n-keysets/dash.palette-background/ru.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tooltip_click-to-select": "Выберите значение",
"value_default": "Базовый",
"value_transparent": "Прозрачный"
}
1 change: 1 addition & 0 deletions src/i18n-keysets/dash.title-dialog.edit/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"button_save": "Save",
"context_fill-title": "Enter title",
"field_show-in-toc": "Display in contents",
"label_size": "Size",
"label_title": "Title",
"toast_required-field": "The field cannot be empty",
"value_default": "Title"
Expand Down
1 change: 1 addition & 0 deletions src/i18n-keysets/dash.title-dialog.edit/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"button_save": "Сохранить",
"context_fill-title": "Введите заголовок",
"field_show-in-toc": "Отображать в оглавлении",
"label_size": "Размер",
"label_title": "Заголовок",
"toast_required-field": "Поле должно быть заполнено",
"value_default": "Заголовок"
Expand Down
1 change: 0 additions & 1 deletion src/shared/types/dash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export type DashTabItem =

type BackgroundSettings = {
color: string;
enabled: boolean;
};

export interface DashTabItemBase {
Expand Down
2 changes: 2 additions & 0 deletions src/shared/types/utility-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ export type NonNullableBy<T, K extends keyof T> = Omit<T, K> & NoUndefinedField<
type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;

export const objectKeys = Object.keys as <T extends object>(value: T) => Array<ObjectKeys<T>>;

export type ValueOf<T extends object> = T[keyof T];
3 changes: 2 additions & 1 deletion src/ui/components/DashKit/plugins/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {Plugin, PluginWidgetProps} from '@gravity-ui/dashkit';
import block from 'bem-cn-lite';
import type {DashTabItemImage} from 'shared';
import {DashTabItemType} from 'shared';
import {CustomPaletteColors} from 'ui/units/dash/containers/Dialogs/components/PaletteBackground/PaletteBackground';

import {useBeforeLoad} from '../../../../hooks/useBeforeLoad';
import {getPreparedWrapSettings} from '../../utils';
Expand Down Expand Up @@ -31,7 +32,7 @@ function PluginImage(props: Props, _ref?: React.LegacyRef<HTMLDivElement>) {
w: null,
};
const backgroundEnabled = Boolean(
background?.enabled && background?.color && background?.color !== 'transparent',
background?.color && background?.color !== CustomPaletteColors.NONE,
);
const {classMod, style} = React.useMemo(() => {
return getPreparedWrapSettings(backgroundEnabled, background?.color);
Expand Down
6 changes: 2 additions & 4 deletions src/ui/components/DashKit/plugins/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from 'ui/components/DashKit/utils';
import {YFM_MARKDOWN_CLASSNAME} from 'ui/constants/yfm';
import {usePrevious} from 'ui/hooks';
import {CustomPaletteColors} from 'ui/units/dash/containers/Dialogs/components/PaletteBackground/PaletteBackground';

import {useBeforeLoad} from '../../../../hooks/useBeforeLoad';
import {YfmWrapper} from '../../../YfmWrapper/YfmWrapper';
Expand Down Expand Up @@ -149,9 +150,7 @@ const textPlugin = {
const data = props.data as DashTabItemText['data'];

const showBgColor = Boolean(
data.background?.enabled &&
data.background?.color &&
data.background?.color !== 'transparent',
data.background?.color && data.background?.color !== CustomPaletteColors.NONE,
);

const {classMod, style} = getPreparedWrapSettings(showBgColor, data.background?.color);
Expand Down Expand Up @@ -186,7 +185,6 @@ const textPlugin = {
currentLayout.w,
classMod,
data.background?.color,
data.background?.enabled,
]);

/**
Expand Down
7 changes: 2 additions & 5 deletions src/ui/components/DashKit/plugins/Title/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
adjustWidgetLayout as dashkitAdjustWidgetLayout,
getPreparedWrapSettings,
} from 'ui/components/DashKit/utils';
import {CustomPaletteColors} from 'ui/units/dash/containers/Dialogs/components/PaletteBackground/PaletteBackground';

import {useBeforeLoad} from '../../../../hooks/useBeforeLoad';
import {RendererWrapper} from '../RendererWrapper/RendererWrapper';
Expand Down Expand Up @@ -95,9 +96,7 @@ const titlePlugin: PluginTitle = {
const content = <DashKitPluginTitle {...props} ref={forwardedRef} />;

const showBgColor = Boolean(
data.background?.enabled &&
data.background?.color &&
data.background?.color !== 'transparent',
data.background?.color && data.background?.color !== CustomPaletteColors.NONE,
);

const {classMod, style} = getPreparedWrapSettings(showBgColor, data.background?.color);
Expand All @@ -119,7 +118,6 @@ const titlePlugin: PluginTitle = {
currentLayout.w,
classMod,
data.background?.color,
data.background?.enabled,
data.size,
data.text,
]);
Expand Down Expand Up @@ -159,7 +157,6 @@ const titlePlugin: PluginTitle = {
currentLayout.w,
data.text,
data.size,
data.background?.enabled,
calculateAnchor,
showAnchor,
]);
Expand Down
35 changes: 10 additions & 25 deletions src/ui/components/DialogChartWidget/DialogChartWidget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,23 @@
flex-direction: column;
}

&__help-tooltip {
line-height: 16px;
margin-left: 5px;
}

&__navigation-input-container {
display: grid;
grid-auto-rows: 40px;
align-items: center;
}

&__textarea-wrapper {
display: flex;
&__textarea {
height: 80px;
padding: 6px 0;
width: 330px;
}

&__row {
margin-bottom: var(--g-spacing-2);
}

&__checkbox {
margin-block-start: var(--g-spacing-2);
}

.widget-item-dialog__line {
Expand Down Expand Up @@ -82,12 +84,6 @@
align-items: center;
}

&__input {
width: 330px;
margin-right: 10px;
display: inline-flex;
}

&__add-param-button {
margin-left: 175px;
}
Expand Down Expand Up @@ -116,17 +112,6 @@
}
}

&__caption {
&_inactive {
opacity: 0.3;
}
}

&__caption-text {
position: relative;
top: 1px;
}

&__error {
color: var(--g-color-text-danger);
padding: 10px;
Expand Down
Loading
Loading