Skip to content

Conversation

@naveenkumar-sanjeevirayan
Copy link
Collaborator

@naveenkumar-sanjeevirayan naveenkumar-sanjeevirayan commented May 14, 2025

Root Cause of the Issue

The transition animation lacked customization, as the duration was fixed and not configurable through the API.

Description of change

Introduced AnimationDuration property to allow developers to configure the duration of the bottom sheet transition animations, enabling smoother or faster UI experiences based on application requirements.

API Summary

API Name: AnimationDuration
Namespace: Syncfusion.Maui.Toolkit.BottomSheet
Input type: bool
Access specifier: public

Issues Fixed

#99

Screenshots

Default Animation Duration

AnimationDuration_Default.mp4

Animation Duration = 1000

AnimationDuration_1000.mp4

@PaulAndersonS
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PaulAndersonS PaulAndersonS requested a review from Copilot May 14, 2025 12:18
Copy link
Contributor

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 introduces configurable animation duration support for the bottom sheet transition animations in the toolkit, allowing developers to customize animation speeds.

  • Added the AnimationDuration bindable property with a default of 150ms.
  • Updated the bottom sheet animation methods to use the clamped animation duration value.
  • Created new unit tests to verify the behavior of the AnimationDuration property, including its clamping mechanism.

Reviewed Changes

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

File Description
maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Navigation/SfBottomSheetUnitTests.cs Added unit tests to verify the AnimationDuration property and its clamping behavior.
maui/src/BottomSheet/SfBottomSheet.cs Introduced the AnimationDuration property, updated animation methods to utilize a clamped duration, and added helper method for clamping.
Comments suppressed due to low confidence (1)

maui/src/BottomSheet/SfBottomSheet.cs:1288

  • [nitpick] The method name 'SetAnimationDuration' is misleading since it calculates and returns the clamped animation duration rather than setting a value. Consider renaming it to 'GetClampedAnimationDuration' for improved clarity.
int SetAnimationDuration()

@PaulAndersonS PaulAndersonS requested a review from Copilot May 15, 2025 03:38
Copy link
Contributor

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 introduces support for configurable animation durations for the bottom sheet control to enhance UI customization.

  • Added the AnimationDuration bindable property with a default value of 150ms in SfBottomSheet.
  • Updated animation methods to clamp the duration and use the new property value.
  • Introduced new unit tests to verify both the AnimationDuration getter/setter and clamping behavior.

Reviewed Changes

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

File Description
maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Navigation/SfBottomSheetUnitTests.cs Added tests for validating the AnimationDuration property and its clamping behavior.
maui/src/BottomSheet/SfBottomSheet.cs Introduced AnimationDuration property and updated animation methods to utilize the clamped duration.
Comments suppressed due to low confidence (1)

maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Navigation/SfBottomSheetUnitTests.cs:479

  • [nitpick] Consider renaming the 'AnimationDuration' test method to something more descriptive (e.g., 'AnimationDurationProperty_ReturnsSetValue') to avoid ambiguity with the property name.
[Theory]

@PaulAndersonS PaulAndersonS requested a review from Copilot May 15, 2025 04:01
Copy link
Contributor

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 introduces support for configurable animation duration for the Bottom Sheet control by adding a new AnimationDuration bindable property.

  • Added the AnimationDuration property and its bindable counterpart with documentation and default value.
  • Updated animation methods to use a clamped duration to ensure non-negative values.
  • Extended unit test coverage to verify property behavior and clamped duration.

Reviewed Changes

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

File Description
maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Navigation/SfBottomSheetUnitTests.cs Added unit tests verifying the AnimationDuration property behavior and the clamping functionality.
maui/src/BottomSheet/SfBottomSheet.cs Introduced the AnimationDuration bindable property, implemented a GetClampedAnimationDuration helper, and updated animation calls to use the clamped value.

@PaulAndersonS PaulAndersonS merged commit 0425a9a into main May 15, 2025
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.

4 participants