Skip to content

Interactive reminder chip to the base note cards#828

Merged
Crustack merged 7 commits intoCrustack:mainfrom
ulibte:main
Feb 17, 2026
Merged

Interactive reminder chip to the base note cards#828
Crustack merged 7 commits intoCrustack:mainfrom
ulibte:main

Conversation

@ulibte
Copy link
Copy Markdown
Contributor

@ulibte ulibte commented Feb 7, 2026

Related Issue: #829

Interactive reminder chip to the base note cards

Added onReminderClick to open reminder settings from the base note.
Updated the base note to display the most relevant reminder.
Added visual differences for elapsed reminders on the base note: strikethrough text, 50% opacity.

2026-02-07.03-05-15.mp4

Summary by CodeRabbit

  • New Features

    • Interactive reminder chip: tap to open reminder details or select in multi-select/action mode.
    • Reminder chip shows the next relevant reminder time and updates visually when a reminder has elapsed.
  • Refactor

    • Note header redesigned to use a dedicated reminder chip for clearer layout and interactions.
  • Style

    • New chip style added for consistent appearance and spacing.

ulibte and others added 4 commits February 7, 2026 01:57
Updated the base note to display the most relevant reminder.
Added visual differences for elapsed reminders on the base note: strikethrough text, 50% opacity.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 7, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a clickable ReminderChip: ViewHolder renders next reminder and exposes click/long-click, ItemListener gains onReminderClick, NotallyFragment handles reminder clicks (toggles selection in action mode or launches RemindersActivity), and layout replaces the old RemindersView with a Material Chip.

Changes

Cohort / File(s) Summary
Fragment Event Handling
app/src/main/java/com/philkes/notallyx/presentation/activity/main/fragment/NotallyFragment.kt
Adds onReminderClick(position: Int) to toggle selection when in action mode or start RemindersActivity with the note ID when not.
View Holder & Rendering
app/src/main/java/com/philkes/notallyx/presentation/view/main/BaseNoteVH.kt
Adds setupReminderChip(baseNote) to compute next reminder (uses findNextNotificationDate/toText), render/stylize the ReminderChip (alpha/strike-through for elapsed), and wires chip click/long-click to listener.onReminderClick.
Interface Contract
app/src/main/java/com/philkes/notallyx/presentation/view/misc/ItemListener.kt
Adds default fun onReminderClick(position: Int) {} to ItemListener as an optional callback.
Layout & Styles
app/src/main/res/layout/recycler_base_note.xml, app/src/main/res/values-v26/themes.xml
Replaces RemindersView/TitleLayout with a Chip ReminderChip and standalone Title; adds FileChip style in values-v26/themes.xml for chip appearance.

Sequence Diagram

sequenceDiagram
    actor User
    participant VH as BaseNoteVH
    participant Frag as NotallyFragment
    participant Activity as RemindersActivity

    User->>VH: tap ReminderChip
    VH->>Frag: onReminderClick(position)
    Frag->>Frag: check action mode
    alt not in action mode
        Frag->>Activity: start RemindersActivity(noteId)
        Activity->>User: display reminders for note
    else in action mode
        Frag->>Frag: toggle/select item
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I tapped a tiny chip with gentle hop and cheer,
Dates peep like carrots, tidy and near,
From holder to fragment the pathway runs,
Reminders awake — the small work’s begun,
Hooray — the note and I both clap our ear!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Interactive reminder chip to the base note cards' directly and clearly describes the main change: adding an interactive reminder chip component to note cards in the UI.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@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: 2

🤖 Fix all issues with AI agents
In `@app/src/main/java/com/philkes/notallyx/presentation/view/main/BaseNoteVH.kt`:
- Around line 405-425: In setupReminderChip (BaseNoteVH), clear the
STRIKE_THRU_TEXT_FLAG when the reminder is not elapsed so recycled ViewHolders
don't keep the strike-through: replace the current paintFlags assignment inside
binding.ReminderChip with a conditional that sets paintFlags = paintFlags or
Paint.STRIKE_THRU_TEXT_FLAG when isElapsed is true, otherwise clears it with
paintFlags = paintFlags and Paint.STRIKE_THRU_TEXT_FLAG.inv(); keep the alpha
logic as-is and ensure this change is applied on binding.ReminderChip within
setupReminderChip.

In `@app/src/main/res/layout/recycler_base_note.xml`:
- Around line 76-91: Set the Chip with id ReminderChip to default visibility
GONE in XML so it doesn't flicker before bind() runs, and update its horizontal
marginStart from 10dp to 16dp to match sibling padding; locate the Chip element
with android:id="@+id/ReminderChip" in recycler_base_note.xml and make these two
attribute changes to align with how setupReminderChip toggles visibility at bind
time.

STRIKE_THRU_TEXT_FLAG when the reminder is not elapsed
Set the ReminderChip to default visibility
GONE and marginStart from 10dp to 16dp
Tools namespace to show reminder chip in Layout Editor.
@Crustack
Copy link
Copy Markdown
Owner

Hi @ulibte, thanks so much for your contribution
Looks good to me, except I pushed 2 small changes:

  • the display next notification date now takes into account if a repetition is configured
  • I think it looks cleaner if the notification is displayed right below the note's title, instead of on top of it

If you are ok with these small adjustments, I'll be happy to merge this 🙂

@ulibte
Copy link
Copy Markdown
Contributor Author

ulibte commented Feb 16, 2026

Looks great, just one thing, Android Studio is reporting this lint error: android:paddingVertical requires API level 26 (current min is 21)

here:
app/src/main/res/values/themes.xml
<item name="android:paddingVertical">0dp</item>

@Crustack Crustack merged commit eed4cec into Crustack:main Feb 17, 2026
1 check was pending
@Crustack
Copy link
Copy Markdown
Owner

Looks great, just one thing, Android Studio is reporting this lint error: android:paddingVertical requires API level 26 (current min is 21)

here: app/src/main/res/values/themes.xml 0dp

Fixed and merged, thanks 🙂

@ulibte
Copy link
Copy Markdown
Contributor Author

ulibte commented Feb 18, 2026

Hi @Crustack
I saw that my pull request was merged (commit eed4cec), but I can't find the changes in the main branch. Just wanted to check if everything's okay or if I missed something.
sorry to bother you 😅

@Crustack
Copy link
Copy Markdown
Owner

Hi @Crustack I saw that my pull request was merged (commit eed4cec), but I can't find the changes in the main branch. Just wanted to check if everything's okay or if I missed something. sorry to bother you 😅

Hey, not sure what happened exactly, probably the fault is on my part with some rebase or something.
I cherry picked your commits again, they are now on the main branch 🙂

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