ux icon indicating copy to clipboard operation
ux copied to clipboard

[TURBO] wysiwyg problem on first page load

Open radiz13 opened this issue 1 year ago • 5 comments

Hi ! I've a problem with Turbo and wysiwyg editors (tried FOSCKEditor bundle & Quill). After removing cache, on first load, I've an error "Uncaught ReferenceError: CKEDITOR is not defined". The editor only loads on page refreshes. Has anyone ever encountered this issue before? Thx.

Uncaught ReferenceError: CKEDITOR is not defined
    renderElement https://***.wip/assets/vendor/@hotwired/turbo/turbo.index-810f44ef1a202a441e4866b7a4c72d11.js:21
    assignNewBody https://***.wip/assets/vendor/@hotwired/turbo/turbo.index-810f44ef1a202a441e4866b7a4c72d11.js:21
    replaceBody https://***.wip/assets/vendor/@hotwired/turbo/turbo.index-810f44ef1a202a441e4866b7a4c72d11.js:21
    ...

radiz13 avatar Feb 09 '24 07:02 radiz13

I only quickly browsed this PR, but it looks like it creates the merge commit directly from the release branch. That will not work if there are merge conflicts because we can't resolve them in the release branch itself; we need an extra integration branch to do that. Or did I miss a way to resolve conflicts without touching the PR branch?

jandubois avatar Mar 13 '24 18:03 jandubois

Nope; the expected behaviour is that if there's a conflict, somebody else will make a new PR to resolve it (and draft or otherwise ignore the auto-generated PR). Our issue tends to be that we forget to do this, so the existence of the automatically generated PR will serve as a reminder (since we at least manage to keep the set of open, undrafted PRs low).

mook-as avatar Mar 13 '24 19:03 mook-as

My concern was that somebody would accidentally use the GitHub UI to merge main into release-1.XX to resolve the conflict.

But we can always disable branch-protection to fix the release branch again later, so maybe this is not a real concern.

jandubois avatar Mar 13 '24 19:03 jandubois

Yeah, that's a reasonable concern. I just wanted to

  1. optimize for the no-conflicts case (ideally we should have very little in the release branch…)
  2. avoid creating excess branches in the upstream repo (i.e. this one), since that's a shared workspace.

I propose we go for this and see how it goes, given that we don't have an algorithm for what to do in the other case? Ideally, of course, GitHub would just let us make PRs from tags, but no…

mook-as avatar Mar 13 '24 22:03 mook-as

In actually trying to do this for v1.13.0 (manually), I realized that we do need a branch for this, because otherwise on merge we'd have deleted the release-1.13 branch (as part of GitHub's automation), which would be dumb.

Tentatively, this branch will be called (for example) merge-v1.13.0.

mook-as avatar Mar 14 '24 19:03 mook-as

Updated to create the temporary branch (on the same repo the release was made from).

  • Creating the branch: https://github.com/mook-as/rd/actions/runs/8287376232
  • If the branch already exists, we still create the PR: https://github.com/mook-as/rd/actions/runs/8287421890

mook-as avatar Mar 14 '24 20:03 mook-as