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

Trying out the new Modifier.draggable #235

Merged
merged 3 commits into from
Mar 10, 2021
Merged

Conversation

chrisbanes
Copy link
Contributor

No description provided.

@chrisbanes chrisbanes merged commit 54d62dc into cb/pager Mar 10, 2021
@chrisbanes chrisbanes deleted the cb/pager-draggable branch March 10, 2021 15:38
@chrisbanes chrisbanes mentioned this pull request Mar 12, 2021
5 tasks
chrisbanes added a commit that referenced this pull request Mar 15, 2021
* Initial import of Pager

* Tidy up content scope

* Add API file for Pager

* Add skeleton for pager sample

* Add working sample

* Use pointerInput() for touch handling

* Add animated scroll support

* Extract scroll threshold to val

* Move away from using Animatable

We now use the base level suspending animation functions, along with a
MutatorMutex. This tidies up the animation and touch handling.

* Tidy up state wrapper properties

* Simplify selectionState property

* Fix fling cancellation

* First attempt at cancellation support

* Code style

* Mostly working

* Doc typo

* Initial RTL support

* First test (failing)

* Working first test

* Add more tests

Now testing swiping

* Add comments to Pager tests

* Add more swiping tests

* Tidy up fling from touch hand-off

* Add kdoc

* Add @sample to Pager

* Add basic Pager doc page

* Update API files

* Tweak wording

* Basic semantic/a11y support

* Add (broken) support for a11y scrolls

* Increase offscreenLimit on sample

* Extract out pointer input handling

We have now split out the pointer input handling to 2 sides: raw event
handling which maps raw events to higher-level events
(PagerPointerEvent), and then a receiving side which updates the UI as
required from the PagerPointerEvents.

Internally this is done through a Channel, allowing appropriate queueing
on both the sending and receiving sides.

* Fix flinging in RTL after event changes

* Tidy up logging

* Add rememberPagerState()

- Also added `Saver` for state
- Fixed `pageCount` actually being a count
- Sprinkled annotations on params

* Update to AGP 7.0.0-alpha09

Had to disable some Lint warnings, due to the
mismatches with libraries

* Disable unsafe lint errors in :paging

* Trying out the new Modifier.draggable (#235)

* Trying out the new Modifier.draggable
* Turn on startDragImmediately = true
* Turn off debug logging

* Mark the Pager API as experimental

* API improvements

- Made pageCount a mandatory parameter
- Renamed SelectionState values to be clearer

* Fix pageCount usage in PagerTest

* Tidy up offset handling

We now enforce that the offset is always in the range
of 0f..1f, and move the page as appropriate as we scroll.

* Improve flinging after normalization

* Use velocities in swiping tests

* Try and fix swipeWithVelocity() for CI

* Tidy up test utils

* Remove SelectionState

Not needed once we move to scrollable()

* Tidy up dependencies

* Mark PagerState and PagerScope as @stable

* Check input parameters for [animate]scrollToPage

* Add parameter value checking

* Use page index rather than PageData for key

* Fix currentPage coerce

* Fix Flow layout tests

* Test fixes for CI

- Use a 'Nexus 5X' emulator profile
- Store logs when running tests on CI
- Tweak Gradle JVM args for CI
- Store each API levels logs
- Build tests before running
- Increase size of test images
- Add tolerance to Picasso tests

* Rename Pager to HorizontalPager

This will allow us to add a VerticalPager later
without an API rename.

* Migrate Pager to com.google package name

* Add pager docs to site nav

* Tweak Pager POM description

* Turn debugging logging off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants