Skip to content

fix: Persistent animation text font sizes across tabs #1431

Merged
mariobehling merged 5 commits intofossasia:developmentfrom
nope3472:fontsizes
Sep 11, 2025
Merged

fix: Persistent animation text font sizes across tabs #1431
mariobehling merged 5 commits intofossasia:developmentfrom
nope3472:fontsizes

Conversation

@nope3472
Copy link
Copy Markdown
Contributor

@nope3472 nope3472 commented Aug 26, 2025

Fixes #1440

Changes

Screenshots / Recordings

Checklist:

  • No hard coding: I have used resources from constants.dart without hard coding any value.
  • No end of file edits: No modifications done at end of resource files.
  • Code reformatting: I have reformatted code and fixed indentation in every file included in this pull request.
  • Code analyzation: My code passes analyzations run in flutter analyze and tests run in flutter test.

Summary by Sourcery

Fix persistent animation text font sizes across tabs by standardizing both animation and effect text to 10.sp, adding overflow and line limits to the effect name, and removing the stale pubspec.lock file.

Bug Fixes:

  • Unify the font size for animation and effect names to 10.sp
  • Add overflow handling and a maxLines constraint to the effect name text widget

Chores:

  • Remove pubspec.lock file

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Aug 26, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR unifies and persists text font sizes for effect and animation labels by refactoring the Text widgets to use a consistent responsive size, adding overflow constraints where needed, and cleaning up the pubspec.lock file.

Class diagram for updated EffectContainer and AniContainer widgets

classDiagram
  class EffectContainer {
    +String effectName
  }
  class _EffectContainerState {
    +build()
    -Text widget updated:
      fontSize: 10.sp
      overflow: TextOverflow.ellipsis
      maxLines: 1
  }
  EffectContainer --> _EffectContainerState

  class AniContainer {
    +String animationName
  }
  class _AniContainerState {
    +build()
    -Text widget updated:
      fontSize: 10.sp
      overflow: TextOverflow.ellipsis
      maxLines: 1
  }
  AniContainer --> _AniContainerState
Loading

File-Level Changes

Change Details Files
Unified font sizing for animation and effect labels
  • Changed animationName fontSize from 8.sp to 10.sp
  • Added explicit fontSize of 10.sp to effectName
lib/view/widgets/animation_container.dart
lib/view/widgets/effects_container.dart
Added overflow handling for effect labels
  • Applied TextOverflow.ellipsis to effectName
  • Limited effectName to a single line via maxLines=1
lib/view/widgets/effects_container.dart
Removed pubspec.lock file
  • Deleted pubspec.lock to reset dependency locking
pubspec.lock

Possibly linked issues

  • #0: The PR prevents text overflow in animation and effects containers, directly resolving the UI card overflow issue in those tabs.
  • Update gitter in readme and remove duplicate #123: The PR fixes layout overflow in AnimationContainer and EffectsContainer by adjusting text font sizes and adding text ellipsis.

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
Contributor

@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 there - I've reviewed your changes - here's some feedback:

  • It looks like pubspec.lock was deleted — you probably want to restore it to avoid losing locked dependency versions.
  • The repeated TextStyle(fontSize: 10.sp, overflow: ellipsis) could be centralized in a shared constant or theme to reduce duplication.
  • Double-check other text widgets or tabs for consistent font sizing to ensure uniform UI across the app.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- It looks like pubspec.lock was deleted — you probably want to restore it to avoid losing locked dependency versions.
- The repeated TextStyle(fontSize: 10.sp, overflow: ellipsis) could be centralized in a shared constant or theme to reduce duplication.
- Double-check other text widgets or tabs for consistent font sizing to ensure uniform UI across the app.

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.

@mariobehling
Copy link
Copy Markdown
Member

Please follow best practices. Which issue does this PR resolve?

@mariobehling mariobehling changed the title fix: Persistent animation text fontsizes across tabs fix: Persistent animation text font sizes across tabs Sep 1, 2025
Copy link
Copy Markdown
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Please explain why pubspec lock needs to be deleted.

Copy link
Copy Markdown
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Please resolve conflicts.

@mariobehling mariobehling merged commit 45920a3 into fossasia:development Sep 11, 2025
9 of 10 checks passed
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.

Make Font Sizes Consistent Across Home Screen Tabs

3 participants