Skip to content
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

!!!TASK: Remove plow-js #3306

Merged
merged 19 commits into from
Nov 9, 2023
Merged

Conversation

grebaldi
Copy link
Contributor

@grebaldi grebaldi commented Dec 22, 2022

solves: #3118

I'm moving from package to package. Until the last package is finished, this remains a WIP.

TODOs

@grebaldi grebaldi linked an issue Dec 22, 2022 that may be closed by this pull request
8 tasks
@mhsdesign
Copy link
Member

mhsdesign commented Jan 30, 2023

we could also merge this into 8.3 already and remove the extensibility export of plow starting with 9.0 ...

and due to plows frequent usage, the neos extensibility api could augment all plow methods with a deprecated warning, so plugin authors and users know what to expect with neos 9 :)

@@ -249,6 +249,8 @@ public function getDisallowedProperties(NodeInterface $node): array
};

$disallowedProperties = array_filter(array_keys($node->getNodeType()->getProperties()), $filter);
$disallowedProperties = array_values($disallowedProperties);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi :D why has this been added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_filter leaves keys intact. Through json_encode this can lead to arrays being serialized as objects. array_values makes sure that we always end up with a strictly numerical array.

@mhsdesign
Copy link
Member

id like to merge this before we tackle: #3217 as there will be (some easy to fix) merge conflicts. Im planning the css rename for 8.3 ...

also the earlier we merge, the more we can test ^^

@mhsdesign
Copy link
Member

#3304 will result in a small merge conflict ;)

@mhsdesign
Copy link
Member

it was discussed that PluginViewEditor will be deprecated with 8.3

@mhsdesign
Copy link
Member

will resolve merge conflicts

@github-actions github-actions bot added the 8.3 label Mar 10, 2023
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import {produce} from 'immer';
import mapValues from 'lodash.mapvalues';
import {connect} from 'react-redux';
import {$get, $contains, $set} from 'plow-js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

biggest merge conflict was in this file (packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js)

because of @JamesAlias and @markusguenther work

#3304
#2989

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you @grebaldi also did some refactoring here (extract preprocessViewConfiguration into evaluateExpression), i suspect we need to migrate this file again and start fresh

Comment on lines 26 to 38
const addPlugin = (Plugin, isEnabled) => (ckEditorConfiguration, options) => {
// we duplicate editorOptions here so it would be possible to write smth like `$get('formatting.sup')`
if (!isEnabled || isEnabled(options.editorOptions, options)) {
ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];
return $add('plugins', Plugin, ckEditorConfiguration);
return {
...ckEditorConfiguration,
plugins: [
...(ckEditorConfiguration.plugins ?? []),
Plugin
]
};
}
return ckEditorConfiguration;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Highlighting this addPlugin utility function for everyone migrating $add to normal js

@markusguenther markusguenther changed the base branch from 8.3 to 9.0 April 11, 2023 11:29
@grebaldi
Copy link
Contributor Author

grebaldi commented May 3, 2023

Just noticed potential conflict with #3478 (I think #3478 should take precedence)

@grebaldi grebaldi marked this pull request as ready for review September 28, 2023 16:30
@grebaldi grebaldi changed the title WIP: !!!TASK: Remove plow-js !!!TASK: Remove plow-js Sep 28, 2023
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a full "by reading" review of this once and now seeing that the e2e tests also succeed i give this green light ;)

# Conflicts:
#	Classes/Service/NodePolicyService.php
#	packages/neos-ui-sagas/src/Changes/index.js
#	packages/neos-ui-sagas/src/Publish/index.js
#	packages/neos-ui/src/Containers/PrimaryToolbar/PublishDropDown/index.js
Copy link
Member

@markusguenther markusguenther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR and resolved conflicts. Also tested the PR locally. Thanks to @grebaldi for all the work.

@mhsdesign mhsdesign merged commit 66889e3 into neos:9.0 Nov 9, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Remove PlowJS & immutable-js
3 participants