msyavuz commented on code in PR #33831: URL: https://github.com/apache/superset/pull/33831#discussion_r2239762259
########## superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/ChartCustomizationForm.tsx: ########## @@ -0,0 +1,1308 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { + FC, + useEffect, + useMemo, + useState, + useRef, + useCallback, + ReactNode, +} from 'react'; +import { useSelector } from 'react-redux'; +import { t, styled, css, useTheme } from '@superset-ui/core'; +import { debounce } from 'lodash'; +import { DatasourcesState, ChartsState, RootState } from 'src/dashboard/types'; +import { + Constants, + FormItem, + Input, + Select, + Collapse, + InfoTooltip, + Loading, + Radio, + type SelectValue, + FormInstance, +} from '@superset-ui/core/components'; +import { DatasetSelectLabel } from 'src/features/datasets/DatasetSelectLabel'; +import { CollapsibleControl } from '../FiltersConfigModal/FiltersConfigForm/CollapsibleControl'; +import DatasetSelect from '../FiltersConfigModal/FiltersConfigForm/DatasetSelect'; +import { mostUsedDataset } from '../FiltersConfigModal/FiltersConfigForm/utils'; +import { ChartCustomizationItem } from './types'; +import { selectChartCustomizationItems } from './selectors'; + +const { TextArea } = Input; + +const StyledContainer = styled.div` + ${({ theme }) => ` + display: flex; + flex-direction: row; + gap: ${theme.sizeUnit * 4}px; + padding: ${theme.sizeUnit * 2}px; + `} +`; + +const FORM_ITEM_WIDTH = 300; + +const StyledFormItem = styled(FormItem)` + width: ${FORM_ITEM_WIDTH}px; + margin-bottom: ${({ theme }) => theme.sizeUnit * 4}px; + + .ant-form-item-label > label { + font-size: ${({ theme }) => theme.fontSizeSM}px; + font-weight: ${({ theme }) => theme.fontWeightNormal}; + color: ${({ theme }) => theme.colors.grayscale.dark1}; Review Comment: We can do this by passing a single theme object like we did just before ########## superset-frontend/src/dashboard/components/GroupByBadge/index.tsx: ########## @@ -0,0 +1,207 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { memo, useMemo, useState, useRef } from 'react'; +import { useSelector } from 'react-redux'; +import { styled, t } from '@superset-ui/core'; +import { Icons, Badge, Tooltip, Tag } from '@superset-ui/core/components'; +import { ChartCustomizationItem } from '../nativeFilters/ChartCustomization/types'; +import { RootState } from '../../types'; + +export interface GroupByBadgeProps { + chartId: number; +} + +const StyledTag = styled(Tag)` + ${({ theme }) => ` + display: flex; + align-items: center; + cursor: pointer; + margin-right: ${theme.sizeUnit}px; + padding: ${theme.sizeUnit}px ${theme.sizeUnit * 2}px; + background: ${theme.colors.grayscale.light4}; + border: 1px solid ${theme.colors.grayscale.light3}; Review Comment: We should be first level tokens instead of these. colorBg etc. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org