Skip to content

[components] Migrate seven small components to Composition API - #2208

Merged
frankrousseau merged 8 commits into
cgwire:mainfrom
frankrousseau:chore/composition-api-small-components
Sep 14, 2026
Merged

frankrousseau merged 8 commits into
cgwire:mainfrom
frankrousseau:chore/composition-api-small-components

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

  • Seven components still use the Options API and legacy mixins (format, dom, grab list, search).
  • ProductionQuota carries unread state, unused refs, dead CSS and duplicated watcher logic.

Solution

  • Convert AssetListNumbers, PeopleQuotaInfo, PeopleList, Brief, TimelineItem, EntityPreviewFileCard and ProductionAssetTypes to <script setup>, using useFormat and useGrabList.
  • Drop dead code found on the way: the never emitted quota panel close, unused getters and helpers, no-op CSS.
  • Clean up ProductionQuota: remove unread state and refs, factor the silent query reset and the shot reload.

frankrousseau and others added 8 commits September 14, 2026 15:54
Convert the asset list footer to script setup on top of useFormat, in
place of formatListMixin. The hours or days label branches now only pick
the i18n key.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert PeopleQuotaInfo to script setup. Its close method and close emit
were never called, the panel closes through its router link, so drop them
along with the listener on the quota page.

The week bounds share one moment instance, the close route keeps
production_id in its params, and the root class no longer carries the
timesheet panel name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Drop state that was written but never read (isLoading, currentMode), the
unused template refs and two dead CSS rules. The silent route query reset
and the shot reload, each duplicated across two watchers, move to one
method apiece. Imports follow the project order.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert PeopleList to script setup. useGrabList replaces the dom and grab
list mixins and manages the document listeners. The users label key, built
twice for the header and the footer, is shared, and a mobile icon margin
that never applied is dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert Brief to script setup: the client redirect moves to onMounted and
the title to useHead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert TimelineItem to script setup with typed props and defaults. Drop
the is-completed title rules, which repeated the base colors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert EntityPreviewFileCard to script setup. Drop the unused task type
helper and its store getters, the empty mounted hook and the root key the
parent already sets. The download path becomes a computed, and two no-op
CSS declarations go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
Convert ProductionAssetTypes to script setup. The search mixin is dropped:
its route watcher did nothing on this page, and the two URL helpers the
page used are inlined. The CSV export passes the count mode it already
fell back to, and the title no longer throws before the production loads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8vdEJjSK2MsTYP3TVX6a2
@frankrousseau
frankrousseau merged commit 4f100c2 into cgwire:main Sep 14, 2026
5 checks passed
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