-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
New->Edit transition refactor #8287
Comments
edit
mode
I've been thinking about this for a while and we went through my plans to eliminate it on Slack a while back https://ghost.slack.com/archives/C09JM0TCK/p1489655198744663 The outline of the refactor discussed there:
With those changes in place the code surrounding editor becomes a lot simpler, the editor component wouldn't be re-rendered and I think the editor can continue to use the same |
That sounds good, I should have work arounds for most of the bugs but there is no solution to the actual physical reloading of the editor with the current setup. Other options which may be simpler are:
|
closes TryGhost/Ghost#8287 closes TryGhost/Ghost#8750 - moved all editor model functionality into the new `editor` route+controller - moved editor template from `editor/edit.hbs` to `editor.hbs` - refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit - fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered - fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component - added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller - removed editor route/controller mixins - removed the `editor.edit` and `editor.new` controllers
closes TryGhost/Ghost#8287 closes TryGhost/Ghost#8750 - moved all editor model functionality into the new `editor` route+controller - moved editor template from `editor/edit.hbs` to `editor.hbs` - refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit - fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered - fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component - added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller - removed editor route/controller mixins - removed the `editor.edit` and `editor.new` controllers
closes TryGhost/Ghost#8287 closes TryGhost/Ghost#8750 - moved all editor model functionality into the new `editor` route+controller - moved editor template from `editor/edit.hbs` to `editor.hbs` - refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit - fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered - fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component - added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller - removed editor route/controller mixins - removed the `editor.edit` and `editor.new` controllers
General overview of required changes outlined in #8287 (comment)
Issues that should be fixed when this lands:
Currently ghost-admin doesn't create a post until the user makes a change in the editor. This causes the editor to reload which in turn resets the cursor position among other things.
We unsuccessfully try and mask this by moving the cursor to the end of the content.
This:
/
menu it just flickers visible as the page is reloaded.The text was updated successfully, but these errors were encountered: