Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8edb758
style(Dashboard): change color and size for setting icon and delete icon
EnxDev Jun 5, 2025
f628cb9
style(edit dataset modal): change icon colors and adjust error messag…
EnxDev Jun 6, 2025
22c9d3b
fix(FiltersConfigModal): adjust the overflow and add margin where needed
EnxDev Jun 6, 2025
57364f7
Merge branch 'template_less' into enxdev/fix/theming/visual-regressio…
EnxDev Jun 6, 2025
a4f44f1
fix(SqlEditor): font-weight adjustment on Alert component messagge
EnxDev Jun 6, 2025
eb9a654
Merge branch 'template_less' into enxdev/fix/theming/visual-regressio…
EnxDev Jun 8, 2025
d9655c4
Merge branch 'template_less' into enxdev/fix/theming/visual-regressio…
EnxDev Jun 9, 2025
50c8885
refactor(AdhocFilterControl): replace add button and plus icon with …
EnxDev Jun 10, 2025
e0a13f4
clean up
EnxDev Jun 10, 2025
f6c3db8
fix(Select): avoid to close the modal when click on "Deselect all but…
EnxDev Jun 10, 2025
5f1ef3e
fix(FilterConfigure): re-add overflow-auto and slightly reduce left p…
EnxDev Jun 10, 2025
568b95f
fix RTL test
EnxDev Jun 12, 2025
05f22e1
clean up
EnxDev Jun 12, 2025
34f2beb
Merge branch 'template_less' into enxdev/fix/theming/visual-regressio…
EnxDev Jun 12, 2025
d036fe3
style(PublishedLabel): align label with the contextual elements
EnxDev Jun 12, 2025
cdc6843
fix(DataSourceEditor.test): increase timeout for "can modify columns"…
EnxDev Jun 12, 2025
d030eb5
Merge branch 'template_less' into enxdev/fix/theming/visual-regressio…
EnxDev Jun 12, 2025
daa5b86
lint
EnxDev Jun 12, 2025
d7da0bd
fix(SouthPane.test): use getByText to assert empty result state and a…
EnxDev Jun 12, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { FC } from 'react';
import { styled, useTheme } from '@superset-ui/core';
import { styled, useTheme, css } from '@superset-ui/core';
import { Skeleton } from '../Skeleton';
import { Card } from '../Card';
import { CertifiedBadge } from '../CertifiedBadge';
Expand Down Expand Up @@ -93,12 +93,14 @@ const TitleLink = styled.span`
`;

const TitleRight = styled.span`
position: absolute;
right: -1px;
font-weight: 400;
bottom: ${({ theme }) => theme.sizeUnit}px;
${({ theme }) => css`
position: absolute;
right: -1px;
font-weight: 400;
bottom: ${theme.sizeUnit * 3}px;
right: ${theme.sizeUnit * 2}px;
`}
`;

