fix(ui): Fix layout of checkbox in 'similar issues' table item #70274
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.
Goal
The goal of this PR is to fix issue #69931, which concerns a small layout issue in the "similar issues" table row item.
Bug reproduction
You can reproduce the bug by:
sentry
repo,repro-issue-69931
branch,You will see the background color stretching across the table row's height:
Fix
The reason the checkbox container stretches across the height of its parent is that the parent has
display: grid;
and noalign-items
property set. As laid out in the MDN docs, this means the child components will stretch to fill the parent's height.To fix this, we set
align-items: start
on the parent component, and in turn setheight: 100%
on the<Diff />
sibling component, so that the "Diff" button stays centered vertically.Testing the fix
You can test the fix by following the same instructions as above with the
repro-fix-issue-69931
branch instead. This is the same branch asrepro-issue-69931
, expect with the same changes applied as the ones in this PR (see this comparison of the two branches).Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.