-
-
Notifications
You must be signed in to change notification settings - Fork 268
fix!: Add missing package name to HomeWidget Glance files #365
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
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/abausg/home_widget~365 Documentation is deployed and generated using docs.page. |
20a33bf to
715ba89
Compare
715ba89 to
e4ab68f
Compare
|
Thank you for this! Given that this is a breaking change I will merge this soon and also add some more Information into the docs in the Place where I want to have migration guides (which is not yet ready) Thanks for this though!! |
Thanks for feedback, I'm glad to be of help. |
WalkthroughThe PR reorganizes Android package structure by adding explicit package declarations to Kotlin files and updating imports to use fully qualified package names (es.antonborri.home_widget) instead of local imports. Documentation is updated to reflect the new import convention, and the spell-check dictionary is expanded with two new words. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 115 115
=========================================
Hits 115 115 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ABausG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this change. I added some docs on how to migrate to this
There was a problem hiding this 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 (1)
docs/migrations/0.9.0.mdx (1)
17-41: Excellent migration documentation for the breaking change.The migration guide clearly explains:
- Why the change is necessary (explicit namespace declarations)
- What needs to be updated (import statements)
- How to update (before/after examples)
- Which classes are affected (comprehensive list)
The before/after code examples with diff markers make it easy for users to understand the required changes.
Optional: Consider adding migration tooling hints
You could optionally enhance the migration guide by mentioning:
- The minimum Android Gradle Plugin version that supports namespace declarations (if applicable)
- A regex pattern for users to find and update imports in their codebase:
Find: import (HomeWidget\w+) Replace: import es.antonborri.home_widget.$1These are nice-to-have additions but not essential since the migration path is already clear.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
.github/cspell.yamldocs/android-xml/render-flutter-widget.mdxdocs/android-xml/setup.mdxdocs/migrations/0.9.0.mdxdocs/setup/android.mdxpackages/home_widget/android/src/main/kotlin/es/antonborri/home_widget/HomeWidgetGlanceState.ktpackages/home_widget/android/src/main/kotlin/es/antonborri/home_widget/HomeWidgetGlanceWidgetReceiver.ktpackages/home_widget/example/android/app/src/main/kotlin/es/antonborri/home_widget_example/glance/HomeWidgetGlanceAppWidget.ktpackages/home_widget/example/android/app/src/main/kotlin/es/antonborri/home_widget_example/glance/HomeWidgetReceiver.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build iOS Examples (home_widget_example)
- GitHub Check: Build iOS Examples (lockscreen_widgets)
- GitHub Check: Build iOS Examples (configurable_widget)
- GitHub Check: Build Android Examples (home_widget_example)
- GitHub Check: Android Integration Tests
- GitHub Check: Quality Checks
- GitHub Check: iOS Integration Tests
- GitHub Check: iOS Integration Tests
🔇 Additional comments (8)
packages/home_widget/android/src/main/kotlin/es/antonborri/home_widget/HomeWidgetGlanceWidgetReceiver.kt (1)
1-2: LGTM! Package declaration correctly added.The explicit package declaration prevents naming conflicts and aligns with the directory structure. This is a necessary change to move away from the default package.
packages/home_widget/android/src/main/kotlin/es/antonborri/home_widget/HomeWidgetGlanceState.kt (1)
1-2: LGTM! Package declaration correctly added and import cleanup is appropriate.The explicit package declaration is correct. The removal of the
HomeWidgetPluginimport (mentioned in the summary) is appropriate since both classes now reside in the same package, allowing direct reference without an explicit import..github/cspell.yaml (1)
73-73: LGTM! Valid widget-related terms added to dictionary.Both "sirikit" and "widgetconfigurationintent" are legitimate technical terms related to widget functionality and are appropriately added to the spell-check dictionary.
Also applies to: 76-76
docs/setup/android.mdx (1)
61-62: LGTM! Documentation correctly updated to reflect the namespace migration.The import statements are properly updated to use fully qualified package names, which aligns with the breaking changes introduced in this PR. The documentation will guide users to use the correct import patterns.
Also applies to: 106-106
packages/home_widget/example/android/app/src/main/kotlin/es/antonborri/home_widget_example/glance/HomeWidgetReceiver.kt (1)
3-3: LGTM! Example correctly updated to use fully qualified imports for the breaking change.The import statement correctly demonstrates the required migration pattern for v0.9.0, where HomeWidget classes must now be imported with their full package qualifier (
es.antonborri.home_widget.*). Verification confirms all imports across the codebase have been successfully migrated, with no remaining old-style imports identified.packages/home_widget/example/android/app/src/main/kotlin/es/antonborri/home_widget_example/glance/HomeWidgetGlanceAppWidget.kt (1)
30-31: LGTM! Import updates align with the migration pattern.The imports now use fully qualified package names (
es.antonborri.home_widget.*), which is consistent with the breaking change documented in the migration guide. The example code properly demonstrates the new import pattern for users upgrading to 0.9.0.docs/android-xml/render-flutter-widget.mdx (1)
32-33: Documentation example updated correctly.The import statement now uses the fully qualified package name, demonstrating the proper migration pattern for users. This aligns with the breaking changes introduced in 0.9.0.
docs/android-xml/setup.mdx (1)
58-59: Documentation correctly shows the fully qualified import.The setup guide now demonstrates the proper import pattern using the full package name, ensuring new users follow the correct approach from the start. This is consistent with the 0.9.0 migration requirements.
Description
During debugging, I noticed that the HomeWidgetGlanceWidgetReceiver and HomeWidgetGlanceState.kt classes do not have a namespace for them.
=> It can lead to naming conflicts if multiple files in the default package define classes with the same name
Checklist
exampleor documentation.Breaking Change?
Related Issues
Link issue: #357 (comment)