Skip to content

feat: animate filter list transitionsFeat animate transitions#42

Open
itsmeaabhii wants to merge 2 commits intochimon2000:masterfrom
itsmeaabhii:feat-animate-transitions
Open

feat: animate filter list transitionsFeat animate transitions#42
itsmeaabhii wants to merge 2 commits intochimon2000:masterfrom
itsmeaabhii:feat-animate-transitions

Conversation

@itsmeaabhii
Copy link

Fixes #4

Changes

  • Added AnimatedSwitcher wrapper around issue list in HomePage
  • Implemented smooth fade + slide animation (300ms) when organization filter changes
  • Added unique ValueKeys based on state to trigger animations properly
  • Updated test expectations to wait for animations with pumpAndSettle()

Animation Details

  • Duration: 300ms
  • Effects: Fade in + Slide up transition
  • Curve: easeInOut for smooth motion
  • Triggers: When organization filter changes or when switching between loading/data/empty states

Testing

  • ✅ All 12 tests pass
  • ✅ Animation triggers on filter change
  • ✅ Smooth transition between states

Demo

[Add a screen recording showing the animation if possible]

…idgets

- Removed InitialCard widget (duplicate of EmptyCard)
- Updated widgets barrel export to remove InitialCard
- Updated home.dart to use EmptyCard for both loading and empty states
- Updated tests to reflect consolidated widget usage

Fixes chimon2000#37"
- Added AnimatedSwitcher to home page for smooth transitions
- Implemented fade + slide animation (300ms) when filter changes
- Added unique ValueKeys for proper animation detection
- Updated tests to use pumpAndSettle for animation completion

Fixes chimon2000#4
Copilot AI review requested due to automatic review settings February 20, 2026 09:21
Copy link

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 implements animated transitions when filtering the issue list, addressing issue #4. The changes replace the InitialCard widget with EmptyCard for all loading/empty states and wrap the issue list in an AnimatedSwitcher to provide smooth fade-in and slide-up animations (300ms) when the organization filter changes.

Changes:

  • Added AnimatedSwitcher with fade and slide transitions to HomePage for smooth state changes
  • Removed InitialCard widget entirely, consolidating to use EmptyCard for loading and empty states
  • Updated test expectations to use pumpAndSettle() to properly handle animations during testing

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
lib/ui/pages/home.dart Added AnimatedSwitcher with fade+slide transition around issue list, added ValueKeys to trigger animations on state changes
lib/ui/widgets/widgets.dart Removed export of deleted InitialCard widget
lib/ui/widgets/initial_card.dart Deleted InitialCard widget (functionality replaced by EmptyCard)
test/pages/home_test.dart Updated tests to expect EmptyCard instead of InitialCard and use pumpAndSettle() for animations

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

data: (state) => state.issues.isEmpty
? EmptyCard(key: ValueKey('empty-${ref.watch(currentOrganizationProvider)}'))
: IssueListDataView(
key: ValueKey('data-${ref.watch(currentOrganizationProvider)}-${state.issues.length}'),
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Using ref.watch inside the ValueKey constructor causes unnecessary provider reads on every build. The current organization is already being watched at line 41, so this creates redundant provider subscriptions. Consider capturing the organization value in a local variable at the start of the build method and reusing it throughout, or use the organization value that's already available from the issueStoreProvider argument.

Copilot uses AI. Check for mistakes.
Comment on lines 49 to +50
// Verify that loading displays.
expect(find.byType(InitialCard), findsOneWidget);
expect(find.byType(EmptyCard), findsOneWidget);
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The comment says "Verify that loading displays" but the test is now checking for EmptyCard. Since the loading state now shows EmptyCard instead of InitialCard (as per the code changes), this comment is misleading. Consider updating it to "Verify that empty card displays during loading" or similar to accurately reflect what's being tested.

Copilot uses AI. Check for mistakes.
Comment on lines 78 to +79
// Verify that loading displays.
expect(find.byType(InitialCard), findsOneWidget);
expect(find.byType(EmptyCard), findsOneWidget);
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The comment says "Verify that loading displays" but the test is now checking for EmptyCard. Since the loading state now shows EmptyCard instead of InitialCard (as per the code changes), this comment is misleading. Consider updating it to "Verify that empty card displays during loading" or similar to accurately reflect what's being tested.

Copilot uses AI. Check for mistakes.
@@ -115,9 +115,9 @@ void main() {
);

// Verify that loading displays.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The comment says "Verify that loading displays" but the test is now checking for EmptyCard. Since the loading state now shows EmptyCard instead of InitialCard (as per the code changes), this comment is misleading. Consider updating it to "Verify that empty card displays during loading" or similar to accurately reflect what's being tested.

Suggested change
// Verify that loading displays.
// Verify that empty card displays during loading.

Copilot uses AI. Check for mistakes.
child: queryResultState.when(
loading: () => const EmptyCard(key: ValueKey('loading')),
data: (state) => state.issues.isEmpty
? EmptyCard(key: ValueKey('empty-${ref.watch(currentOrganizationProvider)}'))
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Using ref.watch inside the ValueKey constructor causes unnecessary provider reads on every build. The current organization is already being watched at line 41, so this creates redundant provider subscriptions. Consider capturing the organization value in a local variable at the start of the build method and reusing it throughout, or use the organization value that's already available from the issueStoreProvider argument.

Copilot uses AI. Check for mistakes.
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.

Animate filter list transitions

2 participants