-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Integration Button styles #50258
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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'll take a closer look at this when I actually get around to reviewing the change. But just from a quick glance, I think it shouldn't be parent's responsibility to remember to set a certain flex attribute because a child might conditionally not render something. If possible, the child should make sure it's rendered correctly no matter the state. I'll see if that's doable here.
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 HoverTooltip has give me an issue with this in the past but this was back when I made it in v14 or whatever. Maybe it's easier now that the style system has been updated.
The issue is wanting to position the hover tooltip to its child but is wanting to render that child according to the tooltips parent. Last time i tried, this meant having to set something on the parent regardless. (This is also an issue when using it in a Table cell that you want to align right, for example). This could have all changed tho
I think merging this in before the next cut is preferable to reworking hovertooltip, and i can add a TODO to update the hovertooltip if you think that is sufficient.
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.
Sure, I'll approve now and we can work on this later.
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 I first skimmed through this, I was focused on "Why is it positioned correctly in one condition but not in the other", thinking that the callsite doesn't account for something. I looked into this today and what you did in this PR is the correct way to solve this.
It wasn't a problem with the callsite that uses
IntegrationsAddButton
, the problem was thatIntegrationsAddButton
usedmargin-left: auto
to position itself to the far right of the screen. If possible, individual elements shouldn't decide how they're positioned in space, this should be preferably parent's decision. https://every-layout.dev/layouts/stack/#the-problemSo the usage of
justify-content: space-between
is correct here. We should get rid ofmargin-left: auto
inIntegrationsAddButton
.