Skip to content

chore: inputs rework#100

Merged
hmbanan666 merged 1 commit into
mainfrom
inputs-rework
Aug 27, 2025
Merged

chore: inputs rework#100
hmbanan666 merged 1 commit into
mainfrom
inputs-rework

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Aug 27, 2025

Summary by CodeRabbit

  • Style

    • Unified muted ring styling for inputs, select menus, and textareas.
    • Simplified modal title typography.
    • Increased control sizes to XL across task and list forms (fields and buttons).
    • Updated date inputs’ padding; toaster now has additional top margin.
    • Navigation item renamed and icon updated for the “Epic” section.
  • Refactor

    • Reworked date pickers to use popovers with embedded calendars.
    • Removed submission toasts from task completion flow.
    • “Create Task List” card hidden when viewing today-only tasks.

@hmbanan666 hmbanan666 self-assigned this Aug 27, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 27, 2025

Walkthrough

UI configuration and component sizes were updated across the app. Input-related UI slots gained a base ring style. Toast container received an additional CSS class. Date pickers in create/update forms were restructured into UPopover. A navigation route label/icon changed. A create-card is now conditionally hidden. CompleteTask removed toast usage.

Changes

Cohort / File(s) Summary
UI config slots and modal title
apps/atrium-telegram/app/app.config.ts
Added ui.input, ui.inputMenu, ui.selectMenu, ui.textarea with slots.base: '!ring-muted'. Updated ui.modal.slots.title from text-lg/5 font-semibold to font-semibold.
Toaster config
apps/atrium-telegram/app/app.vue
Changed :toaster from { position: 'top-center' } to multi-line object with position: 'top-center' and class: 'mt-16'.
Navigation label/icon
apps/atrium-telegram/app/components/Navigation.vue
Route /epic title changed to Эпики; icon changed to i-lucide-crown.
Complete task flow (no toasts)
apps/atrium-telegram/app/components/form/CompleteTask.vue
Increased control sizes to xl. Removed action toast calls; kept API call, store updates, haptic feedback, and emits.
Date picker rework (create/update)
apps/atrium-telegram/app/components/form/CreateTask.vue, apps/atrium-telegram/app/components/form/UpdateTask.vue
Replaced inline/grid date input with UPopover wrapping date input and calendar; adjusted input trailing padding pe-2; retained clear button and bindings.
Form control size increases
apps/atrium-telegram/app/components/form/CreateTaskList.vue, .../UpdateTaskList.vue, .../UploadUserAvatar.vue
Switched multiple inputs/selects/buttons from size="lg" to size="xl"; no logic changes.
Index conditional render
apps/atrium-telegram/app/pages/index.vue
Added v-if="!taskStore.isTodayOnly" to CreateCard to hide it in today-only view.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CompleteTask as CompleteTask.vue
  participant API as Tasks API
  participant Stores as Pinia Stores

  User->>CompleteTask: Submit form
  CompleteTask->>API: PATCH /tasks/:id complete
  alt success
    API-->>CompleteTask: 200 OK (task updated)
    CompleteTask->>Stores: Update task/taskList state
    CompleteTask->>User: Emit success + vibrate
  else error
    API-->>CompleteTask: 4xx/5xx
    CompleteTask->>User: Emit error + vibrate
  end
  note over CompleteTask: Toast notifications removed
Loading
sequenceDiagram
  autonumber
  actor User
  participant Form as Create/UpdateTask.vue
  participant Popover as UPopover
  participant Calendar as UCalendar

  User->>Form: Focus date input
  Form->>Popover: Open
  Popover->>Calendar: Show calendar
  User->>Calendar: Pick date / Clear via trailing button
  Calendar-->>Form: selectedDate updated
  Form->>Popover: Close on selection
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • chore: feedback rework #99 — Touches similar feedback paths; contrasts toast removal here with vibrate/useFeedback adjustments there.

Poem

A ring of muted silver hue,
Inputs grew tall, like morning dew.
Dates now pop with gentle grace,
Crowns replaced a secret place.
Toasts fell quiet—vibes remain—
I thump my paws, ship done again. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch inputs-rework

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/atrium-telegram/app/components/form/CreateTask.vue (1)

105-106: Unify Chat Member DTO Shape Across Front-end and API

There’s an inconsistency in how you access the member’s user ID in Vue components versus the server/API code. In some places you use the nested property (m.user.id), and elsewhere you use the flattened property (member.userId), which will lead to silent filtering bugs.

• Front-end components filtering by nested ID (needs updating):
– apps/atrium-telegram/app/components/form/CreateTask.vue (lines 105–106)
– apps/atrium-telegram/app/components/form/UpdateTask.vue (lines 117–118)
– apps/web-app/app/components/form/CreateTask.vue (line 106)
– apps/web-app/app/components/form/UpdateTask.vue (line 120)

• Front-end components already using flat ID (may need aligning):
– apps/atrium-telegram/app/components/form/UpdateTaskList.vue (lines 86–87)
– apps/atrium-telegram/app/components/form/UpdateTask.vue (line 138)
– apps/web-app/app/components/form/UpdateTaskList.vue (line 88)
– apps/web-app/app/components/form/UpdateTask.vue (line 141)

• Server/API guards and mutations using flat ID:
– apps/atrium-telegram/server/api/**.patch.ts & .delete.ts (multiple files)
– apps/web-app/server/api/
.patch.ts & **.delete.ts (multiple files)

Please choose one shape for the ChatMember DTO—either flatten to userId: string or nest under user: { id: string }—and update both the API interfaces and all front-end references accordingly to prevent silent mismatches.

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

117-118: Ensure consistent member ID property across all filters

The RG audit confirms that in several components you’re filtering chat members by the nested m.user.id, while elsewhere you’re using the flat member.userId. This divergence can lead to edge-case bugs if one of those properties is ever missing or out-of-sync. Please normalize on a single property throughout the codebase:

• apps/atrium-telegram/app/components/form/UpdateTask.vue (lines 117, 138)
• apps/atrium-telegram/app/components/form/CreateTask.vue (line 105)
• apps/web-app/app/components/form/UpdateTask.vue (lines 120, 141)
• apps/web-app/app/components/form/CreateTask.vue (line 106)
• apps/web-app/app/components/TaskList.vue, TaskCard.vue, UpdateTaskList.vue
• apps/web-app/app/pages/index.vue, pages/staff/[id].vue

Recommended fix:
– Decide whether the API should expose userId on the member object, or always include the nested user.id.
– Update all frontend filters to use the chosen property (and, if necessary, adjust the API/data-layer to populate both for backward compatibility).

This refactor is mandatory to prevent subtle authorization or filtering errors.

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

48-49: Localize the hardcoded title to align with i18n usage in this file

Use t('app.epics') instead of a literal. Also ensure the key exists in locale files.

-    title: 'Эпики',
+    title: t('app.epics'),
apps/atrium-telegram/app/pages/index.vue (1)

47-52: Prefer v-show to avoid unmounting CreateCard on toggle

v-show preserves DOM state and focus when flipping isTodayOnly, reducing churn.

-      <CreateCard
-        v-if="!taskStore.isTodayOnly"
+      <CreateCard
+        v-show="!taskStore.isTodayOnly"
         :label="$t('app.create.task-list.button')"
         icon="i-lucide-list-todo"
         @click="modalCreateTaskList.open()"
       />
apps/atrium-telegram/app/app.vue (1)

5-8: Account for device safe areas in toaster offset

Static mt-16 may overlap system UI on some devices. Consider safe-area-aware margin.

-    :toaster="{
-      position: 'top-center',
-      class: 'mt-16',
-    }"
+    :toaster="{
+      position: 'top-center',
+      class: 'mt-[env(safe-area-inset-top)] md:mt-16',
+    }"
apps/atrium-telegram/app/app.config.ts (2)

3-22: Confirm intent of global '!ring-muted' on input-like bases

Applying a forced ring color at the base slot for input, inputMenu, selectMenu, and textarea may override focus/invalid/hover variants from Nuxt UI. Validate that:

  • Disabled/invalid states still present correct ring colors.
  • Focus-visible styles aren’t unintentionally muted.

If the goal is focus-only color, consider scoping to focus-visible instead of forcing on base.


51-51: Modal title size removed — double-check visual regression

Title now drops the size token. If unintentional, restore previous size to maintain hierarchy.

-        title: 'font-semibold',
+        title: 'text-lg/5 font-semibold',
apps/atrium-telegram/app/components/form/CreateTask.vue (1)

44-68: Date input should be readonly and localized; add basic a11y hints

Prevent typing into a controlled date display and localize the placeholder. Also add a simple aria hint for the popover trigger.

-        <UInput
+        <UInput
           :value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
-          placeholder="Выберите дату"
+          :placeholder="$t('common.select-date')"
           size="xl"
           class="w-full items-center justify-center cursor-pointer"
           :ui="{ trailing: 'pe-2' }"
+          readonly
+          aria-readonly="true"
+          aria-haspopup="dialog"
         >
apps/atrium-telegram/app/components/form/UpdateTaskList.vue (1)

50-57: Icon-only Delete button lacks accessible name

Provide an accessible label (and optional title) for screen readers.

       <UButton
         variant="soft"
         color="error"
         size="xl"
         icon="i-lucide-trash-2"
         class="aspect-square justify-center"
+        :aria-label="$t('common.delete')"
+        :title="$t('common.delete')"
         @click="onDelete"
       />
apps/atrium-telegram/app/components/form/CompleteTask.vue (1)

63-86: Toast removal: confirm UX intent for task completion

Other forms still use actionToast; this one now relies on vibration only. If intentional, all good. If not, consider restoring a minimal success/error toast for parity.

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

40-64: Date input: make readonly, localize placeholder, add a11y hint

Same rationale as CreateTask.vue.

-        <UInput
+        <UInput
           :value="selectedDate ? df.format(selectedDate.toDate(getLocalTimeZone())) : ''"
-          placeholder="Выберите дату"
+          :placeholder="$t('common.select-date')"
           size="xl"
           class="w-full items-center justify-center cursor-pointer"
           :ui="{ trailing: 'pe-2' }"
+          readonly
+          aria-readonly="true"
+          aria-haspopup="dialog"
         >

183-206: Toast consistency across forms

This component still uses actionToast, while CompleteTask.vue no longer does. Decide on a consistent pattern (toasts everywhere vs. inline/none) for predictable UX.

Also applies to: 208-230

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ca02361 and e9cbd73.

📒 Files selected for processing (10)
  • apps/atrium-telegram/app/app.config.ts (2 hunks)
  • apps/atrium-telegram/app/app.vue (1 hunks)
  • apps/atrium-telegram/app/components/Navigation.vue (1 hunks)
  • apps/atrium-telegram/app/components/form/CompleteTask.vue (2 hunks)
  • apps/atrium-telegram/app/components/form/CreateTask.vue (3 hunks)
  • apps/atrium-telegram/app/components/form/CreateTaskList.vue (4 hunks)
  • apps/atrium-telegram/app/components/form/UpdateTask.vue (4 hunks)
  • apps/atrium-telegram/app/components/form/UpdateTaskList.vue (4 hunks)
  • apps/atrium-telegram/app/components/form/UploadUserAvatar.vue (2 hunks)
  • apps/atrium-telegram/app/pages/index.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 (6)
apps/atrium-telegram/app/components/form/UploadUserAvatar.vue (1)

13-13: UI size bump looks consistent

Switching input and button to size="xl" aligns with the PR’s sizing pass. No logic impact.

Also applies to: 23-23

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

11-11: LGTM on size upgrades

All four controls moved to size="xl" consistently; matches broader rework.

Also applies to: 20-20, 35-35, 44-44

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

16-16: LGTM: size uplift to xl aligns with the UI scale change

The control sizing updates are consistent and cohesive across the form.

Also applies to: 25-25, 39-39, 74-74

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

11-11: LGTM: unified xl sizing for list form controls

Consistent with the PR’s global scale changes.

Also applies to: 21-21, 35-35, 45-45, 53-53

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

21-21: LGTM: xl sizing aligns with the updated design language

Textarea and submit button scale changes look good.

Also applies to: 30-30

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

15-15: LGTM: xl sizing applied consistently across controls

Matches the broader inputs rework.

Also applies to: 25-25, 35-35, 71-71, 81-81, 89-89

@hmbanan666 hmbanan666 merged commit 306715c into main Aug 27, 2025
8 checks passed
@hmbanan666 hmbanan666 deleted the inputs-rework branch August 27, 2025 15:28
This was referenced Oct 17, 2025
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