Skip to content

Upgrading to frappe-ui 1.0.0 #376

Description

@netchampfaris

frappe-ui is heading to a 1.0.0 tag. The breaking changes land as separate PRs. This issue is the single place that tracks all of them for Pilot.

  • Work top to bottom. Each section names the exact sites in this repo, with before/after.
  • More sections get appended as more breaks land before the tag.
  • Do not start until you bump the frappe-ui pin. Today it is 1.0.0-beta.34 in admin/frontend/dashboard/package.json.
  • Full list of changes: migration guide.
# Change PR Fails at build?
1 Alert redesigned: theme="yellow" and variant removed, slots renamed (7 sites) frappe/frappe-ui#1005 No — silent

1. Alert

PR: frappe/frappe-ui#1005

Alert was redesigned. Breaking changes:

  • theme="yellow" is removed — use theme="amber". The default theme is now gray.
  • The variant prop is removed. A description or a second action switches the layout to a banner.
  • The unnamed v-model (visibility) is removed. Alert is stateless — render it with v-if and hide it on @dismiss.
  • dismissible now defaults to false. Add dismissible to keep the close button.
  • #icon slot → #prefix. #footer slot → primaryAction / secondaryAction props or the #actions slot. #description stays.
  • The theme shows a status icon on its own; pass :icon="false" to hide it.
  • AlertAction is ButtonProps plus onClick({ dismiss }).
<!-- Before -->
<Alert v-model="showAlert" title="Payment failed" theme="yellow">
  <template #footer>
    <Button label="Retry" @click="retry" />
  </template>
</Alert>

<!-- After -->
<Alert
  v-if="showAlert"
  title="Payment failed"
  theme="amber"
  dismissible
  :primary-action="{ label: 'Retry', onClick: retry }"
  @dismiss="showAlert = false"
/>

Pilot has 7 <Alert> sites, all in admin/frontend/dashboard/src/components. None uses variant, the unnamed v-model, or #icon, so nothing fails at build. Every site sets :dismissible="false", which is now the default — drop the prop everywhere. Every theme now auto-shows a status icon; add :icon="false" where you do not want one.

Line numbers are against develop at 04b15f5.

  • settings/Firewall.vue:6 and :30 — both use theme="yellow", which is removed. Change to theme="amber".
  • settings/Git.vue:6theme="blue". Only the icon and the dropped :dismissible="false" change.
  • settings/LLM.vue:6 — same as Git.vue.
  • settings/S3Bucket.vue:6 — same as Git.vue.
  • storage/BinlogPurgeAlert.vue:92 — the big one. No theme prop, so it moves to the new gray default; the !bg-surface-blue-1 class override targets the old DOM and needs a re-check. The #footer slot at :104 wraps a Button — move it to :primary-action="{ label: 'Purge binary logs', onClick: openDialog }" or the #actions slot.
  • tasks/TaskDebugDialog.vue:8theme="red". Gets an error icon; it sits inside a dialog, so check the layout or pass :icon="false".

Full before/after: migration guide.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions