Conversation
0783a8d to
5a49f8a
Compare
5a49f8a to
1055d63
Compare
1055d63 to
30814c3
Compare
ahukkanen
left a comment
There was a problem hiding this comment.
Nice work!
I only have some issues I'd like to propose regarding the addImage option which I think is useless. Also, we need to find out how to prevent the image dropping in Firefox when the images are not allowed.
|
The Firefox file dropping bug is because the image dropping is implemented in Firefox by default for contenteditable elements. I made this fiddle to test it (open in Firefox and drop an image to the editable area): We can prevent this behavior in Quill by adding this line in the quill.root.addEventListener("drop", (ev) => ev.preventDefault());Note that this needs to be added ONLY when the image module is not enabled. When the image module is enabled, we should let the |
@ahukkanen in cbeff35 i have tried to consolidate the editor behaviour, by removing the form When the Also, i have tried to add some checks in the clipboard functionality to avoid exposing errors caused by the image uploader not being attached. |
There was a problem hiding this comment.
Nice work once again but after I reviewed #10467, I realized that in this PR (probably) we should also implement the toolbar changes as agreed at #10130. While reviewing that other PR, I also made notes where we should do changes:
- Assemblies -> edit: for the
closing_date_reason, use toolbar typecontent - Budgets -> edit budget: for the
description, use toolbar typecontent - Conferences -> edit: for the
registration_terms, use toolbar typecontent - Consultations -> edit question: for the
title, use toolbar typebasic(because this is rendered within an<h2>) - Forms (survey) -> edit: for the
tos, use toolbar typecontent - Meetings registrations -> edit: for the
registration_terms, use toolbar typecontent - Meetings, participant side -> new/edit: for the
description, use toolbar typecontent - Meetings, participant side -> new/edit: for the
registration_terms, use toolbar typecontent - Proposals, participant side -> new/edit, use toolbar type
content - Sortitions -> edit, for
witnesses, use toolbar typecontent - Sortitions -> cancel ("destroy"), for
cancel_reason, use toolbar typecontent
|
@ahukkanen, the work in this comments is supposed to be handled in a separate PR: Considering that we already know this work is coming, i would leave it in the scope of that PR. ( I need this PR and #10467 in order to successfully perform the task) |
|
@alecslupu Are you sure about that? You will create a dependency on this PR also for the backport, so the backport will also eventually depend on this. I'd handle that already in this PR if possible. It's only 12 views to change the toolbar type at (if I've catched them all in the list above + initiatives comment). |
I could do it here, but i would really like to be able to go through each one of the view layers where the content is being rendered, then adjust the use of toolbar for each one of the fields... |
ahukkanen
left a comment
There was a problem hiding this comment.
Also noticed an unnecessary line break while looking at the code.
2998f20 to
5e853ea
Compare
5e853ea to
7468acd
Compare
There was a problem hiding this comment.
This works really nicely now. One thing I've noticed at the admin side:
- Sortition "additional information" has
contenttype toolbar when creating a new sortition but when editing it, it isfull. In both cases it should befull. Note that the witnesses should remaincontent, as it already is.
Also on the participant side, I'm not quite sure what to do with these but the inconsistency feels really weird because some of these records can be modified from the admin panel too where we have different capabilities. Not so much about the multimedia controls (which is related to #10700) but more about the possibility to add subtitles (content toolbar type) as a participant which I would see useful in many places:
- Debates new/edit: debate description
- Initiatives new/edit: initiative description
- Meetings new/edit
- Meeting description
- Meeting registration terms
- Proposals new/complete/edit: proposal body
I think this would make a lot of sense eventually but this also comes with a problem when using the legacy design which has weird heading orders in some places. Maybe this is something we could incorporate into the next 0.28 release, where we (hopefully) won't have the problem of inconsistent headings...
|
Regarding this comment I left above about the subtitles:
I posted a new feature request about that to Metadecidim: I think we can potentially retake this when we have redesign ready. |
ahukkanen
left a comment
There was a problem hiding this comment.
The sortitions spec is failing after the latest changes. I also had one doubt regarding the multimedia toolbar type that we are not using right now anywhere.
|
FYI, I've added the missing labels (they're used for the changelog generator script) |
I have added to backports as well. |

🎩 What? Why?
When using the editor field type, we have the option of setting the toolbar to either "basic" or "full" depending on the needs.
Currently the Editor toolbar is displaying the video and image buttons no matter what, yet, based on the #10130 acceptance criteria, we need not to "have the video embed option in the WYSIWYG editor."
📌 Related Issues
Link your PR to an issue
Testing
📷 Screenshots
Please add screenshots of the changes you are proposing
