Skip to content

chore(deps): content-provider 1.4.27 #106

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

Merged
merged 6 commits into from
Jul 4, 2025
Merged

Conversation

jo-elimu
Copy link
Member

@jo-elimu jo-elimu commented Jun 30, 2025

https://github.com/elimu-ai/content-provider/releases/tag/1.4.27

Issue Number

Purpose

Technical Details

Screenshots

Testing Instructions

Regression Tests

  • I tested my changes on Android 16 (API 36)
  • I tested my changes on Android 15 (API 35)
  • I tested my changes on Android 14 (API 34)
  • I tested my changes on Android 13 (API 33)
  • I tested my changes on Android 12L (API 32)
  • I tested my changes on Android 12 (API 31)
  • I tested my changes on Android 11 (API 30)
  • I tested my changes on Android 10 (API 29)
  • I tested my changes on Android 9 (API 28)
  • I tested my changes on Android 8.1 (API 27)
  • I tested my changes on Android 8.0 (API 26)

UI Tests

  • I tested my changes on a 6-7" screen (▯ portrait orientation)
  • I tested my changes on a 6-7" screen (▭ landscape orientation)
  • I tested my changes on a 7-8" screen (▯ portrait orientation)
  • I tested my changes on a 7-8" screen (▭ landscape orientation)
  • I tested my changes on a 9-10" screen (▯ portrait orientation)
  • I tested my changes on a 9-10" screen (▭ landscape orientation)

Content Tests

  • I tested my changes with English content (eng.elimu.ai)
  • I tested my changes with Hindi content (hin.elimu.ai)
  • I tested my changes with Tagalog content (tgl.elimu.ai)
  • I tested my changes with Thai content (tha.elimu.ai)
  • I tested my changes with Vietnamese content (vie.elimu.ai)

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Updated a dependency to the latest version for improved stability and performance.
  • Bug Fixes
    • Enhanced video event reporting with more detailed analytics, including precise playback positions and event types.

@jo-elimu jo-elimu self-assigned this Jun 30, 2025
@jo-elimu jo-elimu requested a review from a team as a code owner June 30, 2025 08:41
Copy link

coderabbitai bot commented Jun 30, 2025

Walkthrough

The version of the elimuContentProvider dependency was updated from 1.4.23 to 1.4.27 in the gradle/libs.versions.toml file. Additionally, the reporting of video learning events was refactored in VideosActivity.kt and VideoActivity.kt to pass JSON objects containing explicit event type keys instead of enums, and a constant for playback position was removed.

Changes

File(s) Change Summary
gradle/libs.versions.toml Updated elimuContentProvider version: 1.4.23 → 1.4.27
app/src/main/java/ai/elimu/filamu/ui/VideosActivity.kt Changed LearningEventUtil.reportVideoLearningEvent call to pass a JSON object with "eventType" key instead of enum directly
app/src/main/java/ai/elimu/filamu/ui/video/VideoActivity.kt Refactored inline JSON construction for video event reporting; added explicit "eventType" keys; removed ANALYTICS_PLAYBACK_POSITION constant

Assessment against linked issues

