feat(widget): add interactive notes widget#3215
Open
loloakira wants to merge 1 commit into
Open
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 12 minor |
| Complexity | 1 medium |
🟢 Metrics 88 complexity · 7 duplication
Metric Results Complexity 88 Duplication 7
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
ce74696 to
dede2b6
Compare
dede2b6 to
c640e96
Compare
Add a third home-screen widget, "Interactive notes", that shows notes as a scrollable single column of rounded cards. Each card shows the note title and a multi-line content excerpt (the whole note when it is short). Tapping a card opens that specific note; a floating button in the bottom-right creates a new note in the widget's configured category/account. The favourite star is a non-clickable indicator. The per-widget configuration adds sort options: a "favourites on top" toggle and a newest-first / oldest-first order. The widget is reconfigurable via long-press on Android 12+ and provides a live previewLayout for the widget picker. Reuses the existing NotesListWidgetData storage (no database migration) and the existing excerpt generation; sort options are kept in per-widget SharedPreferences. The two existing widgets are left unchanged. So reconfiguration can persist updated settings, the shared createOrUpdateNoteListWidgetData DAO now uses an upsert (REPLACE) conflict strategy instead of a plain insert that aborted on the existing primary key; this is transparent to the non-reconfigurable widgets, which never hit the conflict. A DAO test covers the upsert. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: loloakira <6253351+loloakira@users.noreply.github.com>
c640e96 to
db9f75d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new home-screen widget called Interactive notes — a third
widget alongside the existing single-note and note-list widgets, which are
left unchanged.
What it does
note when it is short).
bottom-right creates a new note in the widget's configured category/account.
a newest-first / oldest-first order.
the widget picker.
Implementation notes
NotesListWidgetDatastorage and excerpt generation —no database migration.
SharedPreferences; notes are sortedin memory.
values/strings.xmlonly (translations arehandled by Transifex).
Tested
./gradlew assembleDevDebugand./gradlew lintDevDebugpass.assembleDevDebug/lintDevDebugpassoptions, reconfiguration, light/dark mode.
🖼️Screenshots
🏁 Checklist
Developed with AI assistance (Claude Code 2.1.162, Claude Opus 4.8).