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 snippets for Indication and Ripple migration #191

Merged
merged 8 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compose/snippets/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ dependencies {
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.util)
implementation(libs.androidx.compose.ui.graphics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

@file:Suppress("unused")
@file:Suppress("unused", "DEPRECATION_ERROR")
Copy link
Contributor

Choose a reason for hiding this comment

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

if something was deprecated here, i think we should check what it is and try to fix the DAC page.

it's ok to add this for now, but we should at least create a bug internally

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we want to update the DAC page's snippet yet since 1.7.0 is still in alpha. We'll want to do that once 1.7.0 is stable (and the change would have to do be done on main)


package com.example.compose.snippets.designsystems

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ private fun CustomSnapDistance() {
HorizontalPager(
state = pagerState,
pageSize = PageSize.Fixed(200.dp),
beyondBoundsPageCount = 10,
outOfBoundsPageCount = 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this change reflected in the guidance as well?

Copy link
Contributor Author

@arriolac arriolac Jan 24, 2024

Choose a reason for hiding this comment

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

This change won't be affected in the guidance on DAC since it's on the latest branch (DAC mostly pulls snippets on the main branch unless explicitly specified to pull from another branch). However, we'll need to update this snippet once 1.7.0 is stable (we'll have to do that on the main branch)

flingBehavior = fling
) {
PagerSampleItem(page = it)
Expand Down
Loading
Loading