-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update list package #3
base: master
Are you sure you want to change the base?
Conversation
Both ordered and unordered lists were creating an <ul> tag, this PR fixes it
Create the correct element for ordered lists
Used actions `codex-team/action-nodejs-package-info` and `codex-team/action-codexbot-notify` instead
Remove bundle from repo
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <[email protected]>
Fix focus to next block Thanks, @hata6502
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.4) Signed-off-by: dependabot[bot] <[email protected]>
Bump ini from 1.3.5 to 1.3.7
…c-6.5.4 Bump elliptic from 6.5.2 to 6.5.4
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/npm/ssri/releases) - [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md) - [Commits](npm/ssri@v6.0.1...v6.0.2) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.21) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.12.0 to 4.16.6. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](browserslist/browserslist@4.12.0...4.16.6) Signed-off-by: dependabot[bot] <[email protected]>
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…rse-1.0.7 Bump path-parse from 1.0.6 to 1.0.7
…4.17.21 Bump lodash from 4.17.15 to 4.17.21
Bump y18n from 4.0.0 to 4.0.1
Bump ssri from 6.0.1 to 6.0.2
…slist-4.16.6 Bump browserslist from 4.12.0 to 4.16.6
Add config for default list style
Update tunes config and icons
Migrate to vite
…rkflow Update npm-publish.yml
jsdoc types processing added, refs #88.
WalkthroughThe changes indicate the deprecation of the repository, with a new warning section added to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
dist/bundle.js
is excluded by!**/dist/**
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (9)
- .github/workflows/npm-publish.yml (1 hunks)
- .gitignore (1 hunks)
- .npmignore (1 hunks)
- README.md (3 hunks)
- package.json (1 hunks)
- postcss.config.js (1 hunks)
- src/index.js (10 hunks)
- tsconfig.json (1 hunks)
- vite.config.js (1 hunks)
Files skipped from review due to trivial changes (2)
- .gitignore
- tsconfig.json
Additional context used
LanguageTool
README.md
[grammar] ~52-~52: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...--------- | | defaultStyle |string
| type of a list:ordered
orunordered
, default...(KIND_OF_A)
[grammar] ~64-~64: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...-------------- | | style |string
| type of a list:ordered
orunordered
| | item...(KIND_OF_A)
Additional comments not posted (26)
.npmignore (1)
4-5
: LGTM!Adding
vite.config.js
andpostcss.config.js
to the.npmignore
file is appropriate to exclude unnecessary build configuration files from the package distribution.postcss.config.js (1)
1-6
: LGTM!The PostCSS configuration correctly sets up the
postcss-nested-ancestors
andpostcss-nested
plugins..github/workflows/npm-publish.yml (1)
9-13
: LGTM!Consolidating the workflow into a single job and using a reusable workflow enhances maintainability and clarity by reducing redundancy.
vite.config.js (3)
1-4
: LGTM!The imports for Vite configuration are appropriate.
6-7
: LGTM!The environment variables are set correctly.
9-24
: LGTM!The Vite configuration is well-structured and includes necessary build settings and plugins.
package.json (6)
3-3
: LGTM!The version update reflects the significant changes made to the package.
13-15
: LGTM!Including the
dist
directory in thefiles
array ensures that the build artifacts are packaged.
16-18
: LGTM!The updates to the
main
,module
, andtypes
fields ensure correct module resolution for different environments.
19-25
: LGTM!The
exports
field defines how the package can be imported in different environments, improving module compatibility.
27-28
: LGTM!The build scripts have been updated to use Vite, reflecting a modernization of the build process.
37-43
: LGTM!The updates to dependencies and devDependencies are appropriate for the new build process.
README.md (5)
12-12
: LGTM!The update to use Yarn streamlines the installation process.
20-20
: LGTM!The update to use double quotes standardizes the formatting.
40-42
: LGTM!The addition of
defaultStyle
enhances the tool's functionality by allowing customization of the list type.
50-52
: LGTM!The config params table provides a clear overview of the configuration parameters.
Tools
LanguageTool
[grammar] ~52-~52: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...--------- | | defaultStyle |string
| type of a list:ordered
orunordered
, default...(KIND_OF_A)
62-65
: LGTM!The reformatting of the output data section improves the clarity of the information presented.
Tools
LanguageTool
[grammar] ~64-~64: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...-------------- | | style |string
| type of a list:ordered
orunordered
| | item...(KIND_OF_A)
src/index.js (9)
8-10
: Typedef forPasteEvent
is correct.The typedef for
PasteEvent
from@editorjs/editorjs
is correct and improves type safety.
19-21
: Typedef forListConfig
is correct.The typedef for
ListConfig
is correctly defined and improves type safety and clarity.
27-27
: Export statement updated to ES module syntax.The export statement has been correctly updated to ES module syntax, enhancing compatibility with modern JavaScript tooling.
56-58
: Toolbox method updated to use imported icons.The
toolbox
method correctly uses the importedIconListBulleted
for the icon property.
86-94
: Constructor method updated with new settings.The
settings
array in the constructor method has been correctly updated to use the imported icons and new labels. The default values are set based on theconfig.defaultStyle
.
207-215
: RenderSettings method updated to return an array.The
renderSettings
method now returns an array of settings objects, each containing properties for active state and activation behavior. This change improves the separation of concerns by decoupling the settings logic from the UI rendering.
240-253
: New methodmakeMainTag
introduced.The
makeMainTag
method dynamically generates either an ordered or unordered list based on the current style. This encapsulates the logic for element creation and ensures that the wrapper element is replaced correctly.
261-268
: ToggleTune method updated to usemakeMainTag
.The
toggleTune
method has been updated to utilize the newmakeMainTag
method for creating the main list element. This improves code organization and maintainability.
4-7
: Ensure the imported icons are used appropriately.The import statements for
IconListBulleted
andIconListNumbered
from@codexteam/icons
are correct. Ensure these icons are used in the code as intended.Verification successful
The imported icons are used appropriately in the code.
The import statements for
IconListBulleted
andIconListNumbered
from@codexteam/icons
are correctly utilized in the code.
IconListBulleted
is used on lines whereicon: IconListBulleted
is present.IconListNumbered
is used on lines whereicon: IconListNumbered
is present.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of imported icons. # Test: Search for the usage of imported icons. Expect: Usage of IconListBulleted and IconListNumbered in the code. rg --type js 'IconListBulleted|IconListNumbered'Length of output: 266
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (5)
README.md (5)
5-7
: Consider enhancing the deprecation notice with additional details.While the warning is clear, it would be helpful to provide:
- The timeline for deprecation
- Whether this version will continue receiving critical updates
- Any breaking changes in the new repository
25-25
: Add a code example for CDN usage.Consider adding a direct script tag example for CDN usage to make it easier for users:
-Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/list@latest) +Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/list@latest): + +```html +<script src="https://cdn.jsdelivr.net/npm/@editorjs/list@latest"></script> +```
52-54
: Fix grammar in parameter description.Update the description to improve clarity:
-| defaultStyle | `string` | type of a list: `ordered` or `unordered`, default is `ordered` | +| defaultStyle | `string` | type of list: `ordered` or `unordered`, default is `ordered` |🧰 Tools
🪛 LanguageTool
[grammar] ~54-~54: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...--------- | | defaultStyle |string
| type of a list:ordered
orunordered
, default...(KIND_OF_A)
64-67
: Fix grammar in output data description.Update the description to improve clarity:
-| style | `string` | type of a list: `ordered` or `unordered` | +| style | `string` | type of list: `ordered` or `unordered` |🧰 Tools
🪛 LanguageTool
[grammar] ~66-~66: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...-------------- | | style |string
| type of a list:ordered
orunordered
| | item...(KIND_OF_A)
Line range hint
1-1
: Add alt text to images for accessibility.Please add descriptive alt text to all images in the documentation:
-![](https://badgen.net/badge/Editor.js/v2.0/blue) +![Editor.js v2.0 Badge](https://badgen.net/badge/Editor.js/v2.0/blue) -![](assets/example.gif) +![List Tool Usage Example](assets/example.gif) -![](https://capella.pics/bf5a42e4-1350-499d-a728-493b0fcaeda4.jpg) +![List Tool Settings Interface](https://capella.pics/bf5a42e4-1350-499d-a728-493b0fcaeda4.jpg)Also applies to: 11-11, 59-59
🧰 Tools
🪛 Markdownlint
9-9: null
Images should have alternate text (alt text)(MD045, no-alt-text)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
README.md
(3 hunks)
🧰 Additional context used
🪛 Markdownlint
README.md
9-9: null
Images should have alternate text (alt text)
(MD045, no-alt-text)
🪛 LanguageTool
README.md
[grammar] ~54-~54: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...--------- | | defaultStyle | string
| type of a list: ordered
or unordered
, default...
(KIND_OF_A)
[grammar] ~66-~66: If ‘type’ is a classification term, ‘a’ is not necessary. Use “type of”. (The phrases ‘kind of’ and ‘sort of’ are informal if they mean ‘to some extent’.)
Context: ...-------------- | | style | string
| type of a list: ordered
or unordered
| | item...
(KIND_OF_A)
config: { | ||
defaultStyle: 'unordered' | ||
} |
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.
Fix inconsistency in default style documentation.
There's a discrepancy between the usage example showing 'unordered'
as the value and the config params table indicating that 'ordered'
is the default value. Please ensure consistency across the documentation.
Summary by CodeRabbit
New Features
defaultStyle
configuration option for lists, allowing users to choose between ordered and unordered lists.Documentation
Chores