fix(ui): cut-off feedback button in chonk #28
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.
Initially, we had an issue that the feedback button was displayed outside the container when we showing a placeholder:
There was an attempted fix by @shayna-ch here:
which seemed to work, however, it relies on
overflow:hidden
, which doesn’t work well inchonk
because it cuts-off our buttons:What the fix tried to do was to limit the width of the container and force the content to not exceed its bounds with
overfow:hidden
.However, the root cause seems to be that we are exceeding the bounds in the first place. Why is that?
It’s because the
Placeholder
component has a default width ofwidth:100%
, which is not what we want when there’s content next to it.Luckily, we are in a
flex
layout, so what we really want to do is have the<Placeholder>
use all the remaining width, which we can do withflexGrow:1
.I have therefore removed the
GroupingInfoContainer
that was introduced in getsentry#98928 and reverted back to aFragment
and fixed the issue by unsetting thewidth
of thePlaceholder
and applyingflexGrow:1
to it instead.Note: It’s weird that
Placeholder
has a default width of 100% - I don’t think we should be usingwidth:100%
in flex layouts, but I didn’t dare changing that insidePlaceholder
because it has so many usages.Copied from getsentry#100985
Original PR: getsentry#100985