Skip to content

Fix/homogenize file check ui#77

Merged
jansaldo merged 4 commits into
developfrom
fix/homogenize-file-check-ui
May 22, 2026
Merged

Fix/homogenize file check ui#77
jansaldo merged 4 commits into
developfrom
fix/homogenize-file-check-ui

Conversation

@jansaldo
Copy link
Copy Markdown
Contributor

@jansaldo jansaldo commented May 20, 2026

Se corrigió el renderizado del spinner en la pantalla de finalización del anonimizador y se unificó el estilo del componente FileCheck para que sea visualmente consistente con FilePreview.

Cambios:

  • Se agregó viewBox al SVG del Spinner para que escale correctamente al ser redimensionado por CSS (evitaba el recorte que lo hacía verse "chueco")
  • Se igualaron las dimensiones del card de FileCheck (150×200) con las de FilePreview
  • Se aplicó el mismo textStyle al subtítulo de la pantalla de finalización que en la pantalla de preview
  • Se unificó el tamaño de fuente del nombre de archivo (size="s") en FileCheck

Summary by Sourcery

Align file check UI and loading spinner behavior with the file preview and finish screens for consistent layout and typography.

Bug Fixes:

  • Ensure the loading spinner scales correctly by defining an appropriate SVG viewBox to prevent visual clipping.

Enhancements:

  • Unify FileCheck card dimensions and max-width with FilePreview for a consistent file tile layout.
  • Standardize the file name text size in FileCheck for uniform typography across file tiles.
  • Apply the shared subtitle text style on the finish screen to match the preview screen's heading hierarchy.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 20, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR homogenizes the FileCheck UI with FilePreview and fixes spinner rendering by adjusting layout, typography, and SVG sizing so the finish screen looks visually consistent and scales correctly.

File-Level Changes

Change Details Files
Standardize FileCheck card layout and filename truncation to match FilePreview dimensions.
  • Set Wrapper maxWidth to a fixed 150px instead of breakpoint-based values.
  • Set Card to a fixed 200px height and 150px width, removing responsive size variants and SVG-specific sizing rules.
src/renderer/src/components/file-check/FileCheck.styles.ts
Align FileCheck filename typography with the rest of the UI.
  • Render the file name text with size="s" to match FilePreview’s small filename style.
src/renderer/src/components/file-check/index.tsx
Unify finish screen subtitle styling with preview screen subtitle.
  • Replace the plain styled.h3 subtitle with styled.h2 using textStyle="subtitle.md.default" so the finish subtitle uses the shared typography token.
src/renderer/src/components/finish/finish-main-content.tsx
Fix spinner SVG scaling so it resizes cleanly without clipping.
  • Add viewBox="0 0 48 48" to the Spinner SVG so CSS resizing preserves aspect ratio and avoids visual clipping/warping.
src/renderer/src/components/spinner/index.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • By removing the responsive @xl sizing from Card and Wrapper and hardcoding 150×200, the layout may no longer adapt well to different breakpoints; consider whether you need separate sizes or CSS-based scaling for smaller viewports.
  • Switching from styled.h3 to styled.h2 for the finish subtitle changes the semantic heading hierarchy; double-check that this still matches the overall page structure and accessibility expectations.
  • Now that the spinner SVG has a viewBox, you may not need to set both width/height in the component and via styled CSS; consider standardizing on one sizing approach to avoid conflicts or confusion.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- By removing the responsive `@xl` sizing from `Card` and `Wrapper` and hardcoding 150×200, the layout may no longer adapt well to different breakpoints; consider whether you need separate sizes or CSS-based scaling for smaller viewports.
- Switching from `styled.h3` to `styled.h2` for the finish subtitle changes the semantic heading hierarchy; double-check that this still matches the overall page structure and accessibility expectations.
- Now that the spinner SVG has a `viewBox`, you may not need to set both width/height in the component and via styled CSS; consider standardizing on one sizing approach to avoid conflicts or confusion.

## Individual Comments

### Comment 1
<location path="src/renderer/src/components/finish/finish-main-content.tsx" line_range="29" />
<code_context>
         <Card>
           <Stack gap={{ base: "4", xl: "8" }}>
-            <styled.h3>{t("finish.subtitle")}</styled.h3>
+            <styled.h2 textStyle="subtitle.md.default">{t("finish.subtitle")}</styled.h2>
             <Grid columns={4} gap="8" justifyContent="center" width="full">
               {children}
</code_context>
<issue_to_address>
**issue (bug_risk):** Changing this from h3 to h2 could affect heading hierarchy and accessibility.

If there’s already an `h1`/`h2` earlier on the page, this promotion could disrupt the logical heading order used by screen readers and in-page navigation. Please review the page’s overall outline; if this is mainly a visual change, consider keeping it as an `h3` and applying `textStyle="subtitle.md.default"` via styling instead.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

<Card>
<Stack gap={{ base: "4", xl: "8" }}>
<styled.h3>{t("finish.subtitle")}</styled.h3>
<styled.h2 textStyle="subtitle.md.default">{t("finish.subtitle")}</styled.h2>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Changing this from h3 to h2 could affect heading hierarchy and accessibility.

If there’s already an h1/h2 earlier on the page, this promotion could disrupt the logical heading order used by screen readers and in-page navigation. Please review the page’s overall outline; if this is mainly a visual change, consider keeping it as an h3 and applying textStyle="subtitle.md.default" via styling instead.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a UI rendering issue with the loading spinner and homogenizes the FileCheck tile styling to match FilePreview, improving visual consistency across preview/finish screens.

Changes:

  • Added an SVG viewBox to Spinner so it scales correctly when resized via CSS (avoids clipping/distortion).
  • Standardized FileCheck tile/card dimensions and filename typography to align with FilePreview.
  • Updated the finish screen subtitle to use the shared subtitle.md.default text style.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/renderer/src/components/spinner/index.tsx Adds viewBox to ensure the spinner scales without clipping.
src/renderer/src/components/finish/finish-main-content.tsx Applies shared subtitle text style for finish screen consistency.
src/renderer/src/components/file-check/index.tsx Sets filename Text size to match FilePreview typography.
src/renderer/src/components/file-check/FileCheck.styles.ts Aligns FileCheck wrapper/card sizing with FilePreview tile dimensions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<Icon {...{ hasError, isLoading }} />
</Card>
<Text>{fileName}</Text>
<Text size="s">{fileName}</Text>
@jansaldo jansaldo merged commit 986e68d into develop May 22, 2026
2 checks passed
@jansaldo jansaldo deleted the fix/homogenize-file-check-ui branch May 22, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants