-
Notifications
You must be signed in to change notification settings - Fork 507
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
[WIP] Upgrade antd to 4.24.8 #1261
Conversation
4251a12
to
92779ce
Compare
Looking at It could be potentially worth it (as a separate project) to just remove this. |
@mszabo-wikia does redux-form need to be tackled in this PR or incidentally related? I opened another issue #1260 for Redux upgrade, it probably makes sense to tackle all Redux-related changed there (assuming they can be decoupled) |
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.
I would prefer to go through all visual changes to make sure they are still sensible for Jaeger UI. Although, just the icon changes seem fine to accept on code review, if that's the extent.
.gitignore
Outdated
@@ -13,11 +13,14 @@ coverage | |||
.nyc_output | |||
junit.xml | |||
|
|||
# IDE-related files and directories |
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.
Some people insist that these should be handled via the user's local workspace settings, e.g. adding
[core]
excludesfile = /Users/{your home}/.gitignore_global
to ~/.gitconfig
and then defining global ignore rules.
But I personally do not mind these being in .gitignore since they prevent them from being checked in accidentally (although I'm likely biased because vscode and idea are very common, if this was more exotic IDE then ...).
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.
Oh, I didn't know about the global option, that makes sense. I'll probably rebase away this commit since I only added it in the first place to be able to run the codemod, which wouldn't start with uncommitted files present.
return ( | ||
<Form layout="vertical" onSubmit={handleSubmit}> |
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.
When the handler was previously on the form itself, what did it mean? Could one submit the form by hitting Enter from any field?
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.
Pretty much. Surprisingly though, that still works for me locally even with the handler moved to the submit button.
@@ -174,7 +174,7 @@ export default class TraceSpanView extends Component<Props, State> { | |||
return ( | |||
<div> | |||
<h3 className="title--TraceSpanView"> Trace Tabular View</h3> | |||
<Row type="flex" style={{ marginTop: '8px' }}> |
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.
what did type="flex"
do? Seems important.
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.
The prop was removed and it seems it's no longer needed. In v3, it was used to control whether to set display: flex
on the row but in v4 this seems to be unconditional.
I think redux-form need not be changed in this PR—the submit button event handler seems like a reasonable workaround for now, and the other forms don't seem to be using For the visual regressions, the main issue I noticed so far is a header size bug due to some Menu component updates; this should be fixable with some CSS. The icons should be the same as their design shouldn't have changed as far as I see, only the way they are referenced. |
9aeb82b
to
cb2f2b3
Compare
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
cb2f2b3
to
11059f0
Compare
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
Signed-off-by: Máté Szabó <mszabo@fandom.com>
11059f0
to
f2b8f25
Compare
Closing this as there is great work ongoing in #1636 and followups. |
Which problem is this PR solving?
Short description of the changes
Initial upgrade work for the antd v4 migration.
Notable changes:
Icon
component with a stringtype
. This way, it doesn't have to include the full SVG sprite, only the used icons, reducing the gzipped bundle size by ~110 kB. The migration is done mostly automatically by@ant-design/codemod-v4
except for some dynamic icon usages that were updated by hand in 4b79a68.Input
components need a typing update.NumberInput
component now guarantees to returnnumber | null
, so some custom type-checking code related to that can be removed.Table
component around row selection and sorting logic, requiring appropriate updates. In particular, sorting by multiple sortable columns now reports all columns that are active in sorting, so event handling code must also accept an array.redux-form
, as AntDForm
s no longer expose anonSubmit
event that this library could hook into. For now, this is done by attaching the submit callback directly to the submit button instead as a click handler (which, somehow, still catches Enter keypresses on the search form).Known issues