Skip to content

Conversation

@mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Sep 12, 2025

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:

  • 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
  • discuss where to place Neos\Neos\Ui\LinkEditor\Link DTO (the thing which is stuffed into the Node)
  • 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"
  • document new plain node-js tests and also see that we only use one version of esbuild for the testing too (evaluate if we can write node-js tests in typescript?)
  • reintroduce download attribute support - ui feature since FEATURE: ckeditor download option #3197
  • reintroduce Ctrl+K LinkEditor shortcut - ui feature since FEATURE: Open Link Editor when Ctrl+K is pressed #2900
  • extract inline styles to css modules
  • fix absolute height hack for node and asset link targets
  • extract neos globals change and evaluate where to place the global registry and config
  • unify icon choices e.g. use cross (x) icon instead of bin like in assets editor
  • document and review how to use the new documentation
  • paulas review
  • vertical tabs
  • re-introduce disabling of some link options?
    • outline future idea of rel select box
  • noted from martin: Link Preview is missing in inline editor and also a way to goto the selected target?
  • do not use action: ingored maybe fix flow already and build my and christians idea or use FlowRoute annotation?
  • labels should not follow a column
  • link string must fully hide options icon

What I did

How I did it

How to verify it

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.
…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.
…translate() function

... if possible ... for user input like options.label the registry is used with its fallback handling.
…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
@github-actions github-actions bot added Feature Label to mark the change as feature 9.0 labels Sep 12, 2025
@mhsdesign
Copy link
Member Author

Screenshots (updated 12.09)

New link editor

image

Nested error view from server side errors

image

Improved general fatal error boundary

image

@mhsdesign mhsdesign marked this pull request as draft September 12, 2025 08:50
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
@mhsdesign mhsdesign force-pushed the feature/new-link-editor-archaeopteryx branch from aa2621c to ede1292 Compare September 14, 2025 09:47
…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!
`@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
@mhsdesign mhsdesign marked this pull request as ready for review October 1, 2025 07:50
@mhsdesign mhsdesign force-pushed the feature/new-link-editor-archaeopteryx branch 4 times, most recently from 44bbfe1 to fa24677 Compare October 12, 2025 16:03
@mhsdesign mhsdesign force-pushed the feature/new-link-editor-archaeopteryx branch from fa24677 to 661f741 Compare October 13, 2025 13:22
@pKallert
Copy link
Contributor

Tested it locally and have some suggestions:

  1. Validate input for anchor (spaces allowed right now)
  2. The settings button on the upper right when editing links -> Not sure what this is supposed to do, perhaps add a title to indicate what it should do, or why it is disabled?

Very Nitpicky suggestions for styling& usability:
4. Add some spacing above anchor
5. When I create & copy to another language and the document does not exist, it says [deleted document], but should correctly say something like "document does not exist"
6. When applying filter it says "loading", perhaps some spacing there?
7. Assets tab: Can we place the "anchor" outside the scrollable space?

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
Very nice new feature 👍

@mhsdesign mhsdesign moved this to Planning in Neos Sprint 10/2025 Oct 20, 2025
@mhsdesign mhsdesign moved this from Planning to In Progress in Neos Sprint 10/2025 Oct 20, 2025
mhsdesign and others added 3 commits October 21, 2025 10:42
…e at the end

[Behat\Gherkin\Exception\UnexpectedParserNodeException]

Expected Examples table or end of Scenario, but got Step
PATCH: adjust text fixtures to expectations
@lorenzulrich
Copy link
Contributor

For your consideration: I raised some minor issues with Archaeopterix that could maybe be checked/implemented while this is not merged yet:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.0 Feature Label to mark the change as feature

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants