Skip to content
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

🐛 [#4012] Fix content component link popup in form builder #4331

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented May 27, 2024

Closes #4012

Changes

  • remove the ckeditor node after closing the formbuilder editcomponent modal

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh.sh
    • Ran ./bin/compilemessages_js.sh
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how

@stevenbal stevenbal marked this pull request as draft May 27, 2024 14:18
Copy link

codecov bot commented May 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.26%. Comparing base (69b95dc) to head (0298990).
Report is 773 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4331   +/-   ##
=======================================
  Coverage   96.25%   96.26%           
=======================================
  Files         731      731           
  Lines       23741    23786   +45     
  Branches     2800     2803    +3     
=======================================
+ Hits        22853    22898   +45     
  Misses        617      617           
  Partials      271      271           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stevenbal stevenbal force-pushed the issue/4012-ckeditor-missing-link-popup branch 3 times, most recently from 03d695f to 92efbad Compare May 28, 2024 07:44
@stevenbal
Copy link
Contributor Author

@sergei-maertens does this need backport? It doesn't seem like a huge issue, though I guess it would be nice to have it patched in previous versions

@stevenbal stevenbal requested a review from sergei-maertens May 28, 2024 07:53
@stevenbal stevenbal marked this pull request as ready for review May 28, 2024 07:53
@sergei-maertens
Copy link
Member

@sergei-maertens does this need backport? It doesn't seem like a huge issue, though I guess it would be nice to have it patched in previous versions

Nah, it's annoying but doesn't seem to be too common?

What I'm more interested in, is if we can't apply this patch in the form-builder repository instead of here - as I understand it, this node should be destroyed whenever the WYSIWYG editor gets unmounted? So it sounds more like it needs to be patched in a useEffect cleanup in https://github.com/open-formulieren/formio-builder/blob/main/src/registry/content/rich-text.tsx

@stevenbal
Copy link
Contributor Author

Ah yeah that seems like a more appropriate place, I didn't know we were using our own formio-builder 🤐. I'll look into it

@stevenbal
Copy link
Contributor Author

@sergei-maertens I have tried to fix this in the formbuilder with a useEffect hook, but haven't been able to get it to work. It seems that .destroy is called by default when switching translation tabs for instance, but not when closing the modal. The code in the return of my useEffect hook also doesn't seem to be called when the modal is closed

@stevenbal stevenbal force-pushed the issue/4012-ckeditor-missing-link-popup branch from 92efbad to e8606cf Compare June 10, 2024 07:19
because the WebformBuilder root was not unmounted after closing the modal, this did not work previously
@stevenbal stevenbal force-pushed the issue/4012-ckeditor-missing-link-popup branch from e8606cf to 0298990 Compare June 10, 2024 07:20
@sergei-maertens sergei-maertens merged commit 1be3d45 into master Jun 10, 2024
26 checks passed
@sergei-maertens sergei-maertens deleted the issue/4012-ckeditor-missing-link-popup branch June 10, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants