Sat, 09 Oct 2021 17:46:12 +0200
add three emoji sequences (experimental feature)
1.1 --- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/Issues.kt Sun Sep 26 14:59:36 2021 +0200 1.2 +++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/Issues.kt Sat Oct 09 17:46:12 2021 +0200 1.3 @@ -30,6 +30,7 @@ 1.4 import com.vladsch.flexmark.html.HtmlRenderer 1.5 import com.vladsch.flexmark.parser.Parser 1.6 import com.vladsch.flexmark.util.data.MutableDataSet 1.7 +import com.vladsch.flexmark.util.data.SharedDataKeys 1.8 import de.uapcore.lightpit.entities.* 1.9 import de.uapcore.lightpit.types.IssueCategory 1.10 import de.uapcore.lightpit.types.IssueStatus 1.11 @@ -68,19 +69,30 @@ 1.12 val version: Version? = null, 1.13 val component: Component? = null 1.14 ) : View() { 1.15 + private val parser: Parser 1.16 + private val renderer: HtmlRenderer 1.17 1.18 init { 1.19 val options = MutableDataSet() 1.20 - .set(Parser.EXTENSIONS, listOf(TablesExtension.create(), StrikethroughExtension.create())) 1.21 - val parser = Parser.builder(options).build() 1.22 - val renderer = HtmlRenderer.builder(options).build() 1.23 - val process = fun(it: String) = renderer.render(parser.parse(it)) 1.24 + .set(SharedDataKeys.EXTENSIONS, listOf(TablesExtension.create(), StrikethroughExtension.create())) 1.25 + parser = Parser.builder(options).build() 1.26 + renderer = HtmlRenderer.builder(options 1.27 + .set(HtmlRenderer.ESCAPE_HTML, true) 1.28 + ).build() 1.29 1.30 - issue.description = process(issue.description ?: "") 1.31 + issue.description = formatMarkdown(issue.description ?: "") 1.32 for (comment in comments) { 1.33 - comment.commentFormatted = process(comment.comment) 1.34 + comment.commentFormatted = formatMarkdown(comment.comment) 1.35 } 1.36 } 1.37 + 1.38 + private fun formatEmojis(text: String) = text 1.39 + .replace("(/)", "✅") 1.40 + .replace("(x)", "❌") 1.41 + .replace("(!)", "⚡") 1.42 + 1.43 + private fun formatMarkdown(text: String) = 1.44 + renderer.render(parser.parse(formatEmojis(text))) 1.45 } 1.46 1.47 class IssueEditView(
2.1 --- a/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Sun Sep 26 14:59:36 2021 +0200 2.2 +++ b/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Sat Oct 09 17:46:12 2021 +0200 2.3 @@ -33,6 +33,7 @@ 2.4 <li>Gesamtanzahl der Kommentare wird nun angezeigt.</li> 2.5 <li>Spalte für zugewiesener Entwickler zu den Vorgangstabellen hinzugefügt.</li> 2.6 <li>E-Mail Link in Vorgangsansicht hinzugefügt, wenn der Zugewiesene eine Mailadresse hat.</li> 2.7 + <li>Formatierung für Status-Icons hinzugefügt, die als Text eingegeben werden: (/), (x) sowie (!)</li> 2.8 <li>Installationsanweisungen hinzugefügt.</li> 2.9 </ul> 2.10
3.1 --- a/src/main/webapp/WEB-INF/changelogs/changelog.jspf Sun Sep 26 14:59:36 2021 +0200 3.2 +++ b/src/main/webapp/WEB-INF/changelogs/changelog.jspf Sat Oct 09 17:46:12 2021 +0200 3.3 @@ -27,76 +27,77 @@ 3.4 <h3>Version 1.0 (snapshot)</h3> 3.5 3.6 <ul> 3.7 - <li>Removes multi selection of versions within an issue.</li> 3.8 - <li>Adds possibility to deactivate a component.</li> 3.9 - <li>Adds release and end of life dates to versions.</li> 3.10 - <li>Adds the total number of comments to the caption.</li> 3.11 - <li>Adds assignee to the issue overview tables.</li> 3.12 - <li>Adds mailto link in issue view when the assignee has a mail address.</li> 3.13 - <li>Adds install instructions.</li> 3.14 + <li>Remove multi selection of versions within an issue.</li> 3.15 + <li>Add possibility to deactivate a component.</li> 3.16 + <li>Add release and end of life dates to versions.</li> 3.17 + <li>Add the total number of comments to the caption.</li> 3.18 + <li>Add assignee to the issue overview tables.</li> 3.19 + <li>Add mailto link in issue view when the assignee has a mail address.</li> 3.20 + <li>Add formatting for (/), (x), and (!) status indicators.</li> 3.21 + <li>Add install instructions.</li> 3.22 </ul> 3.23 3.24 <h3>Version 0.6</h3> 3.25 3.26 <ul> 3.27 - <li>Adds about page.</li> 3.28 - <li>Adds possibility to edit own comments.</li> 3.29 - <li>Adds possibility to leave a comment when editing an issue.</li> 3.30 - <li>Improves Issue View.</li> 3.31 - <li>Changes sort order of versions in the versions overview to be the same as in the left menu.</li> 3.32 - <li>Removes unused width from the left menu.</li> 3.33 - <li>Fixes duplicates in the components and versions lists.</li> 3.34 - <li>Fixes issue form not loaded with the correct version info.</li> 3.35 - <li>Fixes leaking prepared statements.</li> 3.36 + <li>Add about page.</li> 3.37 + <li>Add possibility to edit own comments.</li> 3.38 + <li>Add possibility to leave a comment when editing an issue.</li> 3.39 + <li>Improve Issue View.</li> 3.40 + <li>Change sort order of versions in the versions overview to be the same as in the left menu.</li> 3.41 + <li>Remove unused width from the left menu.</li> 3.42 + <li>Fix duplicates in the components and versions lists.</li> 3.43 + <li>Fix issue form not loaded with the correct version info.</li> 3.44 + <li>Fix leaking prepared statements.</li> 3.45 </ul> 3.46 3.47 <h3>Version 0.5</h3> 3.48 3.49 <ul> 3.50 - <li>Adds separate issue detail view.</li> 3.51 - <li>Adds manual project ordering.</li> 3.52 - <li>Adds <em>Create Another</em> checkbox to the issue form.</li> 3.53 - <li>Adds tooltip to dates displaying the time.</li> 3.54 - <li>Adds markdown support for descriptions and comments.</li> 3.55 - <li>Adds a mailto Link to the display name above comments where possible.</li> 3.56 - <li>Increases maximum length of project names.</li> 3.57 + <li>Add separate issue detail view.</li> 3.58 + <li>Add manual project ordering.</li> 3.59 + <li>Add <em>Create Another</em> checkbox to the issue form.</li> 3.60 + <li>Add tooltip to dates displaying the time.</li> 3.61 + <li>Add markdown support for descriptions and comments.</li> 3.62 + <li>Add a mailto Link to the display name above comments where possible.</li> 3.63 + <li>Increase maximum length of project names.</li> 3.64 <li>Highlight ETA when it has passed.</li> 3.65 - <li>Hides deprecated versions from left menu.</li> 3.66 - <li>Greatly reduces footprint of used markdown library.</li> 3.67 - <li>Fixes text in the version status tags not being translated.</li> 3.68 - <li>Fixes <em>Updated</em> date not updated when a comment has been added.</li> 3.69 - <li>Fixes border rendering issues in Chrome.</li> 3.70 - <li>Fixes UTF-8 not being used everywhere.</li> 3.71 - <li>Fixes comments not supporting line breaks.</li> 3.72 - <li>Migrates the Project from Java to Kotlin</li> 3.73 + <li>Hide deprecated versions from left menu.</li> 3.74 + <li>Greatly reduce footprint of used markdown library.</li> 3.75 + <li>Fix text in the version status tags not being translated.</li> 3.76 + <li>Fix <em>Updated</em> date not updated when a comment has been added.</li> 3.77 + <li>Fix border rendering issues in Chrome.</li> 3.78 + <li>Fix UTF-8 not being used everywhere.</li> 3.79 + <li>Fix comments not supporting line breaks.</li> 3.80 + <li>Migrate the Project from Java to Kotlin</li> 3.81 </ul> 3.82 3.83 <h3>Version 0.4</h3> 3.84 3.85 <ul> 3.86 - <li>Adds components.</li> 3.87 - <li>Adds automatic issue assignedment based on project and/or component lead.</li> 3.88 - <li>Adds comments.</li> 3.89 - <li>Adds version overview.</li> 3.90 - <li>Adds colored status indicators to versions.</li> 3.91 - <li>Changes sort order of issues to move completed issues to the bottom.</li> 3.92 + <li>Add components.</li> 3.93 + <li>Add automatic issue assignedment based on project and/or component lead.</li> 3.94 + <li>Add comments.</li> 3.95 + <li>Add version overview.</li> 3.96 + <li>Add colored status indicators to versions.</li> 3.97 + <li>Change sort order of issues to move completed issues to the bottom.</li> 3.98 <li>Overall improvement of URLs.</li> 3.99 </ul> 3.100 3.101 <h3>Version 0.3</h3> 3.102 3.103 <ul> 3.104 - <li>Adds colored tags for issue types and issue status.</li> 3.105 - <li>Removes separate progress bars for affected and reported issue lists.</li> 3.106 - <li>Fixes issue status <em>Scheduled</em> already considered <em>in progress</em>.</li> 3.107 + <li>Add colored tags for issue types and issue status.</li> 3.108 + <li>Remove separate progress bars for affected and reported issue lists.</li> 3.109 + <li>Fix issue status <em>Scheduled</em> already considered <em>in progress</em>.</li> 3.110 </ul> 3.111 3.112 <h3>Version 0.2</h3> 3.113 3.114 <ul> 3.115 - <li>Adds progress bar for projects and their versions.</li> 3.116 - <li>Adds issues per version list.</li> 3.117 - <li>Changes height of issue description text area.</li> 3.118 + <li>Add progress bar for projects and their versions.</li> 3.119 + <li>Add issues per version list.</li> 3.120 + <li>Change height of issue description text area.</li> 3.121 </ul> 3.122 3.123 <h3>Version 0.1</h3>