Skip to content

Conversation

nope3472
Copy link
Contributor

@nope3472 nope3472 commented Aug 24, 2025

Fixes #1439

Changes

Changed the ordering of Homescreen tabs

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

Reorder the Homescreen tabs and swap the content of the Animation and Transition tabs to better distinguish basic and special animations.

Enhancements:

  • Reorder HomeScreen TabBar and TabBarView to Speed, Transition, Effects, Animation
  • Swap the contents of AnimationTab and TransitionTab so TransitionTab shows basic animations (indices 0–8) and AnimationTab shows special animations (indices 9–19) with icons
  • Update comments in homescreentabs.dart and transitiontab.dart to reflect new tab purposes
  • Add import of constants.dart to transitiontab.dart
  • Mark TransitionTab, EffectTab, and AnimationTab instances as const in HomeScreen

Chores:

  • Remove pubspec.lock from the repository

Copy link
Contributor

sourcery-ai bot commented Aug 24, 2025

Reviewer's Guide

This PR reorders the Homescreen tabs by swapping the Animation and Transition tabs and refactors their content: AnimationTab now hosts special icon-based animations while TransitionTab displays the basic animation options; comments, imports, and constructors are updated accordingly, and the pubspec.lock file is removed.

Class diagram for updated AnimationTab and TransitionTab

classDiagram
    class AnimationTab {
      +State createState()
      // Now displays special icon-based animations
    }
    class TransitionTab {
      +State createState()
      // Now displays basic animation options
    }
    AnimationTab --|> StatefulWidget
    TransitionTab --|> StatefulWidget
    class AniContainer {
      +animation
      +icon
      +animationName
      +index
    }
    AnimationTab o-- AniContainer
    TransitionTab o-- AniContainer
Loading

File-Level Changes

Change Details Files
Reordered Homescreen tab labels and view sequence
  • Swapped positions of 'Animation' and 'Transition' in the TabBar
  • Reordered TabBarView children to match new tab order
  • Added const qualifiers to TransitionTab, EffectTab, and AnimationTab constructors
lib/view/homescreen.dart
Refactored AnimationTab to display special animations
  • Updated class comment to 'special animations'
  • Replaced original basic animation rows with multiple padded rows of AniContainer using icon properties
  • Assigned null to animation parameter and set new indices for special effects
lib/view/widgets/homescreentabs.dart
Updated TransitionTab to show basic animations
  • Changed comment to 'basic animations'
  • Restored animation rows with aniLeft, aniRight, aniUp, etc.
  • Removed special animation containers now moved to AnimationTab
  • Imported constants.dart for resource usage
lib/view/widgets/transitiontab.dart
Removed pubspec.lock file
  • Deleted pubspec.lock to clear outdated lock state
pubspec.lock

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
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:

  • Consider refactoring the repeated AniContainer rows into a data-driven builder (e.g. iterate over a list of animation metadata) to reduce duplication and simplify future ordering changes.
  • The import of constants.dart in transitiontab.dart isn’t used anymore—removing it will keep dependencies clean.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider refactoring the repeated AniContainer rows into a data-driven builder (e.g. iterate over a list of animation metadata) to reduce duplication and simplify future ordering changes.
- The import of constants.dart in transitiontab.dart isn’t used anymore—removing it will keep dependencies clean.

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.

Copy link
Contributor

github-actions bot commented Aug 24, 2025

Build Status

Build successful. APKs to test: https://github.com/fossasia/badgemagic-app/actions/runs/17459619474/artifacts/3925447347.

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

@nope3472
Copy link
Contributor Author

hey @hpdang @mariobehling @AsCress need your reviews

@AsCress
Copy link
Contributor

AsCress commented Aug 26, 2025

I don't have context on this change. If this is intentional, then looks good to me.

@adityastic
Copy link
Collaborator

Is there an issue linked as to why we need to make this change? Or any context?

@samruddhi-Rahegaonkar
Copy link
Member

samruddhi-Rahegaonkar commented Aug 29, 2025

Is there an issue linked as to why we need to make this change? Or any context?

@adityastic yes, it was discussed in meeting as we have added new custom animations and the older animation is renamed as transition so that the correct sequence should be
transition-effects-animation

Copy link
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 follow best practices: https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/

Add an issue to each PR. If there is no issue open an issue first before you make a PR.

Secondly add screenshots to the PR showing your changes.

Copy link
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 also resolve conflicts.

Copy link
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 address @sourcery-ai comments #1428 (review)

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.

Rearrange the Homescreen Tabs order
6 participants