Skip to content

delete note on tag UI#38

Merged
vicky7230 merged 1 commit intomasterfrom
feature/swipe-reveal-tags-ui
Jul 12, 2025
Merged

delete note on tag UI#38
vicky7230 merged 1 commit intomasterfrom
feature/swipe-reveal-tags-ui

Conversation

@vicky7230
Copy link
Owner

@vicky7230 vicky7230 commented Jul 12, 2025

PR Type

Enhancement


Description

  • Added UpdateNoteDeletedUseCase to TagsViewModelTest

  • Introduced onNoteDeleteClick in TagScreenUi

  • Added markNoteAsDeleted test case


Changes diagram

flowchart LR
  A["Add UpdateNoteDeletedUseCase"] -- "to TagsViewModelTest" --> B["Introduce onNoteDeleteClick"]
  B -- "in TagScreenUi" --> C["Add markNoteAsDeleted test"]
Loading

Changes walkthrough 📝

Relevant files
Enhancement
2 files
TagsViewModelTest.kt
Added `UpdateNoteDeletedUseCase` and test case                     
+59/-11 
TagScreenUi.kt
Introduced `onNoteDeleteClick` parameter                                 
+3/-0     
Additional files
8 files
ChatHistory_schema_v2.xml +3/-0     
androidTestResultsUserPreferences.xml +1/-0     
deploymentTargetSelector.xml +11/-0   
.pr_agent.toml +1/-1     
Note.kt +1/-0     
InternalTagsFeatureApi.kt +1/-0     
TagsViewModel.kt +13/-4   
TagContent.kt +34/-7   

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link

    Failed to generate code suggestions for PR

    @vicky7230 vicky7230 force-pushed the feature/swipe-reveal-tags-ui branch from eb8700c to 4849d33 Compare July 12, 2025 11:52
    @github-actions
    Copy link

    Failed to generate code suggestions for PR

    @vicky7230 vicky7230 merged commit 2827ef9 into master Jul 12, 2025
    5 checks passed
    @vicky7230 vicky7230 deleted the feature/swipe-reveal-tags-ui branch July 12, 2025 11:53
    @github-actions
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Possible Issue

    The SwipeableItemWithActions component is used to wrap TagNoteItem, which might lead to unexpected behavior if the swipe action is not properly handled or if the TagNoteItem does not support being wrapped in this way.

    SwipeableItemWithActions(
        modifier = Modifier.animateItem(),
        isRevealed = note.optionRevealed,
        actions = {
            ActionIcon(
                onClick = { onNoteDeleteClick(note) },
                backgroundColor = Red,
                icon = ImageVector.vectorResource(id = com.core.common.R.drawable.ic_delete),
                modifier = Modifier.fillMaxHeight(),
                contentDescription = "Delete Icon",
            )
        },
    ) {
        TagNoteItem(
            modifier = Modifier.fillMaxWidth().background(tagsUiState.tag.color.toColorSafely()),
            note = note,
            onNoteClick = onNoteClick,
            onNoteDoneClick = onNoteDoneClick,
        )
    }
    Code Duplication

    The onNoteDeleteClick handler is directly passed to TagContent. Ensure that this handler is not duplicating functionality or causing redundancy in the TagsViewModel.

    onNoteDeleteClick = tagsViewModel::markNoteAsDeleted,

    @github-actions
    Copy link

    PR Code Suggestions ✨

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

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant