feat(widget): add interactive notes widget#3215
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
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
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).