Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Add disableAutoScroll to Showcase #386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sensirex
Copy link

@Sensirex Sensirex commented Aug 14, 2023

Description

Add disabling auto scroll (disableAutoScroll) for concrete tooltip (Showcase)

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

@aditya-css aditya-css added the enhancement New feature or request label Mar 5, 2024
@@ -244,6 +244,7 @@ class Showcase extends StatefulWidget {
/// will still provide a callback.
final VoidCallback? onBarrierClick;

final bool disableAutoScroll;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please add documentation for this variable?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please rename this to the same variable used in ShowCaseWidget as they serve the same purpose? i.e. enableAutoScroll

@@ -325,6 +327,7 @@ class Showcase extends StatefulWidget {
this.disableDefaultTargetGestures = false,
this.tooltipPosition,
this.onBarrierClick,
this.disableAutoScroll = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make default value true as if parent class(ShowCaseViewWidget) variable enableAutoScroll is true than we don't need to add enableAutoScroll in all child class(ShowCase)

@@ -386,7 +389,7 @@ class _ShowcaseState extends State<Showcase> {
});

if (activeStep == widget.key) {
if (showCaseWidgetState.enableAutoScroll) {
if (showCaseWidgetState.enableAutoScroll && !this.widget.disableAutoScroll) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you can directly use widget and remove this here.

@Sahil-Simform
Copy link
Collaborator

Hi @Sensirex, thank you for your contribution. Can you please resolve conflicts and PR comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Waiting for Reply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants