-
-
Notifications
You must be signed in to change notification settings - Fork 144
FEATURE: New link editor (Archaeopteryx) #3996
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
base: 9.0
Are you sure you want to change the base?
Conversation
The package is herby merged into the Neos Ui from https://github.com/sitegeist/Sitegeist.Archaeopteryx/tree/2.0.1 Following initial changes have been carried out: - Introduce new github based "server" workflow to run behaviour tests (this should replace all server side linting now done via circleci) - add all php Classes from "Sitegeist.Archaeopteryx/Classes" to "Classes/LinkEditor" and adapt namespace - Add policy and backend auth configuration for new endpoints inside LinkEditor - add route definitions (previously neos/archaeopteryx/ now neos/link-editor/) - add translations previously in LinkType and Main -> now located in a separate LinkEditor namespace which is fully included - replace Archaeopteryx `plugin` package via manifest.link-editor.js - rename Archaeopteryx `core` package to neos-ui-link-editor-core as well as all other (neos-bridge is to be removed) - add behaviour test for endpoint - run new node based test via `node --test` and deprecate our jest tests With these adjustments the copied code already works and offers the new link editor experience though the task is not complete yet: - add link editor documentation to neos docs or some place - remove previous ckeditor link editor and inspector link editor - remove php linting from circle ci in favour of new workflow - fix LinkToArrayForNeosUiConverter in core - remove neos-ui-link-editor-bridge corruption layer - remove styled-components and use css modules - remove rx-js and use framework-observeable if possible - evaluate the need for react-final-form and final-form (all other neos ui parts are coded without) - remove or combine neos-ui-link-editor-error-handling in favour of our own error handling - commit all new .yarn dependencies but evaluate the necessity of each - satisfy js linting and typescript - optimise bundle size by lazy loading the huge library "libphonenumber-js"
… default value again See tests > initial state, update, set to initial and > update state back to defaultValue This bug becomes eminent when implementing a dialog which is closed by default and then opens - which works - but is later closed again.
…r `observable$.pipe()`
…rvable` This allows to build redux like action state reducing. The ActionObservable is similar to the rxjs Subject.
…-bridge" and defer to using the actual context instead
…-bridge" and defer to using react-redux mostly direct While a direct import from "react-redux" would work, the `useSelector` would not be aware of its state type. And as the defaultState was removed reduxjs/react-redux#1879 we resort to now cleanly reexporting it.
…LinkType for later fixing
…translate() function ... if possible ... for user input like options.label the registry is used with its fallback handling.
…se backend connector directly
…stry layer and use global state instead Originally the Neos Ui was build seemingly without real global state. There is a high order component function - invoked via a decorator @neos() which allowed to inject the registry. For functional components a hook could be introduced, or similar to translate() we have a global state. Fully removes the temporary package @neos-project/neos-ui-link-editor-neos-bridge again
- use global translate() function now to avoid passing i18n registry
…ect/neos-ui-error` package - adjust naming of QueryResponse to be more precise - return 200 even if there is an error as otherwise fetchWithErrorHandling would do the error handling task and skip the boundary - centralise isDevelopmentContext via systemEnv in neos-ui - add class to wrap two errors together as part of a error chain (NestedError) this is not an ECMAScript error and thus does not extend Error support showing nested errors in the ErrorView - throw server side error objects directly in javascript - align link editor server side errors with neos ui (e.g. class, message, code and now optional trace) - render ErrorView in FatalErrorView as well for precise client side vs server side vs nested error representation - remove temporary @neos-project/neos-ui-link-editor-error-handling
That makes just not sense to not provide an error :D
…ehaviour We allow to escape via ESC-key and click outside now if there are no pending changes. If there are changes we require Cancel to be pressed and shake the dialog with an orange border - just like with the node creation dialog.
… small framework package to handle promises for `usePromise()` the implementation of usePromise has been taken over from pr #3331 and a rudimentary test has been added.
…mandatory prop technically the definition is correct, but the package `themr()` we use to inject the css styles does not remove the `theme` prop from the mandatory props causing ts error when using the already decorated component without `theme` im not proud of using ! here but we did so already in other places
aa2621c to
ede1292
Compare
…mber validation and country calling code suggestions The library is quite big due to the dataset. Now while it gives some validation when parsing a phone number and also can help by finding the correct country calling code - these features do not justify the complexity of the new library. We expect that phone numbers are usually inserted as is with or without country code. Its seldom of need for a neos editor to have an overview within neos of all 300+ country calling codes and its not trivial to build good ux for that. For further simplification phone numbers are now a simple text field with basic warnings if empty or non digits are entered.
…removing hard constraints we emit a warning but do not prevent apply because validating a full email is almost impossible :D the editor should always be in charge of the content!
… does not reappear initial link
`@types/react-redux` leads to a minor update in `redux` to `4.2.1` which we will test separately `tsx` requires esbuild 25 as dependency while we depend still on 17 this should be updated in sync
…ript 4.6 seems too old for this
44bbfe1 to
fa24677
Compare
With "FEATURE: Position Dialog Modals centered and adjust width and height" (see #4007) We no longer require the Modal css hack. Also, the component is now inlined to simplify the code ;)
fa24677 to
661f741
Compare
|
Tested it locally and have some suggestions:
Very Nitpicky suggestions for styling& usability: Had a look at the code and it looks good, but also not did not check that deeply since it is a lot of changes |
…e at the end [Behat\Gherkin\Exception\UnexpectedParserNodeException] Expected Examples table or end of Scenario, but got Step
PATCH: adjust text fixtures to expectations
|
For your consideration: I raised some minor issues with Archaeopterix that could maybe be checked/implemented while this is not merged yet:
|



The package is herby merged into the Neos Ui from https://github.com/sitegeist/Sitegeist.Archaeopteryx/tree/2.0.1
With these adjustments the copied code already works and offers the new link editor experience though the task is not complete yet:
Neos\Neos\Ui\LinkEditor\LinkDTO (the thing which is stuffed into the Node)downloadattribute support - ui feature since FEATURE: ckeditor download option #3197relselect boxaction: ingoredmaybe fix flow already and build my and christians idea or useFlowRouteannotation?What I did
How I did it
How to verify it