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

Profilequestion: Change question field to rich text #804

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reinhardt
Copy link
Contributor

Ref syslabcom/scrum#2859

@reinhardt reinhardt requested a review from thet February 17, 2025 12:03
Copy link
Member

@thet thet left a 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(
Copy link
Member

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.

Copy link
Contributor Author

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>
Copy link
Member

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>

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants