refactor: upgrade to frappe-ui 1.0.0 (beta.52) - #733
Closed
surajshetty3416 wants to merge 10 commits into
Closed
Conversation
Pin the submodule and frontend dependency to the beta.52 tag, add @framework/ui (link:../../frappe/ui) for the pieces that moved out of frappe-ui, dedupe the peer deps it resolves against, and drop the feather-icons prebundle entry that no longer exists. Co-Authored-By: Claude <noreply@anthropic.com>
frappe-ui 1.0.0 removed initSocket and the plugin no longer sets $socket; build the socket.io connection in src/socket.ts like other Frappe apps and assign it before mount. main.ts also picks up the telemetry plugin's new home in @framework/ui. Co-Authored-By: Claude <noreply@anthropic.com>
#target/#body/#body-main become #trigger/#default (with bare where the content brings its own panel), togglePopover/isOpen become toggle/open, placement splits into side/align, arrowClass becomes an offset, and the hover popover in InputLabel becomes a Tooltip #content. The trigger now wires its own click, so the old toggle handlers are dropped; editable inputs inside triggers are shielded with @click.stop. ColorPicker keeps its placement prop but exposes the v1 trigger slot to its consumers. Co-Authored-By: Claude <noreply@anthropic.com>
placement becomes align (right maps to end, left to the start default),
{ group, items } groups become { group, options }, and the trigger slot's
open is now state rather than a method, so the click handlers go away.
PageActionsDropdown forwards align instead of placement, and triggers
inside links keep .stop/.prevent so opening the menu doesn't navigate.
Co-Authored-By: Claude <noreply@anthropic.com>
TextInput/Textarea refs expose focus() directly now (ref.el is gone), FeatherIcon is replaced by a lucide span, and the hand-written frappe-ui content globs are replaced by the list frappe-ui exports, plus an extra glob for the parked experimental ListView which sits outside it. Co-Authored-By: Claude <noreply@anthropic.com>
ListView and AxisChart moved out of the frappe-ui root into the experimental barrel, and the frappe-ui/frappe subpath is gone; telemetry and TrialBanner now come from @framework/ui. Deep subpath imports are used for the latter because the root barrel doesn't compile against frappe-ui beta.52 yet (its CodeEditorField still imports the removed frappe-ui/code-editor path). Co-Authored-By: Claude <noreply@anthropic.com>
Badge/Dialog dropped orange/yellow for amber, import.meta.env needs the vite/client types, and vue-tsc now resolves frappe-ui and @framework/ui sources through explicit path mappings. Boolean tab values are cast at the TabButtons boundary; the v1 TabValue is string|number but matching is by identity so they keep working. Co-Authored-By: Claude <noreply@anthropic.com>
The toolbar refactor on develop moved the page-title popover, action tooltips, viewer avatars and read-only badge into ToolbarItems; apply the same Popover/Tooltip/Badge migration there and refresh the lockfile for the beta.52 pin. Co-Authored-By: Claude <noreply@anthropic.com>
OptionToggle and SplitModeInput serialize boolean values to strings at the TabButtons boundary and map them back on select, keeping their own boolean APIs without any-casts. The Combobox handlers narrow their unknown payloads instead of asserting. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works through everything tracked in #718 as of today, pinned to
v1.0.0-beta.52(the latest tag; all tracked PRs verified as ancestors).What's here
$socket;src/socket.tsbuilds the connection like other Frappe apps andmain.tsassigns it before mount.ColorPicker's passthrough slot (TextBlockBubbleMenu, 4×TokenManager), which break identically.#target/#body/#body-main→#trigger/#default(+barewherever the content brings its own panel — including the#body-mainsite inAIPageGeneratorModal, since the v1PopoverPanelhas visible chrome),placement→side/align,arrowClass→:offset="12",trigger="hover"inInputLabel→ v1Tooltipwith#content.ColorInput,ImageUploadInput) are shielded with@click.stop, andGradientEditor's draggable stops keep their "don't open after a drag" guard the same way.PublishButton,PropertyLabel, and the "New Script" dropdown inPageClientScriptManager.placement→align,{ group, items }→{ group, options }, and the slot'sopenis state now, so the old@click="open"handlers are gone.PageActionsDropdownforwardsalign; its triggers insiderouter-links use@click.stop.preventso opening the menu can't navigate..el.focus()sites plus two more the sweep found (VersionHistory.vue,PagePersonaSurvey.vue).uploadArgsflattened to props;:private="false"survives on both sites (verified against v1'suploadOptionsplumbing). v1 no longer exposesinputRef, soImageUploadInput's programmatic open now reaches the hidden input through$el.TrackingDisabledNotice.contentexport. Note:experimental/ListViewsits outside frappe-ui's published globs (only SpriteIcons/TextEditor/Calendar/Charts are covered), so an extra glob keeps ListView styled while we still use it.ListView(3 files) andAxisChart(1 file) now import fromfrappe-ui/experimental.@framework/ui— dep added (link:../../frappe/ui), 12 files re-pointed. These use deep subpath imports (@framework/ui/telemetry,@framework/ui/components/TrialBanner) rather than the root barrel — see below.orange/yellow(→amber), stalefrappe-ui > feather-iconsprebundle entry removed,vue/frappe-ui/@vueuse/corededuped in vite so@framework/ui's peers resolve to this app's single copies.frappe/frappe's
uipackage hasn't caught up with two frappe-ui breaks yet:CodeEditorField.vuestill importsfrappe-ui/code-editor, which was folded into the experimental barrel (refactor(charts)!: park the old Charts family in experimental frappe-ui#1043-era fold) — this makes the root barrel of@framework/uiunbuildable against beta.52, hence the deep imports.TrialBanner.vuestill imports the removedFeatherIcon. I verified the build with a two-line local patch to the frappe worktree (FeatherIcon→ lucide span); that fix needs to land in frappe/frappe before this merges.Once both are fixed upstream, the deep imports can collapse back to plain
@framework/uiroot imports.Verification
vite buildis green (in a bench-shaped worktree with frappe at develop + the TrialBanner patch above).vue-tscbaseline-diffed against develop/beta.21: 157 → 72 errors, zero new Builder-side errors (the remainder are pre-existing plus frappe-ui's own experimental-barrel noise at beta.52).