ef2-digital / strapi-plugin-bold-title-editor

7 stars 2 forks source link

Strapi V5 errors #10

Open SvenWesterlaken opened 1 week ago

SvenWesterlaken commented 1 week ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @ef2/strapi-plugin-bold-title-editor@1.0.9 for the project I'm working on.

I just updated my strapi setup to v5 and unfortunately ran into issues running this plugin. Manage to trace the main ones down to be due the restructuring of the export of the design-system package of strapi.

Here is the diff that solved my problem:

diff --git a/node_modules/@ef2/strapi-plugin-bold-title-editor/admin/src/components/Input.jsx b/node_modules/@ef2/strapi-plugin-bold-title-editor/admin/src/components/Input.jsx
index 2e2e999..c7fd87f 100644
--- a/node_modules/@ef2/strapi-plugin-bold-title-editor/admin/src/components/Input.jsx
+++ b/node_modules/@ef2/strapi-plugin-bold-title-editor/admin/src/components/Input.jsx
@@ -1,11 +1,8 @@
 import React, { useState, useRef } from 'react';
 import styled from 'styled-components';
 import ReactContentEditable from 'react-contenteditable';
-import { inputFocusStyle } from '@strapi/design-system';
-import { IconButton } from '@strapi/design-system/IconButton';
-import { Stack } from '@strapi/design-system/Stack';
+import { inputFocusStyle, IconButton, Stack, Field, FieldHint, FieldError, FieldLabel } from '@strapi/design-system';
 import { useIntl } from 'react-intl';
-import { Field, FieldHint, FieldError, FieldLabel } from '@strapi/design-system/Field';
 import FormatClear from '../icons/FormatClear';
 import Bold from '../icons/Bold';
 import Code from '../icons/Code';

This issue body was partially generated by patch-package.

SvenWesterlaken commented 10 hours ago

I Found some more errors and fixed them locally. It looks like I got a solid version for Strapi v5. Will see if I can find some time to open up a fork and PR for the fixes.