Skip to content

[3.21] Upgrade macaw-ui-next and fix EditorJS list conversion#5927

Merged
kzuraw merged 2 commits into3.21from
eng-807-editorjs-improv-321-fix
Oct 2, 2025
Merged

[3.21] Upgrade macaw-ui-next and fix EditorJS list conversion#5927
kzuraw merged 2 commits into3.21from
eng-807-editorjs-improv-321-fix

Conversation

@kzuraw
Copy link
Contributor

@kzuraw kzuraw commented Oct 2, 2025

Summary

  • Upgraded @saleor/macaw-ui-next from 1.1.19 to 1.3.5 to fix EditorJS issues
  • Added lucide-react dependency (required by macaw-ui-next upgrade)
  • Fixed ordered and unordered lists in product/category descriptions
  • Moved list block conversion to save() method in ReactEditorJS for better architecture
  • Implemented dangerouslyLowLevelInstance in ClientEditorCore (EditorCore interface requirement)
  • Added @ts-expect-error comment in FilterPresetItem to handle icon color prop type issue with upgraded macaw-ui-next

Changes

  • package.json: Upgraded @saleor/macaw-ui-next to 1.3.5
  • ReactEditorJS.tsx: Moved convertEditorJSListBlocks to save() method, added dangerouslyLowLevelInstance
  • RichTextEditor.tsx: Removed redundant list conversion call
  • useRichText.ts: Removed redundant list conversion call
  • FilterPresetItem.tsx: Added @ts-expect-error for icon color prop (matching main branch)

This ensures list block conversion happens once at the save level rather than multiple times in consuming components, fixing issues with lists in descriptions.

Test plan

  • Test creating/editing products with ordered lists in descriptions
  • Test creating/editing products with unordered lists in descriptions
  • Test creating/editing categories with lists in descriptions
  • Verify inline formatting toolbar is not cut off on smaller screens
  • Verify all existing rich text editor functionality still works

🤖 Generated with Claude Code

- Upgrade @saleor/macaw-ui-next from 1.1.19 to 1.3.5
- Add lucide-react dependency (required by macaw-ui-next)
- Move convertEditorJSListBlocks call to save() method in ReactEditorJS
- Simplify RichTextEditor and useRichText by removing redundant list conversion
- Implement dangerouslyLowLevelInstance in ClientEditorCore (EditorCore interface requirement)

This ensures list block conversion happens once at the save level rather than multiple times in consuming components.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kzuraw kzuraw requested a review from a team as a code owner October 2, 2025 08:32
@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2025

⚠️ No Changeset found

Latest commit: af5277e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
saleor-dashboard-storybook Ignored Ignored Preview Oct 2, 2025 8:40am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the macaw-ui-next library from version 1.1.19 to 1.3.5 and refactors EditorJS list conversion logic to fix issues with ordered and unordered lists in product/category descriptions.

  • Moved list block conversion from multiple locations to a centralized save() method in ReactEditorJS
  • Added required interface implementation for dangerouslyLowLevelInstance in ClientEditorCore
  • Added @ts-expect-error comment to handle type issue with upgraded macaw-ui-next icon color prop

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Upgraded @saleor/macaw-ui-next from 1.1.19 to 1.3.5
ReactEditorJS.tsx Centralized list conversion in save() method and implemented dangerouslyLowLevelInstance
RichTextEditor.tsx Removed redundant list conversion call from onChange handler
useRichText.ts Removed redundant list conversion call from save function
FilterPresetItem.tsx Added @ts-expect-error comment for icon color prop type issue

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kzuraw kzuraw added the skip changeset Use if your changes doesn't need entry in changelog label Oct 2, 2025
@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.17%. Comparing base (bf70951) to head (af5277e).
⚠️ Report is 1 commits behind head on 3.21.

Files with missing lines Patch % Lines
src/components/RichTextEditor/ReactEditorJS.tsx 25.00% 3 Missing ⚠️
src/components/RichTextEditor/RichTextEditor.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             3.21    #5927      +/-   ##
==========================================
- Coverage   65.17%   65.17%   -0.01%     
==========================================
  Files        1446     1446              
  Lines       25065    25065              
  Branches     5112     5112              
==========================================
- Hits        16337    16335       -2     
- Misses       8684     8686       +2     
  Partials       44       44              

☔ View full report in Codecov by Sentry.
📢 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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

Differences Found

⚠️ 1 packages or licenses were added.

Expand
License	Package
ISC	lucide-react

Summary

Expand
License Name Package Count Packages
0BSD 1
Packages
  • tslib
BlueOak-1.0.0 1
Packages
  • path-scurry
CC0-1.0 1
Packages
  • type-fest
MIT/X11 1
Packages
  • nub
MPL-1.1 1
Packages
  • harmony-reflect
MPL-2.0 1
Packages
  • dompurify
Public Domain 1
Packages
  • jsonify
Python-2.0 1
Packages
  • argparse
WTFPL 1
Packages
  • opener
<<missing>> 2
Packages
  • busboy
  • streamsearch
CC-BY-4.0 2
Packages
  • @saleor/macaw-ui
  • caniuse-lite
BSD-2-Clause 24
Packages
  • @typescript-eslint/parser
  • @typescript-eslint/typescript-estree
  • browser-process-hrtime
  • css-select
  • css-what
  • domelementtype
  • domhandler
  • domutils
  • dotenv
  • dotenv-expand
  • entities
  • escodegen
  • eslint-scope
  • espree
  • esprima
  • esrecurse
  • estraverse
  • esutils
  • nth-check
  • stringify-object
  • And 4 more...
Apache-2.0 45
Packages
  • @ampproject/remapping
  • @editorjs/editorjs
  • @humanwhocodes/config-array
  • @humanwhocodes/module-importer
  • @opentelemetry/api
  • @opentelemetry/semantic-conventions
  • @playwright/test
  • @swc/core
  • @swc/core-darwin-arm64
  • @swc/core-darwin-x64
  • @swc/core-linux-arm-gnueabihf
  • @swc/core-linux-arm64-gnu
  • @swc/core-linux-arm64-musl
  • @swc/core-linux-x64-gnu
  • @swc/core-linux-x64-musl
  • @swc/core-win32-arm64-msvc
  • @swc/core-win32-ia32-msvc
  • @swc/core-win32-x64-msvc
  • @swc/counter
  • @swc/types
  • And 25 more...
BSD-3-Clause 47
Packages
  • @humanwhocodes/object-schema
  • @saleor/app-sdk
  • @sentry/cli
  • @sentry/cli-darwin
  • @sentry/cli-linux-arm
  • @sentry/cli-linux-arm64
  • @sentry/cli-linux-i686
  • @sentry/cli-linux-x64
  • @sentry/cli-win32-i686
  • @sentry/cli-win32-x64
  • @sinonjs/commons
  • @sinonjs/fake-timers
  • abab
  • asn1js
  • babel-plugin-istanbul
  • charenc
  • chroma-js
  • crypt
  • diff
  • esquery
  • And 27 more...
ISC 49
Packages
  • @istanbuljs/load-nyc-config
  • anymatch
  • boolbase
  • browser-stdout
  • cli-width
  • cliui
  • electron-to-chromium
  • fastq
  • flatted
  • fs.realpath
  • get-caller-file
  • get-own-enumerable-property-symbols
  • glob
  • glob-parent
  • graceful-fs
  • inflight
  • inherits
  • ini
  • isexe
  • json-stringify-safe
  • And 29 more...
MIT 1146
Packages
  • @adobe/css-tools
  • @apollo/client
  • @ardatan/relay-compiler
  • @ardatan/sync-fetch
  • @babel/code-frame
  • @babel/compat-data
  • @babel/core
  • @babel/generator
  • @babel/helper-annotate-as-pure
  • @babel/helper-compilation-targets
  • @babel/helper-create-class-features-plugin
  • @babel/helper-member-expression-to-functions
  • @babel/helper-module-imports
  • @babel/helper-module-transforms
  • @babel/helper-optimise-call-expression
  • @babel/helper-plugin-utils
  • @babel/helper-replace-supers
  • @babel/helper-simple-access
  • @babel/helper-skip-transparent-expression-wrappers
  • @babel/helper-string-parser
  • And 1126 more...

Explains why this property is required by EditorCore interface
and why it returns null (encapsulation and preventing unsafe access).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kzuraw kzuraw merged commit fd5363b into 3.21 Oct 2, 2025
22 of 24 checks passed
@kzuraw kzuraw deleted the eng-807-editorjs-improv-321-fix branch October 2, 2025 12:18
@kzuraw kzuraw mentioned this pull request Oct 2, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset Use if your changes doesn't need entry in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants