Skip to content

fix(ui): Fix layout of checkbox in 'similar issues' table item #70274

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

Merged
merged 1 commit into from
May 6, 2024
Merged

fix(ui): Fix layout of checkbox in 'similar issues' table item #70274

merged 1 commit into from
May 6, 2024

Conversation

floels
Copy link
Contributor

@floels floels commented May 3, 2024

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:

You will see the background color stretching across the table row's height:

ezgif-5-8e59006465

Fix

The reason the checkbox container stretches across the height of its parent is that the parent has display: grid; and no align-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 set height: 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 as repro-issue-69931, expect with the same changes applied as the ones in this PR (see this comparison of the two branches).

ezgif-5-15ec2d424c

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.

Fix styling of elements in 'static/app/views/issueDetails/groupSimilarIssues/
similarStackTrace/item.tsx' so that checkbox wrapper doesn't stretch
across the whole table row's height.

Fixes GH-69931
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 3, 2024
@floels floels marked this pull request as ready for review May 3, 2024 20:22
@floels floels requested a review from a team as a code owner May 3, 2024 20:22
@armenzg armenzg added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label May 6, 2024
Copy link
Member

@armenzg armenzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @floels !
I will get it merged. Very grateful for your contribution!! 🚀

@armenzg armenzg enabled auto-merge (squash) May 6, 2024 11:57
@armenzg armenzg merged commit 15aac55 into getsentry:master May 6, 2024
45 of 47 checks passed
@armenzg
Copy link
Member

armenzg commented May 6, 2024

It looks better. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants