-
Notifications
You must be signed in to change notification settings - Fork 4
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
Profilequestion: Change question field to rich text #804
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions, but approved.
Just ignore the suggestions, as they are probably not applicable.
@@ -38,14 +39,14 @@ class IProfileQuestion(model.Schema, IRichDescription, IBasic): | |||
be skipped, or repeated multiple times. | |||
""" | |||
|
|||
question = schema.TextLine( | |||
question = HtmlText( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 I'd have used plone.app.textfield.RichText
instead and use Plone's portal_transform machinery with maybe a custom transform and also benefit from transform caching, etc.
But this is the way we do it in euphorie and we don't change that for this PR, alright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I just want to be consistent for the moment. But maybe we can talk about switching if you see benefits there...
<dl class="grid span-13"> | ||
<dt i18n:translate="label_profilequestion_question">Question</dt> | ||
<dd>${context/question}</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also do something like:
<dd tal:replace="structure python:view.get_safe_html(context.question)"></dd>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We sure could, but it would end up with very little horizontal space, so I pulled it out of the dl
.
Ref syslabcom/scrum#2859