Skip to content

feat: new visual for task card#229

Merged
hmbanan666 merged 2 commits into
mainfrom
updated-task-card
Oct 17, 2025
Merged

feat: new visual for task card#229
hmbanan666 merged 2 commits into
mainfrom
updated-task-card

Conversation

@hmbanan666

@hmbanan666 hmbanan666 commented Oct 17, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Confetti celebration on task completion
    • Direct task creation button in task lists
    • Inline task list editing
  • UI/UX Improvements

    • Refined animations and transitions (slide directions updated)
    • Cleaner, flatter header layout and improved alignment
    • Task dates show formatted calendar info; date-only display added
    • Title font sizing adjusted; avatar group expanded and display refined
    • Task details now shown in an improved task info card
  • Removed Features

    • Avatar upload functionality removed from personal view
  • Bug Fixes

    • Replaced checkbox-based complete controls with streamlined completion UI

@hmbanan666 hmbanan666 self-assigned this Oct 17, 2025
@coderabbitai

coderabbitai Bot commented Oct 17, 2025

Copy link
Copy Markdown

Walkthrough

Updates UI layout and motion presets across task and staff components, replaces inline task controls with TaskInfoCard, adds a shared useConfetti composable and integrates it (trigger + overlay) into the complete-task flow and app layout, and removes avatar upload UI from the profile page.

Changes

Cohort / File(s) Summary
Task card / dropdown
apps/atrium-telegram/app/components/TaskActiveCard.vue, apps/atrium-telegram/app/components/TaskInfoCard.vue
TaskActiveCard now renders TaskInfoCard inside the dropdown; removed inline checkbox/complete UI and DateFormatter usage. TaskInfoCard gains motion-preset-slide-left and a new task date block rendering d MMMM yyyy (ru) when task.date exists.
Task list & header
apps/atrium-telegram/app/components/TaskList.vue
Simplified header: uses SectionTitle, conditional Create button, inline edit pencil, avatar group (max 3, md), swapped TaskCard → TaskActiveCard for list items, and center-aligned empty-state text.
Animations & typography
apps/atrium-telegram/app/components/StaffBlock.vue, apps/atrium-telegram/app/components/SectionTitle.vue, apps/atrium-telegram/app/pages/task/[taskId]/index.vue
Staff item animation changed to motion-preset-slide-up; SectionTitle heading line-height adjusted (text-2xl/6text-2xl/7); two blocks on task detail page switched items-startitems-center.
Profile / avatar removal
apps/atrium-telegram/app/pages/task/my.vue
Removed avatar UI element, click handler, ModalUploadUserAvatar import, vibrate/modal creation and avatar upload handling.
Confetti feature (composable + integration)
apps/atrium-telegram/app/composables/useConfetti.ts, apps/atrium-telegram/app/components/form/CompleteTask.vue, apps/atrium-telegram/app/layouts/default.vue
Adds useConfetti shared composable (isShown, pop() auto-resets after 5s). CompleteTask calls pop() after successful updates. Default layout imports vConfetti, renders a ClientOnly confetti overlay bound to useConfetti().isShown and a v-confetti directive.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CompleteTask
    participant Stores as "Task & User Stores"
    participant ConfettiCompo as "useConfetti"
    participant Layout

    User->>CompleteTask: Submit complete action
    activate CompleteTask
    CompleteTask->>Stores: update task & user state
    Stores-->>CompleteTask: update success
    CompleteTask->>ConfettiCompo: pop()
    ConfettiCompo-->>Layout: isShown = true (shared)
    Layout->>Layout: render ClientOnly confetti overlay (v-confetti)
    Note right of Layout: confetti auto-resets after 5s
    deactivate CompleteTask
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Poem

🐰 I hopped in code with tiny paws,

Cards now slide and change their laws,
Confetti pops — a joyous bloom,
Avatars trimmed, the lists resume,
Hop-hop! UI dances in the room ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: new visual for task card" is partially related to the changeset. The PR does include substantial visual updates to task cards across multiple components—TaskActiveCard has been refactored with a new TaskInfoCard component, TaskList has been restructured with improved layout and animations, and TaskInfoCard now displays task dates with new formatting. These changes represent the primary focus of the PR. However, the title is somewhat vague ("new visual") and doesn't fully capture the scope of changes, which also include the addition of a confetti effect system and removal of avatar upload functionality, making it less comprehensive than it could be.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch updated-task-card

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/atrium-telegram/app/components/TaskList.vue (1)

16-47: Consider optimizing empty avatar container.

The h-8 container on line 18 renders even when there are no chat members, creating an empty fixed-height element. While this may be intentional for layout consistency, consider wrapping the entire avatar section in a conditional:

<div v-if="activeChatMembers?.length" class="h-8">
  <UAvatarGroup
    :max="3"
    size="md"
    ...
  >

This would avoid rendering an empty container when no avatars are displayed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37b7167 and dbc2e57.

📒 Files selected for processing (7)
  • apps/atrium-telegram/app/components/SectionTitle.vue (1 hunks)
  • apps/atrium-telegram/app/components/StaffBlock.vue (1 hunks)
  • apps/atrium-telegram/app/components/TaskActiveCard.vue (4 hunks)
  • apps/atrium-telegram/app/components/TaskInfoCard.vue (2 hunks)
  • apps/atrium-telegram/app/components/TaskList.vue (2 hunks)
  • apps/atrium-telegram/app/pages/task/[taskId]/index.vue (1 hunks)
  • apps/atrium-telegram/app/pages/task/my.vue (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (12)
apps/atrium-telegram/app/components/StaffBlock.vue (1)

7-7: LGTM! Animation direction update looks good.

The change from motion-preset-slide-right to motion-preset-slide-up aligns with the broader visual updates in this PR.

apps/atrium-telegram/app/pages/task/my.vue (1)

55-55: LGTM! Import cleanup is correct.

The removal of ModalUploadUserAvatar import aligns with the removal of avatar upload functionality from this page.

apps/atrium-telegram/app/components/SectionTitle.vue (1)

2-2: LGTM! Line height adjustment improves readability.

The change from text-2xl/6 to text-2xl/7 provides better vertical spacing for the heading.

apps/atrium-telegram/app/pages/task/[taskId]/index.vue (2)

46-51: LGTM! Vertical alignment improvement.

Changing from items-start to items-center better aligns the calendar icon with the date text.


53-58: LGTM! Vertical alignment improvement.

Changing from items-start to items-center better aligns the book icon with the task list name.

apps/atrium-telegram/app/components/TaskInfoCard.vue (2)

2-2: LGTM! Motion animation added.

The motion-preset-slide-left class provides a consistent entrance animation for the task card.


41-46: LGTM! Date display implementation is correct.

The date block follows the same pattern as other info blocks and uses consistent formatting with the rest of the app.

apps/atrium-telegram/app/components/TaskActiveCard.vue (2)

2-15: LGTM! Clean refactor to use TaskInfoCard component.

The simplified structure delegates task rendering to TaskInfoCard, reducing duplication and improving maintainability.


78-83: LGTM! Good UX for completed tasks.

The disabled "Задача закрыта" menu item provides clear feedback that the task is completed and no longer actionable.

apps/atrium-telegram/app/components/TaskList.vue (3)

2-14: LGTM! Clean header structure.

The simplified header with SectionTitle and conditional Create button is much more maintainable than the previous UPopover-based approach.


53-57: LGTM! TaskActiveCard integration.

The switch from TaskCard to TaskActiveCard properly integrates the new TaskInfoCard-based rendering.


60-62: LGTM! Centered empty state improves UX.

Adding text-center to the empty state message provides better visual balance.

@sonarqubecloud

Copy link
Copy Markdown

@hmbanan666 hmbanan666 merged commit 217b76e into main Oct 17, 2025
7 of 8 checks passed
@hmbanan666 hmbanan666 deleted the updated-task-card branch October 17, 2025 10:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/atrium-telegram/app/layouts/default.vue (1)

8-8: Minor timing mismatch between confetti duration and auto-hide.

The confetti duration is set to 4500ms, but the composable's pop() function resets isShown after 5000ms. This 500ms gap is minor but could be aligned for consistency.

Consider aligning the durations:

  • Either adjust the directive duration to 5000ms, or
  • Update the composable timeout to match 4500ms
apps/atrium-telegram/app/composables/useConfetti.ts (1)

4-9: Consider handling rapid successive calls to pop().

If pop() is called multiple times in quick succession, multiple overlapping timeouts will be created. This could cause the confetti to hide prematurely or behave unexpectedly.

Apply this diff to clear any pending timeout before starting a new one:

 function _useConfetti() {
   const isShown = ref(false)
+  let timeoutId: ReturnType<typeof setTimeout> | null = null

   function pop() {
+    if (timeoutId !== null) {
+      clearTimeout(timeoutId)
+    }
     isShown.value = true
-    setTimeout(() => {
+    timeoutId = setTimeout(() => {
       isShown.value = false
+      timeoutId = null
     }, 5000)
   }

   return { isShown, pop }
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbc2e57 and a46054c.

📒 Files selected for processing (3)
  • apps/atrium-telegram/app/components/form/CompleteTask.vue (2 hunks)
  • apps/atrium-telegram/app/composables/useConfetti.ts (1 hunks)
  • apps/atrium-telegram/app/layouts/default.vue (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
apps/atrium-telegram/app/components/form/CompleteTask.vue (1)

52-52: LGTM: Clean confetti integration.

The confetti trigger is properly placed after successful task completion and before user feedback.

Also applies to: 81-81

apps/atrium-telegram/app/layouts/default.vue (1)

2-10: No issues found. The code correctly handles template ref availability through Vue 3's reactivity system.

When isShown is false, the confetti div is not rendered (v-if prevents DOM creation). When isShown becomes true, both the ref element and the directive mount in the same lifecycle phase. Vue's reactivity system ensures template expressions like confetti?.clientHeight are tracked as dependencies, so the binding value updates when the ref is assigned. @neoconfetti/vue treats the v-confetti binding reactively — when options change, the directive destroys the current confetti and creates a new one. The optional chaining operator (?.) provides defensive protection. This pattern is used across multiple production apps without issues.

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.

1 participant