fix(sqllab): correct Run dropdown crash and caret color regression - #43849
Draft
sadpandajoe wants to merge 1 commit into
Draft
fix(sqllab): correct Run dropdown crash and caret color regression#43849sadpandajoe wants to merge 1 commit into
sadpandajoe wants to merge 1 commit into
Conversation
When CTAS/CVAS is allowed on a database, the Run button renders as a split button via DropdownButton, passing menu content through the deprecated antd `overlay` prop. antd v6 dropped `overlay` support entirely, so the passthrough silently became a no-op and clicking the dropdown caret threw "React.Children.only expected to receive a single React element child." Pass the menu through `popupRender`, the prop DropdownButton actually wires up. Also fixes the caret icon color: it used `colorIcon`, a neutral token meant for icons on default surfaces, which renders as dark grey against the primary/danger button background. Use `colorTextLightSolid` instead, matching the icon-on-primary-button pattern used elsewhere in the codebase. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #43849 +/- ##
==========================================
- Coverage 79.42% 79.42% -0.01%
==========================================
Files 2895 2895
Lines 167953 167955 +2
Branches 38896 38897 +1
==========================================
+ Hits 133394 133395 +1
- Misses 32059 32060 +1
Partials 2500 2500
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
overlayprop. Antd v6 dropped that deprecated prop entirely, so the menu never reached antd's internalDropdown, and clicking the caret threwReact.Children.only expected to receive a single React element child.theme.colorIcon(a neutral "weak action" token) instead of a color meant to contrast against the primary button background, rendering it in the wrong dark/grey shade.popupRenderprop and usingtheme.colorTextLightSolidfor the caret icon color.This addresses a customer-reported issue.
Before / After
Before — dark/grey caret on the primary button, and clicking it crashes with
React.Children.only:After — caret color matches the button's other icon, and the dropdown menu opens correctly:
Test plan
React.Children.onlycrash on caret click, confirmed it failed for the predicted reason, then fixed itDropdownButton.test.tsxcoveringpopupRender+ click trigger