Skip to content

Commit

Permalink
Merge fff3a47 into 552a52f
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRodriguezS committed Apr 22, 2024
2 parents 552a52f + fff3a47 commit a2bfd23
Show file tree
Hide file tree
Showing 12 changed files with 2,512 additions and 2,579 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
coveralls.io:443
github.com:443
registry.yarnpkg.com:443
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
coveralls.io:443
github.com:443
registry.yarnpkg.com:443
objects.githubusercontent.com:443
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16.x
- run: yarn
- run: yarn test --coverage
- name: Coveralls
uses: coverallsapp/github-action@3284643be2c47fb6432518ecec17f1255e8a06a6 # master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: yarn
- run: yarn test --coverage
- name: Coveralls
uses: coverallsapp/github-action@c203f016dd0ff7855ebef0ed852000c20c117148 # master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 8 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,22 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
*.github.com:443
github.com:443
*.githubapp.com:443
*.githubusercontent.com:443
- name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
uses: github/codeql-action/init@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -67,7 +69,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
uses: github/codeql-action/autobuild@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -80,6 +82,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
uses: github/codeql-action/analyze@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
Expand All @@ -19,9 +19,9 @@ jobs:
registry.npmjs.org:443
registry.yarnpkg.com:443
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
Expand All @@ -37,12 +37,12 @@ jobs:
sigstore-tuf-root.storage.googleapis.com:443
- name: "Checkout code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -61,14 +61,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
uses: github/codeql-action/upload-sarif@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
with:
sarif_file: results.sarif
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.1.14 (22.04.2024)

* Update all dependencies. See [PR #131](https://github.com/kommitters/editorjs-drag-drop/pull/131)
* Solve indicator border error. See [Issue #134](https://github.com/kommitters/editorjs-drag-drop/issues/134)
* Update the CONTRIBUTING.md with the stale issues policy. See [PR #136](https://github.com/kommitters/editorjs-drag-drop/pull/136)

## 1.1.13 (13.01.2023)

* Update all dependencies.
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ At this point, you're waiting on us. We like to at least comment on pull request
business days (typically, one business day). We may suggest some changes, improvements or
alternatives.

# Stale issues

To ensure that our issue tracker remains organized and relevant, we have implemented a policy for handling Stale issues. Please review the following guidelines:

1. **Marking as Stale**: Issues will be automatically marked as **Stale** after 60 days of inactivity.
2. **Closing Stale Issues**: After an issue has been marked as Stale, a comment will be posted on the issue indicating that it will be closed if there is no further activity or information provided within a specified period.

Thank you for helping us maintain a clean and efficient issue tracker!

## Additional resources

* [EditorJS](https://editorjs.io/)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ const editor = new EditorJS({
});
```

Select the block, drag the toolbar settings button and drop it at the desired position.
Select the block, drag the toolbar settings button, and drop it at the desired position.

You can optionally provide a second parameter to customize the indicator border style. If no parameter is provided, the default border style `1px dashed #aaa` is used.

If you're already using [editorjs-undo](https://github.com/kommitters/editorjs-undo), then your code will look somewhat like this:

Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "editorjs-drag-drop",
"version": "1.1.13",
"version": "1.1.14",
"keywords": [
"drag",
"drop",
Expand All @@ -23,21 +23,21 @@
"email": "oss@kommit.co"
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/core": "^7.17.8",
"@babel/preset-env": "^7.10.1",
"babel-jest": "^29.0.0",
"babel-loader": "^9.0.0",
"css-loader": "^6.5.1",
"css-loader": "^7.0.0",
"eslint": "^8.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jest": "^27.0.0",
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.3.1",
"nock": "^13.0.0",
"style-loader": "^3.0.0",
"style-loader": "^3.3.0",
"svg-inline-loader": "^0.8.2",
"webpack": "^5.52.0",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

.ce-block--drop-target .ce-block__content:after {
background: none;
}
}
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export default class DragDrop {
* @param editor: object
* editor — Editor.js instance object
*/
constructor({ configuration, blocks, toolbar, save }, borderStyle) {
constructor({
configuration,
blocks,
toolbar,
save,
}, borderStyle) {
this.toolbar = toolbar;
this.borderStyle = borderStyle || '1px dashed #aaa';
this.api = blocks;
Expand Down Expand Up @@ -82,7 +87,7 @@ export default class DragDrop {
blockContent.style.removeProperty('border-bottom');
} else {
const index = Object.keys(allBlocks).find((key) => allBlocks[key] === blockFocused);
if (index > this.startBlock) blockContent.style.borderBottom = this.borderStyle || borderStyle;
if (index > this.startBlock) blockContent.style.borderBottom = this.borderStyle;
else blockContent.style.borderTop = this.borderStyle;
}
});
Expand Down

0 comments on commit a2bfd23

Please sign in to comment.