Giter Site home page Giter Site logo

Comments (8)

brandonkelly avatar brandonkelly commented on June 23, 2024 1

Hey @proimage, couple updates:

  • I found and fixed a bug where the scroll positions weren’t being maintained properly on reload, when more than two tabs were open to the same entry’s edit page.
  • Craft 4.10 and 5.2 will allow plugins to partially1 disable auto page reloading, and Redactor2 will take advantage of that when in fullscreen mode, once Craft 4.10 and 5.2 are out.

You can update to Craft 4.10 / 5.2 and the Redactor change right now by setting the following constraints in composer.json, and then running composer update:

// Craft 4.10
"craftcms/cms": "4.10.x-dev as 4.10.0-alpha",
"craftcms/redactor": "3.x-dev as 3.1.0-alpha",

// Craft 5.2
"craftcms/cms": "5.2.x-dev as 5.2.0-alpha",
"craftcms/redactor": "4.x-dev as 4.1.0-alpha",

1 Other tabs will still reload when a provisional draft is first created in the active tab, or when a draft is deleted/applied, because it’s crucial that all tabs are working with the correct revision at those points.

2 I’m assuming that’s what you’re using, but the same logic could easily be applied to other rich text editors (besides CKEditor, which doesn’t have first party fullscreen mode).

from cms.

brandonkelly avatar brandonkelly commented on June 23, 2024 1

Craft 4.10.0 and 5.2.0 are out, as well as Redactor 3.1.0 and 4.1.0.

from cms.

brandonkelly avatar brandonkelly commented on June 23, 2024

This is working as intended. The other tab will get refreshed because something about its content may have just changed, e.g. any non-translatable fields, or things like the entry’s post date.

from cms.

proimage avatar proimage commented on June 23, 2024

Ok, that makes sense... so what about autosaveDrafts being deprecated? Is that replaced with something else, or is there just no way to prevent autosaving drafts going forward?

from cms.

brandonkelly avatar brandonkelly commented on June 23, 2024

autosaveDrafts was added in Craft 3 as a temporary solution to make content editing more tolerable on installs where saving an entry took several seconds each time.

That hasn’t been the case nearly as much in Craft 4+, and we’re continuing to find ways to improve performance with each major release, and the plan is to remove it once long save times are fully resolved.

So it’s a performance hack; not meant to be an alternate workflow you might want to opt into.

from cms.

proimage avatar proimage commented on June 23, 2024

I've updated the site in question to Craft 4.x, and the auto-refreshing is more disruptive than expected. The content is long-form, so smallish WYSIWYG fields don't really cut it, which is why the content editor has the WYSIWYG fields in their full-screen modes. There are multiple language windows open in parallel, each with their WYSIWYG in full-screen mode. Whenever changes are registered in any of the open windows, they all refresh, which exits them out of full-screen and reloads their pages, losing the place in the long-form content being edited.

For now, what they're doing is pasting the English reference content into a temporary entry, and only editing one translation at a time. Obviously, this greatly slows down the editing process.

So this is a multi-tasking, content-editing related issue, made difficult by the Autosave Drafts feature.

Do you have any suggestions?

from cms.

proimage avatar proimage commented on June 23, 2024

Thanks, @brandonkelly, that looks like those changes should address the core issue. :) As I understand it, Redactor scroll positions will be kept more consistent due to a bugfix, and in full-screen mode (which I presume cannot be automatically re-triggered when an auto-save + page refresh happens), there's a way for Redactor to pause autosaving.

My main question is CKEditor. With Redactor being deprecated, I had planned on transitioning over to CKE either under Craft 4.x or 5.x, but if CKE has no full-screen mode... is there a plugin that provides that functionality?

from cms.

brandonkelly avatar brandonkelly commented on June 23, 2024

There are a couple third party plugins that add it, like this one, but I have no idea how reliably they are.

There’s an open feature request for it to be added as a first party plugin here.

from cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.