X Tutup
The Wayback Machine - https://web.archive.org/web/20210628142814/https://github.com/ionic-team/ionic-framework/pull/22087
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(segment): add swipeGesture property to allow for disabling of the swipe gesture #22087

Conversation

@TakumaKira
Copy link
Contributor

@TakumaKira TakumaKira commented Sep 14, 2020

closes #22048

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: #22048

What is the new behavior?

  • By setting changeOnSwipe property to false, developers can disable to select ionSegmentButton inside on swiping/dragging.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Sep 14, 2020

Could we call this swipeGesture to match the naming of ion-menu and ion-nav?

<ion-menu swipeGesture="false" contentId="nav"> </ion-menu>
@brandyscarney brandyscarney changed the title feat(segment): add 'changeOnSwipe' property feat(segment): add 'swipeGesture' property to disable swiping between segment buttons Sep 15, 2020
@brandyscarney brandyscarney added this to the 5.4.0 milestone Sep 15, 2020
@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Sep 15, 2020

Thank you for this by the way! The code looks good on initial review. Requested myself and Liam to test it. 🙂

Copy link
Member

@liamdebeasi liamdebeasi left a comment

A few small changes, but otherwise this looks really good. Nice job!

core/src/components/segment/segment.tsx Outdated Show resolved Hide resolved
core/src/components/segment/segment.tsx Show resolved Hide resolved
Copy link
Member

@liamdebeasi liamdebeasi left a comment

One small test change, then I think we are good to merge!

core/src/components/segment/test/basic/index.html Outdated Show resolved Hide resolved
Copy link
Member

@liamdebeasi liamdebeasi left a comment

This looks great, thanks for taking care of this!

@liamdebeasi liamdebeasi changed the title feat(segment): add 'swipeGesture' property to disable swiping between segment buttons feat(segment): add swipeGesture property to allow disabling of the swipe gesture Nov 10, 2020
@liamdebeasi liamdebeasi changed the title feat(segment): add swipeGesture property to allow disabling of the swipe gesture feat(segment): add swipeGesture property to allow for disabling of the swipe gesture Nov 10, 2020
@liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented Nov 12, 2020

@TakumaKira One last thing -- can you sync this branch with the latest master? We had a few build issue with node 15/npm 7 that have since been resolved, but you will need to grab the latest from master to get the fixes.

@TakumaKira
Copy link
Contributor Author

@TakumaKira TakumaKira commented Nov 13, 2020

@liamdebeasi

@TakumaKira One last thing -- can you sync this branch with the latest master? We had a few build issue with node 15/npm 7 that have since been resolved, but you will need to grab the latest from master to get the fixes.

I think I'm done ;) I rebased the branch on the current master(commit d77a9d5).

@liamdebeasi liamdebeasi merged commit 65bc995 into ionic-team:master Nov 13, 2020
2 checks passed
2 checks passed
@github-actions
triage
Details
@circleci-checks
build Workflow: build
Details
@liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented Nov 13, 2020

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

X Tutup