Skip to content

Commit

Permalink
fix: issue VirtusLab-Open-Source#199 - undeclared codemirror dependen…
Browse files Browse the repository at this point in the history
…cy causes build crash
  • Loading branch information
cyp3rius committed Mar 17, 2023
1 parent 70dd408 commit ccc1f98
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 40 deletions.
6 changes: 3 additions & 3 deletions admin/src/components/Nav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
SubNavSections,
SubNavLink,
} from "@strapi/design-system/SubNav";
import { apps } from "../icons";
import { discuss, thumbDown } from "../icons";
import getMessage from "../../utils/getMessage";

// import PropTypes from 'prop-types';
Expand All @@ -39,13 +39,13 @@ const Nav = ({ visible = false, hasNewComments, hasNewReports }) => {
{getMessage("nav.item.updates")}
</SubNavLink> */}
<SubNavSection label={getMessage('nav.header.moderation')}>
<SubNavLink to={getUrl('discover')} icon={apps}>
<SubNavLink to={getUrl('discover')} icon={discuss}>
{getMessage('nav.item.discover')}
</SubNavLink>
<SubNavLink
to={getUrl('reports')}
withBullet={hasNewReports}
icon={apps}>
icon={thumbDown}>
{getMessage('nav.item.reports')}
</SubNavLink>
</SubNavSection>
Expand Down
4 changes: 2 additions & 2 deletions admin/src/components/Wysiwyg/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import React, { useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import { isString } from 'lodash';
import CodeMirror from 'codemirror';
import 'codemirror/addon/display/placeholder';
import CodeMirror from 'codemirror5';
import 'codemirror5/addon/display/placeholder';
import PreviewWysiwyg from '../PreviewWysiwyg';
import { EditorStylesContainer } from './EditorStylesContainer';
import { EditorAndPreviewWrapper } from './WysiwygStyles';
Expand Down
2 changes: 1 addition & 1 deletion admin/src/components/Wysiwyg/utils/continueList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// @ts-nocheck

import CodeMirror from 'codemirror';
import CodeMirror from 'codemirror5';

// Disabling eslint on purpose
/* eslint-disable */
Expand Down
16 changes: 10 additions & 6 deletions admin/src/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ import {
check,
comments,
cross,
discuss,
emptyPictures,
exclamationMarkCircle,
eye,
filter,
illo,
information,
lock,
pencil,
play,
plus,
refresh,
review,
unlock,
thumbDown,
trash,
pencil,
plus
unlock
} from "./strapiIcons";

export {
Expand All @@ -32,18 +34,20 @@ export {
check,
comments,
cross,
discuss,
emptyPictures,
exclamationMarkCircle,
eye,
filter,
illo,
information,
lock,
pencil,
play,
plus,
refresh,
review,
unlock,
thumbDown,
trash,
pencil,
plus
unlock
};
4 changes: 4 additions & 0 deletions admin/src/components/icons/strapiIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CarretDown,
Check,
Cross,
Discuss,
EmptyPictures,
ExclamationMarkCircle,
Eye,
Expand All @@ -18,6 +19,7 @@ import {
Play,
Refresh,
Trash,
ThumbDown,
Pencil,
Plus,
Shield
Expand All @@ -34,6 +36,7 @@ export const arrowUp = <ArrowUp />;
export const carretDown = <CarretDown />;
export const check = <Check />;
export const cross = <Cross />;
export const discuss = <Discuss />;
export const emptyPictures = <EmptyPictures width="10rem" />;
export const exclamationMarkCircle = <ExclamationMarkCircle />;
export const eye = <Eye />;
Expand All @@ -50,4 +53,5 @@ export const trash = <Trash />;
export const pencil = <Pencil />;
export const plus = <Plus />;
export const shield = <Shield />;
export const thumbDown = <ThumbDown />;

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-plugin-comments",
"version": "2.2.8",
"version": "2.2.9",
"description": "Strapi - Comments plugin",
"strapi": {
"name": "comments",
Expand All @@ -27,18 +27,19 @@
"url": "https://github.com/VirtusLab-Open-Source/strapi-plugin-comments"
},
"dependencies": {
"@strapi/plugin-graphql": "^4.7.1",
"@strapi/utils": "^4.7.1",
"@strapi/plugin-graphql": "^4.8.2",
"@strapi/utils": "^4.8.2",
"@types/axios": "^0.14.0",
"@types/react-intl": "^3.0.0",
"@types/react-query": "^1.2.9",
"@types/styled-components": "^5.1.26",
"bad-words": "^3.0.4",
"styled-components": "^5.3.8",
"match-sorter": "^4.0.2"
"match-sorter": "^4.0.2",
"codemirror5": "npm:codemirror@^5.65.11"
},
"devDependencies": {
"@strapi/helper-plugin": "^4.7.1",
"@strapi/helper-plugin": "^4.8.2",
"@types/bad-words": "^3.0.1",
"@types/jest": "^29.4.0",
"codecov": "^3.7.2",
Expand Down
Loading

0 comments on commit ccc1f98

Please sign in to comment.