posthog
posthog copied to clipboard
Project Ant Eradication action plan
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
withLemonSelect
@daibhin - [x] replace
SelectGradientOverflow
withLemonSelect
(subsequently removeCloseButton
) @daibhin - [x] rebuild
LemonMultipleSelect
to avoid use ofSelect
@benjackwhite
- [x] replace
- [x] eliminate
Radio
(~9 instances)- [x] build
LemonSegmentedButton
- #14070
- [x] replace
Radio buttonStyle="solid"
withLemonSegmentedButton
- [x] build
LemonRadio
- [x] replace
Radio
withLemonRadio
- [x] build
- [x] eliminate
Tabs
(~19 instances)- [x] build
LemonTabs
- #14086
- [x] replace
Tabs
withLemonTabs
- #14191
- [x] build
- [x] eliminate
Tooltip
(~3 instances)- [x] build
LemonTooltip
- [x] replace
Tooltip
withLemonTooltip
(simple because we already use slightly customlib/components/Tooltip
)
- [x] build
- [x] eliminate
Collapse
(~2 instances)- [x] build
LemonCollapse
- #14673
- [x] replace
Collapse
withLemonCollapse
- [x] build
- [x] eliminate
Progress
(~8 instances)- [x] build
LemonProgress
- [x] replace
Progress
withLemonProgress
- [x] build
- [ ] eliminate
Drawer
(~4 instances)- [x] build
LemonDrawer
(deprecated the one place it was used in all) - [ ] remove old code relying on
Drawer
- [x] build
- [x] eliminate
Dropdown
andMenu
(~10 instances)- [x] build
LemonMenu
- [x] replace
Dropdown
andMenu
withLemonMenu
- [x] build
- [ ] replace
DatePicker
withLemonCalendar*
(~4 instances)- #13650
- [x] replace
Popover
withPopup
(~4 instances)- https://github.com/PostHog/posthog/issues/13624
- [x] replace
Input
,AutoComplete
, andInputNumber
withLemonInput
andLemonInput.Number
(~28 instances)- #13686
- #13684
- [x] replace
Button
withLemonButton
(~79 instances)- #13690
- [x] replace
Switch
withLemonSwitch
(~3 instances) - [x] replace
Checkbox
withLemonCheckbox
(~7 instances) - [x] replace
Upload
andDragger
withLemonFileInput
(~3 instances) - [ ] replace
Empty
with TBD (~6 instances) - [x] replace
Skeleton
withLemonSkeleton
(~10 instances) - [x] replace
Alert
withAlertMessage
(~5 instances) - [x] replace
Badge
withLemonBadge
(1 instance)- #13763
- [ ] replace
Form
andForm.Item
with KeaForm
andField
(~6 instances) - [x] replace
Divider
withLemonDivider
(~~21~~ 1 instance) - [x] replace
Spin
withSpinner
(1 instance)- #13634
- [ ] replace
Modal
withLemonModal
(~8 instances) - [x] replace
Tag
withLemonTag
orLemonSnack
(related: #9235, ~25 instances) - [x] replace
Popconfirm
with (probably)LemonDialog
(~8 instances) - [x] eliminate
Row
,Col
,List
,Space
,Card
,Comment
,Typography
, andLayout
(n instances)- [x] replace
Row
andCol
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
- [x] replace
- [ ] replace all the icons with our own (usually Material Design) icons (~~450~~ ~~330~~ 200 instances)
- #13691
- #13738
- #13762
- #13787
Nice-to-haves
- [ ] unify
LemonTag
andLemonSnack
- [x] replace
promptLogic
withLemonDialog
- [x] remove legacy
PayCard
component (replaced withPayGateMini
) - [x] remove legacy
InlineMessage
component (replaced withAlertMessage
)- #14165
- [x] remove legacy
NPSPrompt
component - [x] remove legacy
FeedbackCallCTA
component
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