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

Add Enhanced Navigation Methods to WoltModalSheet #188

Merged
merged 10 commits into from
May 3, 2024

Conversation

ulusoyca
Copy link
Collaborator

Description

This pull request introduces a comprehensive suite of navigation methods to the WoltModalSheet widget. These methods are designed to facilitate more intuitive and adaptable multi-page in-modal navigation scenarios.

Note that this is not a breaking page. Users can still use pageIndexNotifier for navigation.

Dynamic Stack Management

Add Single Page Add Multiple Page
add_single_page.mov
add_multiple_pages.mov
Push Multiple Page
push_multi_page.mov
Replace Current Page Replace Previous Page
replace_current_page.mov
replace_previous_page.mov
Replace All Pages Pop Page
replace_all_pages.mov
pop_page.mov

Key Navigation Methods Added:
addPages, addPage: Append new pages to the navigation stack.
replaceCurrentPage, replaceAllPages, replacePage: Replace existing pages in the stack.
removePage, removeUntil: Remove pages from the stack based on specific criteria.
pushPages, pushPage: Push new pages onto the stack and display them immediately.
popPage: Pop the top page from the navigation stack.
showNext, showPrevious: Navigate forward or backward within the stack.
showAtIndex, showPageWithId: Navigate directly to a specific page by index or ID.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [-] My PR includes tests for all changed/updated/fixed behaviors.
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • The package compiles with the minimum Flutter version stated in the pubspec.yaml

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

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

Copy link

github-actions bot commented Apr 29, 2024

Visit the preview URL for this PR (updated for commit 0f8c7b8):

(expires Fri, 10 May 2024 06:52:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 906758393beb0353b979d020649d6a1efc40fb5b

Copy link
Collaborator

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

Excellent PR Overall!

I'd prefer the main lib changes and example changes are split separate PRs in future. This makes it easy to read the library code and test the changes. We might require tests in the future.

@ulusoyca ulusoyca force-pushed the refactor-in-app-navigation branch from b3bdd33 to da2ee76 Compare May 2, 2024 20:58
@ulusoyca ulusoyca enabled auto-merge May 2, 2024 21:03
@TahaTesser
Copy link
Collaborator

Please rebase after merging #192

@ulusoyca ulusoyca requested a review from TahaTesser May 3, 2024 06:50
@TahaTesser
Copy link
Collaborator

@ulusoyca
Add the following skip tag in the line 226 in wolt_modal_sheet_test.dart file.

    // Reset the physical size and device pixel ratio.
    tester.view.resetPhysicalSize();
    tester.view.resetDevicePixelRatio();
  }, skip: true);

I'll update the tests in the future.

Copy link
Collaborator

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

LGTM!

@ulusoyca ulusoyca merged commit 169686e into main May 3, 2024
4 of 5 checks passed
@ulusoyca ulusoyca deleted the refactor-in-app-navigation branch May 3, 2024 07:07
@dickermoshe
Copy link
Contributor

Thank y'all so much. This is package is a dream!

When do you think this'll be on pub?

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