Skip to content

fix: clear editor console warnings and errors - #810

Merged
surajshetty3416 merged 9 commits into
frappe:developfrom
surajshetty3416:fix-editor-console-noise
Sep 9, 2026
Merged

fix: clear editor console warnings and errors#810
surajshetty3416 merged 9 commits into
frappe:developfrom
surajshetty3416:fix-editor-console-noise

Conversation

@surajshetty3416

@surajshetty3416 surajshetty3416 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Opening any page in the editor logged 8 errors and ~200 warnings, all from the editor itself. After this, the console is clean.

  • Registry components made reactive: createRegistry keeps items in a reactive Map, so the components they carry (tab panels, property controls, icons) were proxied. Component-valued fields are now marked raw at registration.
  • Component prop controls: the component-props section now passes propertyKey, BasePropertyControl and OptionToggle accept boolean defaults, and number defaults are stringified for the placeholder.
  • Font CORS errors: the font loader requested every Font token family from Google Fonts, system and custom ones included. It now consults the bundled catalog first; User Fonts still load through their own path.
  • BorderRadiusHandler renders a fragment, so data-block-id now goes to the handle explicitly.
  • frappe-ui Popover deprecations: twelve call sites moved from #target/#body and placement to #trigger/#default with bare, side and align; the label description tooltip moved to Tooltip. The v1 trigger toggles on any click inside it, so popovers anchored to a whole property row (color picker, background, shadow, image) go through useAnchoredPopover: controlled open where the row decides, dismissals still close. Gradient stop pickers are controlled too, so the click that ends a drag no longer opens one.

Also on the way: the color picker anchor keeps its full width, component prop rows use the panel width, the array and object editors are labelled "Items", and every chat panel control uses the same tooltip.

surajshetty3416 and others added 5 commits September 9, 2026 12:37
Registry items live in a reactive Map, so the component objects they carry (a
tab's panel, a property control, an icon) were proxied and Vue warned on every
render. Mark component-valued fields raw at registration, including the
controls inside a section's properties list.

Co-Authored-By: Claude <noreply@anthropic.com>
The component-props section built BasePropertyControl props without the
required propertyKey, passed real booleans where the control typed
string | number, and handed number defaults to a string placeholder.

Co-Authored-By: Claude <noreply@anthropic.com>
A system font or an unregistered custom family produced a stylesheet request
that ended in a CORS error on every editor page. Consult the bundled catalog
first and skip families it does not carry; User Fonts still load through
their own path.

Co-Authored-By: Claude <noreply@anthropic.com>
The handler renders a fragment (tooltip plus handle), so the data-block-id the
block editor passes had nowhere to go and Vue warned on every update.

Co-Authored-By: Claude <noreply@anthropic.com>
Twelve Popover call sites used the deprecated #target and #body slots and the
placement prop; the label description tooltip used trigger="hover". Move
them to #trigger and #default with bare, side and align, and Tooltip.

The v1 trigger toggles on any click inside it, which for a popover anchored to
a whole property row means focusing the input opens and closes the panel.
Row-anchored popovers (color picker, background, shadow, image) now run through
useAnchoredPopover: controlled open where the row decides when it opens and
the trigger's own toggle is ignored, while outside clicks and Escape still
dismiss. Gradient stop pickers are controlled too, so the click that ends a
drag no longer opens one.

Co-Authored-By: Claude <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with no accepted new findings.

Comment thread frontend/src/utils/useAnchoredPopover.ts
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.86%. Comparing base (b4782eb) to head (b51cc29).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #810   +/-   ##
========================================
  Coverage    66.86%   66.86%           
========================================
  Files           94       94           
  Lines        10496    10496           
========================================
  Hits          7018     7018           
  Misses        3478     3478           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

surajshetty3416 and others added 4 commits September 9, 2026 13:26
The v1 trigger wrapper was a flex container, so the control row inside it
shrank to its content and Text Color, Border Color and colour props rendered
narrower than their neighbours. The old anchor forced block; do the same.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
The label column was capped at 60% and the default value at 96px, so long
labels wrapped early and the value line was cut after a few characters with
most of the row empty. The row now fills the width; the value line truncates
across all of it. Array and object defaults are shown as compact JSON: the
type check read a field that does not exist.

Co-Authored-By: Claude <noreply@anthropic.com>
Six controls used the browser's native title tooltip while their neighbours
used Tooltip. Buttons take the tooltip prop, which keeps the chat-history
Button as the Dropdown's own as-child trigger; plain buttons get a Tooltip
wrapper.

Co-Authored-By: Claude <noreply@anthropic.com>
@surajshetty3416
surajshetty3416 force-pushed the fix-editor-console-noise branch from fe4ab25 to b51cc29 Compare September 9, 2026 07:56
@surajshetty3416
surajshetty3416 merged commit 7d1ac04 into frappe:develop Sep 9, 2026
11 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