Skip to content

Conversation

samruddhi-Rahegaonkar
Copy link
Member

@samruddhi-Rahegaonkar samruddhi-Rahegaonkar commented Aug 23, 2025

Fixes #1422

Changes

  • A scrollable TransitionTab.
  • A thicker, rounded scrollbar that is always visible on the right.

Screenshots / Recordings

Before:
Screenshot_20250822_211405
After:
Screenshot_20250822_215239

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

Add a visible, always-on scrollbar to the animation transition tab, enable vertical scrolling for its contents, adjust the tab panel height and inner column sizing, and streamline the Save/Transfer button widget structure.

Bug Fixes:

Enhancements:

  • Increase the animation TabBarView container height and set Column mainAxisSize to allow proper scrolling.
  • Simplify the Save/Transfer button rendering logic by reducing widget nesting and duplicate padding wrappers.

Copy link
Contributor

sourcery-ai bot commented Aug 23, 2025

Reviewer's Guide

This PR enhances the animation tab by introducing a persistent, thicker, rounded scrollbar, and refines the HomeScreen layout by tightening its column sizing, enlarging the TabBarView height, and streamlining the Save/Transfer button implementations.

Class diagram for updated TransitionTab widget

classDiagram
    class TransitionTab {
      +State createState()
    }
    class _TransitionTabState {
      -ScrollController _scrollController
      +build(context)
    }
    TransitionTab --> _TransitionTabState
Loading

Class diagram for HomeScreen Save/Transfer button logic changes

classDiagram
    class _HomeScreenState {
      +build(context)
      -Save button logic updated
      -Transfer button logic updated
    }
Loading

File-Level Changes

Change Details Files
Add always-visible, thicker rounded scrollbar
  • Introduce a ScrollController
  • Wrap SingleChildScrollView in Scrollbar with thumbVisibility, thickness, and radius
  • Attach controller to both Scrollbar and scroll view
lib/view/widgets/transitiontab.dart
Adjust HomeScreen layout and refactor action buttons
  • Set Column’s mainAxisSize to min
  • Increase TabBarView height from 250.h to 350.h
  • Simplify Save/Transfer button widgets and onTap logic
  • Update spacing and padding around buttons
lib/view/homescreen.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#1422 Add a visible scrollbar on the right side of the Animation tab area to indicate that more animations are available downward.

Possibly linked issues


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:

  • Don’t forget to dispose the ScrollController in TransitionTab’s state to avoid memory leaks.
  • There’s a lot of repeated styling and logic around your “Save” and “Transfer” buttons—consider extracting a reusable widget or helper to keep the code DRY.
  • You might switch from GestureDetector + Container to Flutter’s built-in Button widgets (TextButton/ElevatedButton) for better theming, accessibility, and built-in feedback.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Don’t forget to dispose the ScrollController in TransitionTab’s state to avoid memory leaks.
- There’s a lot of repeated styling and logic around your “Save” and “Transfer” buttons—consider extracting a reusable widget or helper to keep the code DRY.
- You might switch from GestureDetector + Container to Flutter’s built-in Button widgets (TextButton/ElevatedButton) for better theming, accessibility, and built-in feedback.

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 23, 2025

Build Status

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

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

Copy link
Contributor

@nope3472 nope3472 left a comment

Choose a reason for hiding this comment

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

@samruddhi-Rahegaonkar i think the size of the sidebar is too big

@samruddhi-Rahegaonkar
Copy link
Member Author

@samruddhi-Rahegaonkar i think the size of the sidebar is too big

I thought i will be easily visible to the user.

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.

Could you change this to a thinner scroll bar, please? The main reason to have the scroll bar is to have a visual indication for the user. It is not in the same way important that the user can tap on the scroll bar.

@samruddhi-Rahegaonkar
Copy link
Member Author

samruddhi-Rahegaonkar commented Aug 25, 2025

Screenshot_20250825_190705

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.

Expected would be that the spacing to the scroll bar is the same as the spacing between the tiles. This should be even meaning on both sides. You might have to adjust the size of the tiles itself to make this work nicely. Please test this on different screen resolutions.

@samruddhi-Rahegaonkar
Copy link
Member Author

Screenshot_20250826_173757

How about this @mariobehling

Copy link
Contributor

@nope3472 nope3472 left a comment

Choose a reason for hiding this comment

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

image

hey @samruddhi-Rahegaonkar i see this change in UI please check for the last 2 animations

@samruddhi-Rahegaonkar
Copy link
Member Author

image hey @samruddhi-Rahegaonkar i see this change in UI please check for the last 2 animations

yeah i know. Is it good or keep it as it is ?

@mariobehling
Copy link
Member

mariobehling commented Aug 29, 2025

The last image in the comment is not displayed.

  • Please keep the tiles as squared tiles with same height as length.
  • Please ensure tiles are the same size on all views

@mariobehling
Copy link
Member

@samruddhi-Rahegaonkar Please share the broken image again and do not forget to address the sourcery-ai comments. Thanks

@samruddhi-Rahegaonkar
Copy link
Member Author

@samruddhi-Rahegaonkar Please share the broken image again and do not forget to address the sourcery-ai comments. Thanks

Okay!

@samruddhi-Rahegaonkar
Copy link
Member Author

samruddhi-Rahegaonkar commented Sep 2, 2025

Screenshot_20250902_220241 @mariobehling @nope3472

@hpdang
Copy link
Member

hpdang commented Sep 4, 2025

Please update this branch. And when there are 12 cards/animations, the app should all in one screen like this PR #1421

@samruddhi-Rahegaonkar
Copy link
Member Author

Screenshot_20250904_175353

@hpdang hpdang merged commit bf75471 into fossasia:development Sep 4, 2025
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.

Add a support for right scrollbar for the Animation tab
4 participants