patternfly / pf-codemods

Codemods for upgrading from react-core@4.x.x to react-core@5.x.x. Uses eslint.
10 stars 18 forks source link

EmptyState - fix issues #376

Closed gitdallas closed 1 year ago

gitdallas commented 1 year ago

The following diff was made by codemods in koku, the fix gave an emptystatefooter import that didn't have a matching element:

https://github.com/gitdallas/koku-ui/commit/1286cd596719ac8b0374d8d7878235138070a2bf#diff-74608d182e4b45aa7aa39bbd3c0c8ea66a2130ff3caa473a5bcfceb91d11b469R117

https://github.com/gitdallas/koku-ui/commit/1286cd596719ac8b0374d8d7878235138070a2bf#diff-fa9e6980675ee88c2080286ce2f0339e31a9e04497d5743ccc0f76fa199f974dR261

also removed a title component leaving a title import, expected? if we remove imports we'd have to double check that the local name doesn't match any other jsxelements

https://github.com/gitdallas/koku-ui/commit/ace6dbfc764bcb7c407e13eaead780855501b5cd#diff-a92621045c34d8443215c22c4b1fe357a0ca128c431be71372d1c83c08937b57L79

Visually before: image after: image

(changes related to the above: https://github.com/gitdallas/koku-ui/commit/ace6dbfc764bcb7c407e13eaead780855501b5cd#diff-74608d182e4b45aa7aa39bbd3c0c8ea66a2130ff3caa473a5bcfceb91d11b469L117-L121 )

adamviktora commented 1 year ago

@gitdallas Should be fixed by this PR: https://github.com/patternfly/pf-codemods/pull/387

The only thing I am wondering about is why is the title text visually smaller and not bold. Having size={TitleSizes.lg} on Title component and not having <EmptyState variant={EmptyStateVariant.lg}> after the fix is not the issue (default text on EmptyState without variant is also formatted).

Can I somehow visualize these changes in the Koku UI?