Skip to content

Commit 5b3e6f9

Browse files
Merge remote-tracking branch 'origin/8.4' into 9.0
# Conflicts: # README.md
2 parents 0daa55c + 2a066db commit 5b3e6f9

File tree

8 files changed

+85
-10
lines changed

8 files changed

+85
-10
lines changed
Binary file not shown.

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ And on Packagist available via: `neos/neos-ui`
4949

5050
### Updating
5151

52-
```
52+
```bash
5353
composer update neos/neos-ui
5454
```
5555

@@ -59,14 +59,33 @@ For trying out the new UI, we recommend you to run the regularly released beta
5959
However, if you want to stay on bleeding-edge, or want to help out developing, you'll
6060
need the `9.0.x-dev` release. You can install the latest release using:
6161

62-
```
62+
63+
```bash
6364
composer require neos/neos-ui-compiled:9.0.x-dev neos/neos-ui:9.0.x-dev
6465
```
6566

6667
## Contributing
6768

6869
Please follow the respective guides for contributing on OSX and on Linux.
6970

71+
To start developing the Neos Ui you will need a running Neos instance locally.
72+
You can use
73+
* one of your own, local Neos 8.3 instances,
74+
* create a new one with `composer create-project neos/neos-base-distribution neos-ui-development-instance`,
75+
* or use the docker compose setup in this repository (see instructions below).
76+
77+
### Setup Source Files and Git
78+
To install the source files and setup git, run:
79+
80+
```bash
81+
composer require neos/neos-ui-compiled:8.4.x-dev neos/neos-ui:8.4.x-dev --prefer-source
82+
```
83+
84+
This will sync the git repository of Neos Ui into `Packages/Application/Neos.Neos.Ui` (this might take a while).
85+
To push your changes to GitHub you need to fork the Neos Ui and change the git remote to your fork (check with `git remove -v`).
86+
87+
Run `make setup`. To check what commands are executed have a look at the `Makefile` in the root of this repository.
88+
7089
### on Windows
7190

7291
1) Ensure you have the relevant version installed (see above).

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"moment": "^2.20.1",
1010
"vfile-message": "^2.0.2",
1111
"isemail@3.2.0": "patch:isemail@npm:3.2.0#./patches/isemail-npm-3.2.0-browserified.patch",
12-
"react-codemirror2@7.2.1": "patch:react-codemirror2@npm:7.2.1#./patches/react-codemirror2-npm-7.2.1-browserified.patch"
12+
"react-codemirror2@7.2.1": "patch:react-codemirror2@npm:7.2.1#./patches/react-codemirror2-npm-7.2.1-browserified.patch",
13+
"@ckeditor/ckeditor5-engine@^16.0.0": "patch:@ckeditor/ckeditor5-engine@npm:16.0.0#./patches/@ckeditor-ckeditor5-engine-npm-16.0.0-placeholder.patch"
1314
},
1415
"scripts": {
1516
"lint": "tsc --noemit && stylelint 'packages/*/src/**/*.css' && yarn eslint 'packages/*/src/**/*.{js,jsx,ts,tsx}'",

packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import debounce from 'lodash.debounce';
22
import DecoupledEditor from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor';
33
import {actions} from '@neos-project/neos-ui-redux-store';
44
import {cleanupContentBeforeCommit} from './cleanupContentBeforeCommit'
5+
// FIXME import from @ckeditor/ckeditor5-engine/theme/placeholder.css instead! (Needs build setup configuration)
56
import './placeholder.vanilla-css';
67

78
let currentEditor = null;
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
.ck.ck-placeholder:before, .ck .ck-placeholder:before {
2-
content: attr(data-placeholder);
1+
.ck.ck-placeholder:after, .ck .ck-placeholder {
2+
display: inline-flex;
3+
}
34

4-
/* See ckeditor/ckeditor5#469. */
5-
pointer-events: none;
5+
.ck .ck-placeholder br[data-cke-filler="true"] {
6+
display: none;
7+
}
68

9+
.ck.ck-placeholder:after, .ck .ck-placeholder:after {
10+
content: attr(data-placeholder);
11+
pointer-events: none;
712
color: #999;
813
}
14+
15+
.ck.ck-read-only .ck-placeholder:after {
16+
display: none;
17+
}

packages/neos-ui-editors/src/Library/LinkInput.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ export default class LinkInput extends PureComponent {
148148
}
149149

150150
handleSearchTermChange = searchTerm => {
151+
// trim leading whitespace as it can cause issues
152+
// with the further processing
153+
if (typeof searchTerm === 'string') {
154+
searchTerm = searchTerm.trimStart();
155+
}
156+
151157
this.setState({searchTerm});
152158

153159
if (isUriOrInternalLink(searchTerm)) {
@@ -268,9 +274,16 @@ export default class LinkInput extends PureComponent {
268274
}
269275

270276
handleManualSetLink = () => {
271-
this.props.onLinkChange(this.state.searchTerm);
277+
let {searchTerm} = this.state;
278+
// trim tailing whitespace as it can cause issues
279+
if (typeof searchTerm === 'string') {
280+
searchTerm = searchTerm.trim();
281+
this.setState({searchTerm});
282+
}
283+
284+
this.props.onLinkChange(searchTerm);
272285
this.setState({
273-
isEditMode: !this.state.searchTerm
286+
isEditMode: !searchTerm
274287
});
275288
}
276289

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/src/view/placeholder.js b/src/view/placeholder.js
2+
index ec83640d4f7d12d8278c921a3c641917543ca859..09e96933b392f38d079ac3126ead49690e408228 100755
3+
--- a/src/view/placeholder.js
4+
+++ b/src/view/placeholder.js
5+
@@ -155,16 +155,7 @@ export function needsPlaceholder( element ) {
6+
const isEmptyish = !Array.from( element.getChildren() )
7+
.some( element => !element.is( 'uiElement' ) );
8+
9+
- // If the element is empty and the document is blurred.
10+
- if ( !doc.isFocused && isEmptyish ) {
11+
- return true;
12+
- }
13+
-
14+
- const viewSelection = doc.selection;
15+
- const selectionAnchor = viewSelection.anchor;
16+
-
17+
- // If document is focused and the element is empty but the selection is not anchored inside it.
18+
- if ( isEmptyish && selectionAnchor && selectionAnchor.parent !== element ) {
19+
+ if ( isEmptyish ) {
20+
return true;
21+
}
22+

yarn.lock

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ __metadata:
20372037
languageName: node
20382038
linkType: hard
20392039

2040-
"@ckeditor/ckeditor5-engine@npm:^16.0.0":
2040+
"@ckeditor/ckeditor5-engine@npm:16.0.0":
20412041
version: 16.0.0
20422042
resolution: "@ckeditor/ckeditor5-engine@npm:16.0.0"
20432043
dependencies:
@@ -2047,6 +2047,16 @@ __metadata:
20472047
languageName: node
20482048
linkType: hard
20492049

2050+
"@ckeditor/ckeditor5-engine@patch:@ckeditor/ckeditor5-engine@npm:16.0.0#./patches/@ckeditor-ckeditor5-engine-npm-16.0.0-placeholder.patch::locator=root-workspace-0b6124%40workspace%3A.":
2051+
version: 16.0.0
2052+
resolution: "@ckeditor/ckeditor5-engine@patch:@ckeditor/ckeditor5-engine@npm%3A16.0.0#./patches/@ckeditor-ckeditor5-engine-npm-16.0.0-placeholder.patch::version=16.0.0&hash=582e01&locator=root-workspace-0b6124%40workspace%3A."
2053+
dependencies:
2054+
"@ckeditor/ckeditor5-utils": ^16.0.0
2055+
lodash-es: ^4.17.10
2056+
checksum: 0ca241d6d28da9d7104c943d9ff2bf88591eb2e2726189029c3c43f8d59f726a10decc2aeb21db95a7e0242a4fc37fc480270869ca5a2f7d5db381107a385e38
2057+
languageName: node
2058+
linkType: hard
2059+
20502060
"@ckeditor/ckeditor5-enter@npm:^16.0.0":
20512061
version: 16.0.0
20522062
resolution: "@ckeditor/ckeditor5-enter@npm:16.0.0"

0 commit comments

Comments
 (0)