Skip to content

Commit

Permalink
stop people using new antd icons
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Nov 8, 2023
1 parent 0b0a29a commit 59e836f
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ module.exports = {
name: 'dayjs',
message: 'Do not directly import dayjs. Only import the dayjs exported from lib/dayjs.',
},
{
name: '@ant-design/icons',
message: 'Please use icons from the @posthog/icons package instead',
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { mathsLogic } from 'scenes/trends/mathsLogic'
import { ExportButton } from 'lib/components/ExportButton/ExportButton'
import { CardMeta } from 'lib/components/Cards/CardMeta'
import { DashboardPrivilegeLevel } from 'lib/constants'
// eslint-disable-next-line no-restricted-imports
import { PieChartFilled } from '@ant-design/icons'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { TopHeading } from 'lib/components/Cards/InsightCard/TopHeading'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/components/CloseButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { CloseOutlined } from '@ant-design/icons'

// TODO: Remove, but de-ant PropertyFilterButton and SelectGradientOverflow first
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/components/ObjectTags/ObjectTags.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Tag, Select } from 'antd'
import { colorForString } from 'lib/utils'
import { CSSProperties, useMemo } from 'react'
// eslint-disable-next-line no-restricted-imports
import { SyncOutlined, CloseOutlined } from '@ant-design/icons'
import { SelectGradientOverflow } from '../SelectGradientOverflow'
import { useActions, useValues } from 'kea'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState, useCallback, Dispatch, SetStateAction } from 'react'
import { Table, Popconfirm } from 'antd'
import { useActions, useValues } from 'kea'
// eslint-disable-next-line no-restricted-imports
import { ExclamationCircleOutlined } from '@ant-design/icons'
import { personalAPIKeysLogic } from './personalAPIKeysLogic'
import { PersonalAPIKeyType } from '~/types'
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/components/SelectGradientOverflow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// eslint-disable-next-line no-restricted-imports
import { LoadingOutlined } from '@ant-design/icons'
import { ReactElement, RefObject, useEffect, useRef, useState } from 'react'
import { ConfigProvider, Empty, Select, Tag } from 'antd'
import { RefSelectProps, SelectProps } from 'antd/lib/select'
Expand All @@ -7,7 +9,6 @@ import { Tooltip } from 'lib/lemon-ui/Tooltip'
import './SelectGradientOverflow.scss'
import { useValues } from 'kea'
import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'
import { LoadingOutlined } from '@ant-design/icons'

interface DropdownGradientRendererProps {
updateScrollGradient: () => void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { FundOutlined } from '@ant-design/icons'
import { smoothingOptions } from './smoothings'
import { useActions, useValues } from 'kea'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/components/TZLabel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './index.scss'
import { useActions, useValues } from 'kea'
// eslint-disable-next-line no-restricted-imports
import { ProjectOutlined, LaptopOutlined, GlobalOutlined } from '@ant-design/icons'
import { humanFriendlyDetailedTime, shortTimeZone } from 'lib/utils'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/PreflightCheck/PreflightCheck.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useValues, useActions } from 'kea'
// eslint-disable-next-line no-restricted-imports
import { LoadingOutlined } from '@ant-design/icons'
import { PreflightCheckStatus, PreflightItem, preflightLogic } from './preflightLogic'
import './PreflightCheck.scss'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/dashboard/dashboards/NoDashboards.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useActions } from 'kea'
import { newDashboardLogic } from 'scenes/dashboard/newDashboardLogic'
import { Card } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { AppstoreAddOutlined } from '@ant-design/icons'

export const NoDashboards = (): JSX.Element => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SourceModal from '../external/SourceModal'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'
import { More } from 'lib/lemon-ui/LemonButton/More'
// eslint-disable-next-line no-restricted-imports
import { LoadingOutlined } from '@ant-design/icons'

export const scene: SceneExport = {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/experiments/Experiment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AvailableFeature, FunnelStep, InsightType } from '~/types'
import './Experiment.scss'
import { experimentLogic, ExperimentLogicProps } from './experimentLogic'
import { IconDelete, IconPlusMini } from 'lib/lemon-ui/icons'
// eslint-disable-next-line no-restricted-imports
import { CloseOutlined } from '@ant-design/icons'
import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'
import { dayjs } from 'lib/dayjs'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useActions, useValues } from 'kea'
// eslint-disable-next-line no-restricted-imports
import { PlusCircleOutlined, ThunderboltFilled } from '@ant-design/icons'
import { IconErrorOutline, IconInfo, IconOpenInNew, IconPlus } from 'lib/lemon-ui/icons'
import { entityFilterLogic } from 'scenes/insights/filters/ActionFilter/entityFilterLogic'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Select } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { PercentageOutlined } from '@ant-design/icons'
import { insightLogic } from 'scenes/insights/insightLogic'
import { useActions, useValues } from 'kea'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card } from 'antd'
import { insightLogic } from 'scenes/insights/insightLogic'

import { IconFeedback } from 'lib/lemon-ui/icons'
// eslint-disable-next-line no-restricted-imports
import { CloseOutlined } from '@ant-design/icons'
import { funnelDataLogic } from 'scenes/funnels/funnelDataLogic'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useActions, useValues } from 'kea'
// eslint-disable-next-line no-restricted-imports
import { ClockCircleOutlined, LineChartOutlined, FunnelPlotOutlined } from '@ant-design/icons'

import { funnelDataLogic } from 'scenes/funnels/funnelDataLogic'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useValues, useActions } from 'kea'
import { Dropdown, Menu } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { DownOutlined } from '@ant-design/icons'

import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useActions, useValues } from 'kea'
import { Select } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { BarsOutlined } from '@ant-design/icons'
import { ANTD_TOOLTIP_PLACEMENTS } from 'lib/utils'

Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/persons/NewPropertyComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState } from 'react'
import { Input, Radio } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { SaveOutlined, StopOutlined, CheckOutlined } from '@ant-design/icons'
import Modal from 'antd/lib/modal/Modal'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/persons/PersonScene.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Dropdown, Menu, Tag } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { DownOutlined } from '@ant-design/icons'
import { useActions, useValues } from 'kea'
import { personsLogic } from './personsLogic'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from 'react'
// eslint-disable-next-line no-restricted-imports
import { CheckOutlined } from '@ant-design/icons'
import { Tooltip, Radio, InputNumber } from 'antd'
import { ChildFunctionProps, Form } from 'kea-forms'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { PluginType } from '~/types'
import { PluginTags } from './components'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { Popconfirm } from 'antd'
// eslint-disable-next-line no-restricted-imports
import { GlobalOutlined } from '@ant-design/icons'
import { canGloballyManagePlugins } from 'scenes/plugins/access'
import { userLogic } from 'scenes/userLogic'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/project/Settings/TeamMembers.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useValues, useActions } from 'kea'
import { MINIMUM_IMPLICIT_ACCESS_LEVEL, teamMembersLogic } from './teamMembersLogic'
// eslint-disable-next-line no-restricted-imports
import { CloseCircleOutlined, LogoutOutlined, CrownFilled } from '@ant-design/icons'
import { humanFriendlyDetailedTime } from 'lib/utils'
import { OrganizationMembershipLevel, TeamMembershipLevel } from 'lib/constants'
Expand Down

0 comments on commit 59e836f

Please sign in to comment.