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

1.4.3 #21

Merged
merged 4 commits into from
Aug 8, 2024
Merged

1.4.3 #21

merged 4 commits into from
Aug 8, 2024

Conversation

Nek-12
Copy link
Member

@Nek-12 Nek-12 commented Aug 8, 2024

Summary by CodeRabbit

  • New Features

    • Updated versioning to 1.4.3 for better release tracking.
    • Introduced a new composable function for customizable font management within the Compose UI.
  • Enhancements

    • Simplified noIndicationClickable function to allow for custom interaction sources.
    • Improved calculation logic for page visibility and offsets in paging components.
  • Bug Fixes

    • Removed experimental annotations from certain components, indicating more stable functionality.
  • Chores

    • Updated libraries and dependencies to their latest versions for improved stability and performance.

Copy link

coderabbitai bot commented Aug 8, 2024

Walkthrough

Walkthrough

The updates across various files primarily involve versioning changes, enhancements to the UI components, and refinements in API usability within a Kotlin/Compose environment. Key modifications include incrementing version constants, simplifying function implementations, removing experimental opt-ins, and introducing new functionalities such as customizable font management. These changes collectively aim to improve stability, usability, and maintainability of the codebase.

Changes

Files Change Summary
buildSrc/src/main/kotlin/Config.kt Incremented patch version from 2 to 3, updated versionName to 1.4.3, and removed -Xcontext-receivers from jvmCompilerArgs.
compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerEffects.kt Simplified scalePagerEffect by integrating pageOffset calculation directly into the lerp function.
compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerExt.kt, compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagesPerScreen.kt Removed @OptIn(ExperimentalFoundationApi::class) annotation, indicating properties/methods are now stable. Changed logic in firstVisiblePageOffsetFraction for offset calculation.
compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/modifier/Clickable.kt Enhanced noIndicationClickable by adding interactionSource parameter for better control over interaction states.
compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/resources/ResourcesExt.kt Introduced FontResource.font function for customizable font instantiation in Compose, along with new font-related imports.
gradle/libs.versions.toml Updated multiple library versions including compose, gradleAndroid, and kotlin. Transitioned to structured version references for androidx-lifecycle-viewmodel and detekt-formatting. Added maven-publish entry.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant Logic
    participant Resources

    User->>UI: Click on a clickable item
    UI->>Logic: Handle click event
    Logic->>Resources: Apply font settings
    Resources->>UI: Update font appearance
    UI-->>User: Display updated UI
Loading

This diagram illustrates the interaction flow when a user clicks a UI element, showcasing the integration of the new noIndicationClickable functionality and font resource management.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Nek-12 Nek-12 enabled auto-merge August 8, 2024 12:15
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 48717d0 and b0c31cf.

Files selected for processing (7)
  • buildSrc/src/main/kotlin/Config.kt (2 hunks)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerEffects.kt (1 hunks)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerExt.kt (2 hunks)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagesPerScreen.kt (1 hunks)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/modifier/Clickable.kt (1 hunks)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/resources/ResourcesExt.kt (2 hunks)
  • gradle/libs.versions.toml (2 hunks)
Files skipped from review due to trivial changes (1)
  • compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerEffects.kt
Additional comments not posted (12)
compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagesPerScreen.kt (1)

1-11: Removal of @OptIn annotation is appropriate.

The removal of the @OptIn(ExperimentalFoundationApi::class) annotation simplifies the class and implies reliance on stable APIs. Ensure that all dependencies and related code are compatible with this change.

compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/lazy/PagerExt.kt (1)

Line range hint 1-19:
Annotation removal and logic change require verification.

The removal of the @OptIn(ExperimentalFoundationApi::class) annotation signifies stability. However, the change in the firstVisiblePageOffsetFraction logic from getOffsetFractionForPage to getOffsetDistanceInPages could affect UI behavior. Verify that this change aligns with the intended functionality and does not introduce regressions.

Verification successful

Logic Change Verification Completed: No Impact Found

The change in logic for firstVisiblePageOffsetFraction from getOffsetFractionForPage to getOffsetDistanceInPages does not affect other parts of the codebase, as this property is not used elsewhere. Therefore, the modification seems safe and does not introduce regressions.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the impact of the logic change in `firstVisiblePageOffsetFraction`.

# Test: Search for the usage of `firstVisiblePageOffsetFraction` to assess its impact.
rg --type kotlin -A 5 $'firstVisiblePageOffsetFraction'

Length of output: 351


Script:

#!/bin/bash
# Broader search for uses of `PagerState` to check for indirect usage of `firstVisiblePageOffsetFraction`.
rg --type kotlin -A 10 'PagerState'

Length of output: 6449

compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/modifier/Clickable.kt (1)

3-24: Addition of interactionSource parameter is beneficial.

The introduction of the interactionSource parameter allows for better control over interaction states. Ensure that all usages of noIndicationClickable are updated to accommodate this new parameter where necessary.

compose/src/commonMain/kotlin/pro/respawn/kmmutils/compose/resources/ResourcesExt.kt (2)

8-10: Imports are well-organized and relevant.

The new imports for Font, FontStyle, and FontWeight are necessary for the new FontResource.font function.


61-66: Ensure default values align with design requirements.

The FontResource.font function provides default values for weight and style. Verify that these defaults align with the design specifications or requirements.

buildSrc/src/main/kotlin/Config.kt (1)

21-21: Version patch increment is straightforward.

The patch version has been incremented from 2 to 3, reflecting a minor update. Ensure downstream dependencies are aware of this change.

gradle/libs.versions.toml (6)

28-28: Structured format for androidx-lifecycle-viewmodel.

This change improves maintainability by referencing the lifecycle version. Ensure that the referenced version is correct.


30-30: Align detekt-formatting with detekt version.

This alignment ensures consistency across Detekt plugins. Verify that the detekt version is correctly referenced.


16-16: Increment to Kotlin version 2.0.10.

This minor version update may include improvements or bug fixes. Verify compatibility with existing code.


4-4: Upgrade to Compose version 1.7.0-alpha02.

This upgrade moves to an alpha version, which may introduce new features but could also impact stability. Ensure thorough testing is performed.


70-70: Addition of maven-publish plugin entry.

The inclusion of this plugin suggests new publishing capabilities. Verify that the plugin is configured correctly.


11-11: Update to gradleAndroid version 8.6.0-rc01.

Transitioning from beta to release candidate may improve stability. Check for any changes in build behavior.

@Nek-12 Nek-12 merged commit 72a0900 into master Aug 8, 2024
3 checks passed
@Nek-12 Nek-12 deleted the 1.4.3 branch August 8, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant