posthog icon indicating copy to clipboard operation
posthog copied to clipboard

Project Ant Eradication action plan

Open Twixes opened this issue 2 years ago • 1 comments

Goal

Ant Design took us far, but now it's a drag in both UX and technical terms. We want packages antd, @ant-design/icons and antd-dayjs-webpack-plugin gone from PostHog completely. Incidentally, with antd gone we'll also be able to drop moment from the bundle.

Plan

Must-haves

  • [x] eliminate Select (~20 instances)
    • [x] replace Select with LemonSelect @daibhin
    • [x] replace SelectGradientOverflow with LemonSelect (subsequently remove CloseButton) @daibhin
    • [x] rebuild LemonMultipleSelect to avoid use of Select @benjackwhite
  • [x] eliminate Radio (~9 instances)
    • [x] build LemonSegmentedButton
      • #14070
    • [x] replace Radio buttonStyle="solid" with LemonSegmentedButton
    • [x] build LemonRadio
    • [x] replace Radio with LemonRadio
  • [x] eliminate Tabs (~19 instances)
    • [x] build LemonTabs
      • #14086
    • [x] replace Tabs with LemonTabs
      • #14191
  • [x] eliminate Tooltip (~3 instances)
    • [x] build LemonTooltip
    • [x] replace Tooltip with LemonTooltip (simple because we already use slightly custom lib/components/Tooltip)
  • [x] eliminate Collapse (~2 instances)
    • [x] build LemonCollapse
      • #14673
    • [x] replace Collapse with LemonCollapse
  • [x] eliminate Progress (~8 instances)
    • [x] build LemonProgress
    • [x] replace Progress with LemonProgress
  • [ ] eliminate Drawer (~4 instances)
    • [x] build LemonDrawer (deprecated the one place it was used in all)
    • [ ] remove old code relying on Drawer
  • [x] eliminate Dropdown and Menu (~10 instances)
    • [x] build LemonMenu
    • [x] replace Dropdown and Menu with LemonMenu
  • [ ] replace DatePicker with LemonCalendar* (~4 instances)
    • #13650
  • [x] replace Popover with Popup (~4 instances)
    • https://github.com/PostHog/posthog/issues/13624
  • [x] replace Input, AutoComplete, and InputNumber with LemonInput and LemonInput.Number (~28 instances)
    • #13686
    • #13684
  • [x] replace Button with LemonButton (~79 instances)
    • #13690
  • [x] replace Switch with LemonSwitch (~3 instances)
  • [x] replace Checkbox with LemonCheckbox (~7 instances)
  • [x] replace Upload and Dragger with LemonFileInput (~3 instances)
  • [ ] replace Empty with TBD (~6 instances)
  • [x] replace Skeleton with LemonSkeleton (~10 instances)
  • [x] replace Alert with AlertMessage (~5 instances)
  • [x] replace Badge with LemonBadge (1 instance)
    • #13763
  • [ ] replace Form and Form.Item with Kea Form and Field (~6 instances)
  • [x] replace Divider with LemonDivider (~~21~~ 1 instance)
  • [x] replace Spin with Spinner (1 instance)
    • #13634
  • [ ] replace Modal with LemonModal (~8 instances)
  • [x] replace Tag with LemonTag or LemonSnack (related: #9235, ~25 instances)
  • [x] replace Popconfirm with (probably) LemonDialog (~8 instances)
  • [x] eliminate Row, Col, List, Space, Card, Comment, Typography, and Layout (n instances)
    • [x] replace Row and Col with utility classes
    • [x] replace List with utility classes
    • [x] replace Space with utility classes
    • [x] replace Card with utility classes
    • [x] replace Comment with utility classes
    • [x] replace Typography with utility classes
    • [x] replace Layout with utility classes
      • #13657
  • [ ] replace all the icons with our own (usually Material Design) icons (~~450~~ ~~330~~ 200 instances)
    • #13691
    • #13738
    • #13762
    • #13787

Nice-to-haves

  • [ ] unify LemonTag and LemonSnack
  • [x] replace promptLogic with LemonDialog
  • [x] remove legacy PayCard component (replaced with PayGateMini)
  • [x] remove legacy InlineMessage component (replaced with AlertMessage)
    • #14165
  • [x] remove legacy NPSPrompt component
  • [x] remove legacy FeedbackCallCTA component

Twixes avatar Jan 10 '23 16:01 Twixes

Hi, I've eradicated some ant components :). Will you be able to check if are you okay with this approach?

https://github.com/PostHog/posthog/pull/18622

rogemus avatar Nov 17 '23 20:11 rogemus