Objective Addressed Explanation
Bump ai.elimu:content-provider dependency version from 1.4.23 to 1.4.28 (#107) Version updated only to 1.4.27, not 1.4.28.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Refactoring of video learning event reporting in VideosActivity.kt and VideoActivity.kt These changes are unrelated to the dependency version bump requested in the linked issue #107.

Possibly related PRs

Suggested reviewers

  • tuancoltech

elimu.ai's mission is to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a1be7a and 1cf4e24.

📒 Files selected for processing (1)
  • app/src/main/java/ai/elimu/filamu/ui/video/VideoActivity.kt (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/ai/elimu/filamu/ui/video/VideoActivity.kt
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: test (28)
  • GitHub Check: test (29)
  • GitHub Check: build (ubuntu-latest, 17)
  • GitHub Check: build (ubuntu-latest, 21)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (windows-latest, 17)
  • GitHub Check: build (macos-latest, 17)
  • GitHub Check: build (macos-latest, 21)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

Migrate `learningEventType` to additional data
@jo-elimu jo-elimu requested a review from tuancoltech June 30, 2025 08:57
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

🧹 Nitpick comments (2)
app/src/main/java/ai/elimu/filamu/ui/video/VideoActivity.kt (2)

98-101: Great refactoring for structured video completion analytics!

The JSONObject approach with explicit "eventType" and "video_playback_position_ms" keys creates clear, structured analytics data that will better support elimu.ai's mission to track learning progress as children teach themselves basic reading📖, writing✍🏽 and math🔢.

Consider extracting the "video_playback_position_ms" key as a constant to improve maintainability:

+    companion object {
+        const val EXTRA_KEY_VIDEO_ID: String = "extra_key_video_id"
+        const val EXTRA_KEY_VIDEO_TITLE = "extra_key_video_title"
+        private const val ANALYTICS_KEY_PLAYBACK_POSITION = "video_playback_position_ms"
+    }

Then use the constant in both JSON objects:

-                                put("video_playback_position_ms", videoPlayer.duration)
+                                put(ANALYTICS_KEY_PLAYBACK_POSITION, videoPlayer.duration)

138-141: Consistent pattern for early video closure analytics!

The structured approach matches the completion event pattern perfectly, providing consistent analytics data structure for both video completion and early closure scenarios. This supports comprehensive learning analytics for elimu.ai's educational mission.

Apply the same constant suggestion here for consistency:

-                    put("video_playback_position_ms", videoPlayer.currentPosition)
+                    put(ANALYTICS_KEY_PLAYBACK_POSITION, videoPlayer.currentPosition)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3b87ae and c3a7d6e.

📒 Files selected for processing (2)
  • app/src/main/java/ai/elimu/filamu/ui/VideosActivity.kt (2 hunks)
  • app/src/main/java/ai/elimu/filamu/ui/video/VideoActivity.kt (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: jo-elimu
PR: elimu-ai/filamu#45
File: gradle/libs.versions.toml:3-3
Timestamp: 2025-04-24T14:23:34.460Z
Learning: The elimu-ai organization's dependencies (including analytics, model, and content-provider) are hosted on JitPack rather than Maven Central, and the projects are configured to use the JitPack repository.
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: test (29)
  • GitHub Check: test (28)
  • GitHub Check: build (macos-latest, 17)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (macos-latest, 21)
  • GitHub Check: build (windows-latest, 17)
  • GitHub Check: build (ubuntu-latest, 17)
  • GitHub Check: build (ubuntu-latest, 21)
🔇 Additional comments (2)
app/src/main/java/ai/elimu/filamu/ui/VideosActivity.kt (2)

28-28: LGTM! Import addition supports the analytics refactoring.

The JSONObject import is correctly added to support the new structured analytics event reporting. This aligns with elimu.ai's mission to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months by enabling better analytics tracking.


124-126: Excellent refactoring to structured analytics events!

The change from passing the enum directly to creating a JSONObject with an explicit "eventType" key makes the analytics event structure more explicit and maintainable. This standardization will help track video learning interactions more effectively, supporting elimu.ai's mission to empower children's self-directed learning.

@jo-elimu jo-elimu requested a review from tuancoltech July 3, 2025 07:25
additionalData = extraData,
learningEventType = LearningEventType.VIDEO_CLOSED_BEFORE_COMPLETION,
additionalData = JSONObject().apply {
put("eventType", LearningEventType.VIDEO_CLOSED_BEFORE_COMPLETION)
Copy link
Member

@tuancoltech tuancoltech Jul 3, 2025

Choose a reason for hiding this comment

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

@jo-elimu Should we create constant for eventType as well, similar to ANALYTICS_PLAYBACK_POSITION for consistency?
Also, there's a merge conflict with main.

Copy link
Member Author

@jo-elimu jo-elimu Jul 4, 2025

Choose a reason for hiding this comment

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

@tuancoltech Yes, we can do that.

Also, we should decide on a format standard for the fields stored inside the additionalData JSON object:

{
    "eventType": "VIDEO_COMPLETED",
    "video_playback_position_ms": 5000
}

Currently we have a mix of camelCase and snake_case, so we should decide on a standard format to use across all of our apps.

Copy link
Member

Choose a reason for hiding this comment

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

@jo-elimu I'm fine with either of the choices.
What about using snake case for JSON keys?

@jo-elimu jo-elimu merged commit 731006c into main Jul 4, 2025
8 checks passed
@jo-elimu jo-elimu deleted the content-provider-1.4.27 branch July 4, 2025 02:16
@coderabbitai coderabbitai bot mentioned this pull request Jul 31, 2025
22 tasks
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.

2 participants