Content
View differences
Updated by Tobias Dillmann 2 days ago
[As discussed,](https://github.com/opf/openproject/pull/20979#discussion_r2528071090) we have to find some solution for rendering the description of portfolios.
~~Options are:~~ Options are:
* ~~Rendering Rendering as plain text, e.g. removing all HTML tags~~ tags
* ~~Rendering Rendering full HTML, but restrict the display to a maximum height~~ height
* ~~Whitelist~~ _~~some~~_ ~~HTML Whitelist _some_ HTML tags and hide problematic ones such as tables and macros~~ macros
~~All All of these come with downsides. Explore and find a solution that is pragmatic and good enough to live with it in most cases.~~
This topic was discussed in the [UX Open Door](https://community.openproject.org/meetings/7503#meeting-agenda-item-21110). We decided to apply the following logic:
* Certain elements (images, tables, headings) are removed from the description. Only show the first 5 lines.
* For edge cases, e.g. tables, show text values of the cells.
The logic for this already exists to a large extent, see project sidebar or [template selector](https://github.com/opf/openproject/blob/dev/app/forms/projects/template_select_form.rb#L87). We would have to make the amount of lines rendered configurable as it is currently hardcoded to 3. cases.
~~Options are:~~
* ~~Rendering
* ~~Rendering
* ~~Whitelist~~ _~~some~~_ ~~HTML
~~All
This topic was discussed in the [UX Open Door](https://community.openproject.org/meetings/7503#meeting-agenda-item-21110). We decided to apply the following logic:
* Certain elements (images, tables, headings) are removed from the description. Only show the first 5 lines.
* For edge cases, e.g. tables, show text values of the cells.
The logic for this already exists to a large extent, see project sidebar or [template selector](https://github.com/opf/openproject/blob/dev/app/forms/projects/template_select_form.rb#L87). We would have to make the amount of lines rendered configurable as it is currently hardcoded to 3.