-
Notifications
You must be signed in to change notification settings - Fork 38
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
Change help to rich text #3293
base: main
Are you sure you want to change the base?
Change help to rich text #3293
Conversation
28c9bf0
to
939c3b4
Compare
@wes-otf How does OTF feel about converting all help text in application forms to rich text fields? Today we have a plain text field + a help link field. |
@frankduncan A rebase would help with testing and we would need a migration to convert the current fields to the new one. old help text + old help link = new help rich text |
@frjo Sounds great! I've added it to my list and I should have it to you sometime in the next week. |
@frjo @frankduncan sorry for the delayed response but this would be fantastic! This week I've ironically talked with a few staff members at OTF about how it's be great to have some formatting in the help text so I'm certainly an advocate for this. |
Sounds like we are adding this to Hypha core then. But see comment above about the migration I belive is a requisite to get it in. I do not think OTF, or any other organisation, want to manually readd all the help text to every existing form. @wes-otf @frankduncan Is there any chance we could make the help field use markdown with an editor instead of rich text? With rich text field you allow staff to put in almost anything, e.g. paste in spagetti HTML from MS Word. With markdown we can ensure clean input and still allow for both links and formatting, just as requested. |
Looping in @jim-mcgowan I lean toward rich text because thus far in my career, the target audience for things like hypha application configuration and target audience for markdown has little overlap. Furthermore, hypha already supports rich text for submissions, but maybe there's a good drop in wagtail field type that is wysiwyg->markdown. (If so, why not use that instead of rich text for submissions?) |
There is a markdown editor in Hypha already, "pagedown" from the Stackoverflow people. It is e.g one of the field option on application forms. The reason we have a rich text editor is that so applicants can paste in spagetti HTML from MS Word. Preserving tables etc. We are planing to look in to the possibility of converting that to Markdown before saving it to the DB. |
The comments tab on submission are using the Markdown editor/field as well. |
So ARDC can put hyperlinks in the text
This was failing because the rich text fields are not equal under the strict equality of the StreamValue class, as they are each two different equivalently instantiated objects.
Converts rich help text to string to avoid type error Closes #114
Finally looking at this again! I can attempt to change it to the markdown form, but I think that building a migration that will work is outside of my ability. Because of the use of streamfields, and the fact that that this is a change on the low level FormFieldBlock, the migration would have to dip into all instances of all users of that, which is... well, everything, right? Or am I missing something and this is much easier than it looks? |
3e808a6
to
c890a66
Compare
Took a stab at using markdown instead, and couldn't figure out a way for it to work. The pagedown widget didn't come up in editing, and even when using markdown and saving, the help text just displayed a Did rebase and commit those changes though! |
Fixes #3288
Changes the help field to rich text. Of note is that when you have current forms that used both the text and the link, the link is lost to the sands of time. Maybe we need a transition migration? But not sure how to do that when working with stream objects.
There's one test change (in its own commit) that I'm not sure on. Otherwise, everything looks good.