refactor(IconButton): Refactor IconButton to use Ant Design 5 Card#32876
refactor(IconButton): Refactor IconButton to use Ant Design 5 Card#32876fardin-developer wants to merge 4 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Memoize Icon Rendering Function ▹ view | 🧠 Incorrect | |
| Incomplete CustomOnClick story implementation ▹ view | 🧠 Not in scope | |
| Missing disabled state behavior description ▹ view | 🧠 Not in standard | |
| Hardcoded Icon Paths ▹ view | 🧠 Not in scope |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/components/IconButton/IconButton.stories.tsx | ✅ |
| superset-frontend/src/components/IconButton/index.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Need a new review? Comment
/korbit-reviewon this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-reviewcommand in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-descriptioncommand in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolvecommand in any comment on your PR.- On any given comment that Korbit raises on your pull request, you can have a discussion with Korbit by replying to the comment.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Feedback and Support
| export const Disabled: Story = { | ||
| args: { | ||
| buttonText: 'Disabled IconButton', | ||
| icon: '/images/icons/sql.svg', | ||
| }, | ||
| }; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| options: [ | ||
| '/images/icons/sql.svg', | ||
| '/images/icons/server.svg', | ||
| '/images/icons/image.svg', | ||
| null, | ||
| ], |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| export const CustomOnClick: Story = { | ||
| args: { | ||
| buttonText: 'Clickable IconButton', | ||
| icon: '/images/icons/image.svg', | ||
| }, | ||
| }; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| const renderIcon = () => { | ||
| if (icon) { | ||
| return ( | ||
| <img | ||
| src={icon} | ||
| alt={altText || buttonText} | ||
| style={{ | ||
| width: '100%', | ||
| height: '120px', | ||
| objectFit: 'contain', | ||
| }} | ||
| /> | ||
| ); | ||
| } |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Don't we lose keyboard navigation with this? |
That is a good point. @fardin-developer can we make sure these cards can respond to keyboard navigation as well (tabbing and pressing enter)? |
|
Thanks for bringing this to my attention. I will look into this.
…On Thu, 27 Mar 2025 at 9:31 PM, Geido ***@***.***> wrote:
Don't we lose keyboard navigation with this?
That is a good point. @fardin-developer
<https://github.com/fardin-developer> can we make sure these cards can
respond to keyboard navigation as well (tabbing and pressing enter)?
—
Reply to this email directly, view it on GitHub
<#32876 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZFLSCGAGR75LZ7YHVHHT7T2WQHGJAVCNFSM6AAAAABZ4GZVRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGU4DAMZQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: geido]*geido* left a comment (apache/superset#32876)
<#32876 (comment)>
Don't we lose keyboard navigation with this?
That is a good point. @fardin-developer
<https://github.com/fardin-developer> can we make sure these cards can
respond to keyboard navigation as well (tabbing and pressing enter)?
—
Reply to this email directly, view it on GitHub
<#32876 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZFLSCGAGR75LZ7YHVHHT7T2WQHGJAVCNFSM6AAAAABZ4GZVRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGU4DAMZQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|

Fixes: #32823
SUMMARY
This PR removes the non-standard
IconButtoncomponent and replaces it with the standardCardcomponent from Ant Design 5, as part of the migration effort. The component is currently used in the Database modal.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
CHANGES
src/components/IconButtoncomponent.Cardcomponent instead.BEFORE/AFTER SCREENSHOTS
Before
After
ADDITIONAL NOTES
Cardusage.CHECKLIST
Cardcomponent.frontend:refactor:antd5.