const CoverFooter = styled.div`
display: flex;
flex-wrap: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ const Select = forwardRef(
onMouseDown={e => {
e.preventDefault();
e.stopPropagation();
}}
onClick={e => {
e.preventDefault();
e.stopPropagation();
handleDeselectAll();
}}
>
Expand Down
8 changes: 4 additions & 4 deletions superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,8 @@ const SqlEditor: FC<Props> = ({
<p
css={css`
font-size: ${theme.fontSize}px;
font-weight: ${theme.fontSize};
color: ${theme.colors.primary.dark2};
font-weight: ${theme.fontWeightStrong};
color: ${theme.colorPrimaryText};
`}
>
{' '}
Expand All @@ -950,8 +950,8 @@ const SqlEditor: FC<Props> = ({
<p
css={css`
font-size: ${theme.fontSize}px;
font-weight: ${theme.fontSize};
color: ${theme.colors.primary.dark2};
font-weight: ${theme.fontWeightStrong};
color: ${theme.colorPrimaryText};
`}
>
{t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
// TODO: Remove fa-icon
/* eslint-disable icons/no-fa-icons-usage */
import { useState, useRef, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import type { Table } from 'src/SqlLab/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
// TODO: Remove fa-icon
/* eslint-disable icons/no-fa-icons-usage */
import { type FC, useCallback, useMemo, useRef, useState } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { nanoid } from 'nanoid';
Expand Down
12 changes: 7 additions & 5 deletions superset-frontend/src/components/Datasource/CollectionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
* under the License.
*/
import { PureComponent, ReactNode } from 'react';

import { nanoid } from 'nanoid';

import { t, styled, css } from '@superset-ui/core';

import { t, styled, css, SupersetTheme } from '@superset-ui/core';
import { Icons, Button, InfoTooltip } from '@superset-ui/core/components';
import { FilterValue } from 'react-table';
import Table, {
Expand Down Expand Up @@ -356,7 +353,11 @@ export default class CRUDCollection extends PureComponent<
<span
data-test="crud-delete-option"
className="text-primary"
css={{ display: 'flex', justifyContent: 'center' }}
css={(theme: SupersetTheme) => css`
display: flex;
justify-content: center;
color: ${theme.colorTextTertiary};
`}
>
<Icons.DeleteOutlined
aria-label="Delete item"
Expand All @@ -366,6 +367,7 @@ export default class CRUDCollection extends PureComponent<
tabIndex={0}
onClick={() => this.deleteItem(record.id)}
iconSize="l"
iconColor="inherit"
/>
</span>
),
Expand Down
22 changes: 16 additions & 6 deletions superset-frontend/src/components/Datasource/DatasourceEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ class DatasourceEditor extends PureComponent {
<div
css={theme => css`
position: absolute;
background: ${theme.colors.secondary.light5};
background: ${theme.colorBgLayout};
align-items: center;
display: flex;
height: 100%;
Expand Down Expand Up @@ -1133,6 +1133,7 @@ class DatasourceEditor extends PureComponent {
<span
css={theme => css`
font-size: ${theme.fontSizeSM}px;
margin-right: ${theme.sizeUnit}px;
`}
>
{t(' to check for details.')}
Expand All @@ -1151,7 +1152,14 @@ class DatasourceEditor extends PureComponent {
return (
<div>
<EditLockContainer>
<span role="button" tabIndex={0} onClick={this.onChangeEditMode}>
<span
css={theme => css`
color: ${theme.colorTextTertiary};
`}
role="button"
tabIndex={0}
onClick={this.onChangeEditMode}
>
{this.state.isEditMode ? (
<Icons.UnlockOutlined
iconSize="xl"
Expand Down Expand Up @@ -1280,6 +1288,9 @@ class DatasourceEditor extends PureComponent {
</>
) : (
<TextAreaControl
css={theme => css`
margin-top: ${theme.sizeUnit * 2}px;
`}
hotkeys={[
{
name: 'formatQuery',
Expand Down Expand Up @@ -1309,6 +1320,8 @@ class DatasourceEditor extends PureComponent {
display: flex;
`}
>
{this.props.database?.error &&
this.renderSqlErrorMessage()}
<Button
disabled={this.props.database?.isLoading}
tooltip={t('Open SQL Lab in a new tab')}
Expand All @@ -1321,7 +1334,7 @@ class DatasourceEditor extends PureComponent {
<Icons.ExportOutlined
iconSize="s"
css={theme => ({
color: theme.colors.primary.dark1,
color: theme.colorPrimaryBg,
})}
/>
</Button>
Expand All @@ -1344,9 +1357,6 @@ class DatasourceEditor extends PureComponent {
</Button>
</div>
}
errorMessage={
this.props.database?.error && this.renderSqlErrorMessage()
}
/>
{this.props.database?.queryResult && (
<>
Expand Down
16 changes: 13 additions & 3 deletions superset-frontend/src/components/Datasource/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,20 @@ export default function Field<V>({
const extra = !compact && description ? description : undefined;
const infoTooltip =
compact && description ? (
<Tooltip id="field-descr" placement="right" title={description}>
<Icons.InfoCircleFilled
<Tooltip
css={css`
color: ${theme.colorTextTertiary};
`}
id="field-descr"
placement="right"
title={description}
>
<Icons.InfoCircleOutlined
iconSize="s"
style={{ marginLeft: theme.sizeUnit }}
css={css`
margin-left: ${theme.sizeUnit}px;
`}
iconColor={theme.colorTextTertiary}
/>
</Tooltip>
) : undefined;
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/MessageToasts/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function Toast({ toast, onCloseToast }: ToastPresenterProps) {
<Icons.CloseOutlined
iconSize="m"
className="toast__close pointer"
iconColor="#888"
iconColor={theme.colorTextTertiary}
role="button"
tabIndex={0}
onClick={handleClosePress}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,22 @@
import { MouseEventHandler, FC } from 'react';

import { Icons } from '@superset-ui/core/components/Icons';
import type { IconType } from '@superset-ui/core/components/Icons/types';
import IconButton from './IconButton';

type DeleteComponentButtonProps = {
onDelete: MouseEventHandler<HTMLDivElement>;
iconSize?: IconType['iconSize'];
};

const DeleteComponentButton: FC<DeleteComponentButtonProps> = ({
onDelete,
iconSize,
}) => (
<IconButton onClick={onDelete} icon={<Icons.DeleteOutlined iconSize="l" />} />
<IconButton
onClick={onDelete}
icon={<Icons.DeleteOutlined iconSize={iconSize ?? 'l'} />}
/>
);

export default DeleteComponentButton;
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ const Column = props => {
{editMode && (
<HoverMenu innerRef={dragSourceRef} position="top">
<DragHandle position="top" />
<DeleteComponentButton onDelete={handleDeleteComponent} />
<DeleteComponentButton
iconSize="m"
onDelete={handleDeleteComponent}
/>
<IconButton
onClick={handleChangeFocus}
icon={<Icons.SettingOutlined iconSize="xl" />}
icon={<Icons.SettingOutlined iconSize="m" />}
/>
</HoverMenu>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const VerticalFilterBar: FC<VerticalBarProps> = ({
/>
<Icons.FilterOutlined
{...getFilterBarTestId('filter-icon')}
iconColor={theme.colorTextTertiary}
iconSize="l"
/>
</CollapsedBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const Container = styled.div<TitleContainerProps>`
cursor: ${isDragging ? 'grabbing' : 'pointer'};
width: 100%;
display: flex;
padding: ${theme.sizeUnit}px;
`}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ const Container = styled.div`

const ContentHolder = styled.div`
flex-grow: 3;
margin-left: ${({ theme }) => theme.sizeUnit * -1 - 1};
`;

const TitlesContainer = styled.div`
min-width: 300px;
max-width: 300px;
min-width: 290px;
max-width: 290px;
border-right: 1px solid ${({ theme }) => theme.colorSplit};
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const FilterTitlePane: FC<Props> = ({
alignItems: 'flex-start',
paddingTop: theme.sizeUnit * 3,
position: 'sticky',
bottom: theme.sizeUnit,
bottom: theme.sizeUnit * 3,
}}
>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@ const DefaultValueContainer = styled.div`
`;

const StyledAsterisk = styled.span`
color: ${({ theme }) => theme.colorError};
font-size: ${({ theme }) => theme.fontSizeSM}px;
margin-left: ${({ theme }) => theme.sizeUnit - 1}px;
${({ theme }) => `
color: ${theme.colorError};
font-size: ${theme.fontSizeSM}px;
margin-left: ${theme.sizeUnit - 1}px;

&:before {
content: '*';
}
`}
`;

const FilterTypeInfo = styled.div<{ expanded: boolean }>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const StyledModalWrapper = styled(StyledModal)<{ expanded: boolean }>`

.ant-modal-body {
padding: 0px;
overflow: auto;
}

${({ expanded }) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
import FilterDefinitionOption from 'src/explore/components/controls/MetricControl/FilterDefinitionOption';
import {
AddControlLabel,
AddIconButton,
HeaderContainer,
LabelsContainer,
} from 'src/explore/components/controls/OptionControls';
Expand Down Expand Up @@ -359,23 +358,21 @@ class AdhocFilterControl extends Component {
<div className="metrics-select" data-test="adhoc-filter-control">
<HeaderContainer>
<ControlHeader {...this.props} />
{this.addNewFilterPopoverTrigger(
<AddIconButton data-test="add-filter-button">
<Icons.PlusOutlined iconSize="m" />
</AddIconButton>,
)}
</HeaderContainer>
<LabelsContainer>
{this.state.values.length > 0
? this.state.values.map((value, index) =>
this.valueRenderer(value, index),
)
: this.addNewFilterPopoverTrigger(
<AddControlLabel>
<Icons.PlusOutlined iconSize="m" />
{t('Add filter')}
</AddControlLabel>,
)}
{[
...(this.state.values.length > 0
? this.state.values.map((value, index) =>
this.valueRenderer(value, index),
)
: []),
this.addNewFilterPopoverTrigger(
<AddControlLabel role="button" data-test="add-filter-button">
<Icons.PlusOutlined iconSize="m" />
{t('Add filter')}
</AddControlLabel>,
),
]}
</LabelsContainer>
</div>
);
Expand Down
Loading
Loading