-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: refactor Alert-related components #31858
base: master
Are you sure you want to change the base?
Conversation
Korbit doesn't automatically review large (500+ lines changed) pull requests such as this one. If you want me to review anyway, use |
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/components/ErrorMessage/InvalidSQLErrorMessage.test.tsx
Outdated
Show resolved
Hide resolved
From some functional testing:
|
component: ErrorAlert, | ||
} as Meta; | ||
|
||
export const Gallery: StoryFn = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not coming with this PR but I find it odd that an ErrorAlert can be of type info or warning. Naming here could probably be improved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, maybe limiting to warning/error here makes more sense here. I think there may be one or two edge cases where ErrorAlert
is used to info
, maybe cause someone wanted some of the features in here. We should probably change those to use a normal Alert
title: ReactNode; | ||
description?: string; | ||
import { useState } from 'react'; | ||
import { Modal, Tooltip } from 'antd'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why importing from antd
directly? From one side this is the previous version of antd
and on the other hand, I think we said to import components from our wrappers not from antd
directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooops. We really need a lint rule to catch this...
@@ -56,15 +56,6 @@ const baseConfig: ThemeConfig = { | |||
zIndexPopupBase: supersetTheme.zIndex.max, | |||
}, | |||
components: { | |||
Alert: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go vanilla!
2b87057
to
2eb9330
Compare
d5cc420
to
c5c85ea
Compare
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD. Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
…essage.test.tsx Co-authored-by: Geido <[email protected]>
c5c85ea
to
b96705d
Compare
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.
Also here. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5