-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all icons to the @ckeditor/ckeditor5-icons
package
#17750
base: master
Are you sure you want to change the base?
Conversation
@ckeditor/ckeditor5-icons
package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few places with old paths to icons:
-
In
docs/framework/contributing/code-style.md
:import BoldIcon from '@ckeditor/ckeditor5-core/theme/icons/bold.svg';
-
In
docs/tutorials/supporting-multiple-versions.md
:import TableRowIcon from '@ckeditor/ckeditor5-table/theme/icons/table-row.svg';
-
In
docs/examples/custom/bottom-toolbar-editor.md
:import fontColorIcon from '@ckeditor/ckeditor5-font/theme/icons/font-color.svg';
In the docs/updating/update-to-40.md
guide, paths to icons have been also changed in the sections describing old updates (to v40.1.0 and to v40.2.0). The new ckeditor5-icons
package does not exist there yet.
Also, in the following files I found the webpack config test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/
that probably needs to be aligned with new changes:
docs/getting-started/advanced/integrating-from-source-webpack.md
docs/getting-started/legacy-getting-started/integrations/react.md
docs/getting-started/legacy-getting-started/integrations/vuejs-v2.md
docs/getting-started/legacy-getting-started/integrations/vuejs-v3.md
docs/getting-started/legacy-getting-started/quick-start-other.md
docs/updating/nim-migration/migration-to-new-installation-methods.md
I updated all docs except |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from 'ckeditor5'; | ||
import { EasyImage } from 'ckeditor5-premium-features'; | ||
import fontColorIcon from '@ckeditor/ckeditor5-font/theme/icons/font-color.svg'; | ||
|
||
const fontColorIcon =/* #__PURE__ */ registerIcon( 'fontColor', IconFontColor ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registerIcon()
is not available here yet.
@@ -93,7 +93,7 @@ module.exports = { | |||
module: { | |||
rules: [ | |||
{ | |||
test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/, | |||
test: /ckeditor5-icons\/theme\/icons\/[^/\\]+\.svg$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there are more problems with this regexp than expected 🥹
Previous regexp with [^/\\]
is invalid - unescaped /
delimiter.
Current regexp also contains the same invalid [^/\\]
fragment.
Also, for some reasons we were defining these regexps with both \
and /
path separators. Not sure if we can just support unix-style /
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous regexp with
[^/\\]
is invalid - unescaped/
delimiter.
Not true, sorry. My mistake, because when testing this regexp I chose PCRE2, not JS flavor. The regexp fragment [^/\\]
is valid in JS.
So question is only whether we want to use only unix-style /
path separator.
@@ -170,7 +170,7 @@ module.exports = { | |||
use: [ 'ts-loader' ] | |||
}, | |||
{ | |||
test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/, | |||
test: /cckeditor5-icons\/theme\/icons\/[^/\\]+\.svg$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cckeditor5
Suggested merge commit message (convention)
Feature: Move all icons to the
@ckeditor/ckeditor5-icons
package. Related to #16546.Feature: Add
@ckeditor/ckeditor5-icons
package to the core DLL package.MINOR BREAKING CHANGE: Move all icons to the
@ckeditor/ckeditor5-icons
package.MINOR BREAKING CHANGE (icons): Rename all icon file names to
kebab-case
.Rename the following files:
arrow-down.svg
tochevron-down.svg
(used inrevision-history
, to avoid conflict with the file of the same name frompagination
).arrow-up.svg
tochevron-up.svg
(used inrevision-history
, to avoid conflict with the file of the same name frompagination
).bookmark_inline.svg
tobookmark-inline.svg
bulletedlist.svg
tobulleted-list.svg
codeblock.svg
tocode-block.svg
contentunlock.svg
tocontent-unlock.svg
exportpdf.svg
toexport-pdf.svg
exportword.svg
toexport-word.svg
horizontalline.svg
tohorizontal-line.svg
importexport.svg
toimport-export.svg
importword.svg
toimport-word.svg
liststylecircle.svg
tolist-style-circle.svg
liststyledecimalleadingzero.svg
tolist-style-decimal-leading-zero.svg
liststyledecimal.svg
tolist-style-decimal.svg
liststyledisc.svg
tolist-style-disc.svg
liststylelowerlatin.svg
tolist-style-lower-latin.svg
liststylelowerroman.svg
tolist-style-lower-roman.svg
liststylesquare.svg
tolist-style-square.svg
liststyleupperlatin.svg
tolist-style-upper-latin.svg
liststyleupperroman.svg
tolist-style-upper-roman.svg
numberedlist.svg
tonumbered-list.svg
pagebreak.svg
topage-break.svg
specialcharacters.svg
tospecial-characters.svg
todolist.svg
totodo-list.svg
Additional information
Follow-up issue: #17755