Skip to content

feat: create :widgets module#21128

Open
criticalAY wants to merge 1 commit into
ankidroid:mainfrom
criticalAY:widget/module
Open

feat: create :widgets module#21128
criticalAY wants to merge 1 commit into
ankidroid:mainfrom
criticalAY:widget/module

Conversation

@criticalAY

Copy link
Copy Markdown
Contributor

Purpose / Description

Establishes a :widgets Gradle module as the first step toward physically extracting widget code out of :AnkiDroid. This is the smallest viable module creation change

  • have zero dependencies on :AnkiDroid.

Fixes

Approach

See commit

How Has This Been Tested?

Local build and Pixel 10 tried adding widgets and additionally, no behavior change in the moved files (pure relocation, package unchanged), so no manual UI test is necessary.

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@criticalAY criticalAY force-pushed the widget/module branch 2 times, most recently from 014cb23 to ec2f726 Compare May 23, 2026 18:40

@david-allison david-allison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome!!!! 🥳🥳🎂🎂🎂

  • Please add a README with plans
    • For example: moving the widgets AndroidManifest
  • Please rename "java" to "kotlin" in the file path for the source files
    • this is a minor improvement in the IDE view
    • EDIT: This needs source set work

Note for the future: I feel this would be too early for another module which churns more. This change means developers have two places to look for classes

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label May 29, 2026
- First step of widget module extraction. Creates :widgets and moves three files that have no dependencies on the :AnkiDroid module
- Id.kt (AppWidgetId/AppWidgetIds value classes + AppWidgetManager extensions)
- cardanalysis/CardAnalysisWidgetPreferences.kt
- deckpicker/DeckPickerWidgetPreferences.kt

@david-allison david-allison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs a very brief README with plans, I feel

Rest LGTM, let's get this moving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Author Reply Waiting for a reply from the original author Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants