-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: Removed fixed width constraint from Save button #29686
Conversation
The Russian button obviously improved in the "after' screenshot, but is there a good way to do this so that the English button (or any language with a shorter string) doesn't take up extra space? |
I've found line 39 at I could also try modifying the CSS of the Save button to reset its width to Which solution is preferable? |
2405766
to
6ecad31
Compare
6ecad31
to
b609bab
Compare
@mistercrunch, thanks for the feedback, but I'm not sure that I'm following you. Upon reviewing the behavior when text is selected, I noticed that it's actually the "Run" button that changes its label, not the "Save" button. As my changes were targeted specifically at the Probably the reason for my confusion is that I see "Run" as a plain button, not a dropdown one. Could you please clarify how I can get to the state depicted on your screenshot? |
Sorry for the confusion, I thought some of the css you're changing here was around to support the fixed width on the "dynamically labeled" Digging in - and that's not related to this PR directly, but I'm not sure why so much of this styling logic is in this file as opposed to simply being more vanilla antd, or simply living in the component library, but that's out of scope for this PR. One question is whether the |
It seems that this is default indeed. I've tried to omit setting explicit auto width, but the button turned 120px wide. Looks like it's some sort of customization of Superset's UI kit.
|
Yup here's a link to it for reference. https://github.com/apache/superset/blob/master/superset-frontend/src/components/DropdownButton/index.tsx#L38 Curious why it's there in the first place, I'd almost advise to delete that line to see what happens. Should be min-width if anything, but I'd say drop that line and we can fix whatever it breaks later if/where needed in a more targeted/proper way, along with a comment that expalins why it's ther (ie |
b609bab
to
8cbfdce
Compare
Done! |
/testenv up |
Can I do something more for this PR to move forward? |
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.
LGTM
Approved, but looks like you're going to need to rebase to quick off the new required CI checks... |
I wish we had something like this -> isaacs/github#88 |
8cbfdce
to
5675afa
Compare
Rebased |
/testenv up |
I think someone fixed the ephemeral environments, testing it here for giggles, will merge after confirming they work |
SUMMARY
Currently, "Save" button in SQL Lab has fixed width. So, longer labels are trimmed. This is an attempt to fix that.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
English / before:
English / after:
Russian / before:
Russian / after:
TESTING INSTRUCTIONS
Switch to any language that has long "Save" button translation. Russian, for example.
ADDITIONAL INFORMATION