Skip to content

feat!: Migrate dashboard to frappe-ui v1 (and Vite 8)#283

Merged
harshtandiya merged 1 commit into
mainfrom
backport-272-to-main
Jul 23, 2026
Merged

feat!: Migrate dashboard to frappe-ui v1 (and Vite 8)#283
harshtandiya merged 1 commit into
mainfrom
backport-272-to-main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated backport of #272 to main.

* chore(dashboard): upgrade frappe-ui to v1 and drop dev submodule

Bump frappe-ui 0.1.257 -> 1.0.0-beta.25 and remove the dashboard/frappe-ui
git submodule; the npm package is now the single source. Simplify
vite.config.js to a static config that always uses the published plugin,
and exclude frappe-ui from esbuild pre-bundling since it ships as source
importing ~icons/lucide/* virtuals that only the Vite plugin resolves.

Fix four type errors surfaced by v1's stricter types (nullable length
guard, Combobox string|null emit, FileUploader error slot prop).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor(dashboard): adopt frappe-ui v1 Dialog props and lucide icons

Convert all Dialog usages from the deprecated `options` blob and
`#body-content`/`#body-title`/`#body` slots to flat top-level props and
the default/`#title` slots (`#body` -> `bare` prop). Flatten the withdraw
dialog's icon to `theme` and rename its lucide icon to `triangle-alert`.
Replace remaining feather icon strings with `lucide-` names.

* fix(dashboard): restore Zoom button hover color under frappe-ui v1

The v1 ink-blue scale defines shades 1-3 only, so `hover:bg-ink-blue-4`
resolved to nothing and the Join Zoom button no longer darkened on hover.
Use the raw blue-700 palette shade (one step darker than ink-blue-3) to
restore the hover feedback.

* refactor(dashboard): drop unused legacy Input global component

The Input component is deprecated in frappe-ui v1 and was registered
globally but never used in any template. Remove its import and
registration; TextInput and FormControl remain.

* fix(dashboard): pre-bundle nested feather-icons so the dev app mounts

Excluding frappe-ui from esbuild pre-bundling (needed for its ~icons/lucide
virtuals) left its bundled CJS feather-icons without ESM interop, so the
FeatherIcon default import failed and the app never mounted (blank page).
Pre-bundle feather-icons, including frappe-ui's nested copy via the `>`
dep path, to restore the default export.

* fix(dashboard): migrate to frappe-ui v1 design tokens and fix theming

v1 renamed the design tokens (surface-white -> surface-base, expanded the
ink accent scales, merged text size+weight into single classes). The old
class names resolved to undefined CSS variables under v1, so text and
surface colors rendered blank. Run the official tokens-v2 codemod across
the dashboard to adopt the new names.

Also give the app Layout a theme-aware background (bg-surface-base) and
base text color. Previously the root had no background, so with the
default dark theme the light ink text sat on an unstyled white page and
was invisible. Both light and dark themes now render coherently.

* refactor(dashboard): migrate proposal editor to frappe-ui v1 Editor

Replace the deprecated TextEditor with the headless Editor from
frappe-ui/editor, composed with EditorFixedMenu and EditorContent. The
kit runs without the media extensions since proposals have no upload
handler wired.

Pin the ProseMirror packages via resolutions: the tree carried both a
stale hoisted copy and the one tiptap resolves, which bundled the editor
stack twice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* build(dashboard): upgrade to Vite 8 and drop dead auto-import dep

Vite 8 replaces esbuild with rolldown for bundling. @vitejs/plugin-vue 6
is the first release listing Vite 8 in its peer range. vue-tsc moves with
it; nothing else is Vite-coupled.

Drop unplugin-auto-import: it was never wired into vite.config.js, and
pinning it at the root only forced frappe-ui to nest the 19.x its
lucideIcons plugin actually imports.

frappe-ui stays out of pre-bundling, but for a new reason — rolldown
resolves the extensionless `#molecules/*` specifiers esbuild could not,
so the note about esbuild no longer applies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: change green shade for better visiblity

* test(e2e): drive proposal category through the listbox

frappe-ui v1 renders a select as a combobox button that opens a listbox
instead of a native `select`, so the old locator matched nothing and
`selectOption` had nothing to act on. Pick the option by clicking it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(dashboard): inline add-on dialog props and drop e2e regex matcher

The add-on dialog was the only one still passing its title and size
through a `v-bind` object; inline them like the other dialogs, and
translate the title while it moves.

Building the combobox matcher with `new RegExp(label)` broke on any
label containing regex metacharacters. A plain string already matches
case-insensitively on a substring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* style(dashboard): bump success green to ink-green-6 for readability

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit feafea0)
@harshtandiya harshtandiya changed the title [Backport main] feat!: Migrate dashboard to frappe-ui v1 (and Vite 8) feat!: Migrate dashboard to frappe-ui v1 (and Vite 8) Jul 23, 2026
@harshtandiya
harshtandiya added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 926f4ff Jul 23, 2026
7 of 8 checks passed
@harshtandiya
harshtandiya deleted the backport-272-to-main branch July 23, 2026 20:10
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