Ghost/ghost/admin/app/templates
Kevin Ansfield b286faf011
Initial setup for Lexical multiplayer websockets service (#16611)
no issue

Rough prototype only, current limitations:
- **No persistence**. Docs are in-memory only, YJS state will be lost on server restart although it could be re-populated by clients if they reconnect without closing their local doc (needs testing/investigation)
- **No tie-in with saved lexical state**. Lexical state is updated in the post model via normal API requests from Admin which can mean the multiplayer doc and the saved lexical state become out of sync but there's no detection/indication of that state at present. Will also trigger the "someone else is editing" errors because multiplayer doesn't yet override the default post update collision detection
- **New posts don't start in multiplayer**. New posts don't have an ID and so can't have a respective YJS doc, after initial save we don't transition to multiplayer because the React component in Ember doesn't re-render on prop changes yet
- **No tests**. Experimental code just to get something working and help answer questions for what's next

Changes:
- added `lexicalMultiplayer` labs flag
- updated `<KoenigLexicalEditor>` to pass through the required `<KoenigComposer>` props for multiplayer when enabled
- added `lexical-multiplayer` service
  - `init()` called during boot, used to set up the `enable()` and `disable()` methods so the flag can be toggled without restarts
  - when enabled it adds `upgrade` request handling to the base Ghost server
    - returns 404 if the URL doesn't match `/ghost/api/admin/posts/multiplayer/*`
    - returns 401 if a valid session cookie is not present
    - if everything is good, hands off to code in `y-websocket.js` that handles YJS doc creation, awareness, keepalive, etc
    - uses doc names in the format `${post.id}/${docId}` where `docId` is `main` for the primary document and a GUID for any sub-documents like captions and nested editors in cards
- updated `SettingsBREADService` to check if the `labs` setting is changed, and enables/disables the `lexical-multiplayer` service as needed so the websockets server can be started and shutdown when toggling without requiring a restart
2023-04-12 20:24:02 +01:00
..
editor Fixed linter error for use of {{action}} in editor-loading controller 2022-07-18 10:50:03 +01:00
explore Added Ghost Explore in Ghost as iframe app behind feature flag (#15495) 2022-10-07 14:32:54 +01:00
lexical-editor Lexical-powered editor experiment (#15278) 2022-08-23 11:45:50 +01:00
members Added new members CSV importer (#1797) 2020-12-10 01:02:31 +05:30
posts Wired email debug screen with API (#15919) 2022-12-02 14:38:40 +05:30
react-editor Fixed linter error for use of {{action}} in editor-loading controller 2022-07-18 10:50:03 +01:00
settings Initial setup for Lexical multiplayer websockets service (#16611) 2023-04-12 20:24:02 +01:00
setup Replaced copy that uses "See" to "View" across Admin 2023-01-11 15:44:23 +01:00
application-error.hbs Update dependency ember-template-lint to v5.3.0 (#16062) 2023-01-04 09:39:32 +00:00
application.hbs Wired up click-to-refresh upgrade banner 2023-03-02 18:39:38 +00:00
dashboard.hbs Added mentions widget empty state 2023-03-02 20:06:53 +00:00
designsandbox.hbs Added <GhPostBookmark> and displayed on publish flow complete step 2022-05-10 13:26:13 +01:00
editor.hbs 🐛 Fixed broken editor breadcrumbs when opening a new post from analytics (#16463) 2023-03-22 00:12:15 -07:00
error.hbs Fixed 404 code alignment 2021-07-08 15:42:46 +02:00
lexical-editor.hbs Switched snippet update modal to new modal pattern 2022-11-14 09:55:34 +00:00
lexicalsandbox.hbs Updated lexical sandbox page structure 2022-09-28 11:06:32 +07:00
member.hbs 🐛 Fixed unexpected "unsaved changes" modal when deleting a member 2022-12-05 11:48:37 +00:00
members-activity.hbs Replaced copy that uses "See" to "View" across Admin 2023-01-11 15:44:23 +01:00
members.hbs enabled member filtering and export at all times (#16344) 2023-02-27 15:23:29 -06:00
mentions.hbs Added a temporary fix for wrapping multiple mentions dropdown 2023-03-02 20:06:53 +00:00
migrate.hbs Add Migrate app (#16458) 2023-03-30 15:40:06 +01:00
offer.hbs Updated playwright tests to use updated data ids 2023-01-10 13:33:12 +05:30
offers.hbs Revert "Removed explicit timeout for offer creation helper" 2023-03-10 13:44:45 +04:00
pages-loading.hbs Refactored posts and pages controllers to Octane patterns 2022-10-07 18:39:34 +01:00
pages.hbs Added post bulk edit api (#16576) 2023-04-07 11:48:14 +02:00
posts-loading.hbs Refactored posts and pages controllers to Octane patterns 2022-10-07 18:39:34 +01:00
posts.hbs Added post bulk edit api (#16576) 2023-04-07 11:48:14 +02:00
reset.hbs Refactored reset controller to Octane patterns 2022-10-07 19:07:51 +01:00
settings.hbs Added Playwright member's actions tests (#15968) 2022-12-12 10:13:08 +04:00
setup.hbs Fixed flash of failure state when submitting site setup and staff signup forms 2022-05-27 12:13:54 +01:00
signin.hbs Refactored signin controller to Octane patterns 2022-11-01 14:12:23 +00:00
signup.hbs Migrated signup screen to Octane patterns 2022-05-27 13:28:29 +01:00
site.hbs Added reset-to-homepage behaviour when clicking "view site" link 2019-03-21 17:55:58 +00:00
tag.hbs Fixed breadcrumbs responsive issues 2022-10-06 16:25:57 +07:00
tags-loading.hbs Updated breadcrumb and title style across admin 2022-10-04 12:35:29 +07:00
tags.hbs Updated breadcrumb and title style across admin 2022-10-04 12:35:29 +07:00
websockets.hbs Added alpha feature to demonstrate websockets 2023-02-17 11:55:15 +01:00
whatsnew.hbs Replaced copy that uses "See" to "View" across Admin 2023-01-11 15:44:23 +01:00