From 2c92c915b25cafb635f7bbd15e2315484d51ceb7 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 18 Nov 2024 17:40:01 +0100 Subject: [PATCH] Working group: Extract and display additional metadata Extract deliverable, point of contact and discussion from the WG README. Extend the working group page to add these new metadata Improve the completed working group visualization and add link to the deliverable. --- _data/wg.yaml | 8 +++ _includes/working-group-band.html | 33 ++++++++--- _sass/layouts/working-groups.scss | 6 +- working-groups/main.java | 68 ++++++++++++++++++++++- working-groups/templates/wg.yaml.template | 9 +++ 5 files changed, 114 insertions(+), 10 deletions(-) diff --git a/_data/wg.yaml b/_data/wg.yaml index b1a67a6f573..3c32e690516 100644 --- a/_data/wg.yaml +++ b/_data/wg.yaml @@ -29,6 +29,9 @@ working-groups: last-activity: 2024-11-18 last-update: | ROQ has been released! See https://www.youtube.com/live/hrF1a5sKqBI to see ROQ in action. + deliverable: Quarkus Insight + point-of-contact: "@ia3andy" + discussion: https://github.com/quarkusio/quarkus/discussions/41309 - title: "WebSocket Next" board-url: "https://github.com/orgs/quarkusio/projects/26" short-description: WebSocket-Next related tasks @@ -51,6 +54,8 @@ working-groups: The CDI request context is only activated if needed: https://github.com/quarkusio/quarkus/pull/43915. I hope that WS Next will be feature-complete at the time of 3.17 release. + point-of-contact: "@mkouba (@Martin Kouba on Zulip)" + discussion: https://github.com/quarkusio/quarkus/discussions/38473 - title: "Enhanced TLS support" board-url: "https://github.com/orgs/quarkusio/projects/24" short-description: Track the progress around the new TLS configuration centralization and new features (like Let's Encrypt, Cert-Manager, and local experience...) @@ -70,6 +75,9 @@ working-groups: This working group is complete! That does not mean that no work will be done around TLS, but what was defined in the initial scope of the working group has been completed. Enhancements and bug fixes will follow. + deliverable: Quarkus Insight + point-of-contact: "@cescoffier (@Clement Escoffier on Zulip)" + discussion: https://github.com/quarkusio/quarkus/discussions/41024 - title: "Quarkus 3.15 LTS" board-url: "https://github.com/orgs/quarkusio/projects/28" short-description: This WG focuses on defining the issues we would like to have in the next-to-be LTS (Quarkus 3.14/3.15) diff --git a/_includes/working-group-band.html b/_includes/working-group-band.html index da17bf2af2a..55f70641a32 100644 --- a/_includes/working-group-band.html +++ b/_includes/working-group-band.html @@ -18,8 +18,14 @@

Status: {{ item.status }}

Description: {{ item.short-description }}

Last Activity: {{ item.last-activity | date: '%B %d, %Y' }}

+ {% if item.point-of-contact %} +

Point of Contact: {{ item.point-of-contact }}

+ {% endif %} + {% if item.discussion %} +

Discussion: Link

+ {% endif %} - @@ -31,16 +37,27 @@

Completed working groups

These working groups have completed their work and are no longer active:

- - + diff --git a/_sass/layouts/working-groups.scss b/_sass/layouts/working-groups.scss index c5e56b77514..8a8a46523aa 100644 --- a/_sass/layouts/working-groups.scss +++ b/_sass/layouts/working-groups.scss @@ -32,7 +32,11 @@ .card-body { padding: 1rem 0rem; - height: 11rem; + height: 15rem; + } + + .card-completed { + background: WhiteSmoke; } .card-footer { diff --git a/working-groups/main.java b/working-groups/main.java index f2033ceab83..0d9810d1b39 100644 --- a/working-groups/main.java +++ b/working-groups/main.java @@ -5,7 +5,7 @@ //DEPS io.quarkus:quarkus-picocli //DEPS io.quarkus:quarkus-smallrye-graphql-client //DEPS io.quarkus:quarkus-qute -//DEPS org.commonmark:commonmark:0.22.0 +//DEPS org.commonmark:commonmark:0.23.0 //DEPS io.quarkus:quarkus-config-yaml //FILES templates/=templates/* //FILES application.yaml @@ -26,6 +26,7 @@ import java.util.concurrent.ExecutionException; import org.commonmark.node.Node; +import org.commonmark.node.Paragraph; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; import org.eclipse.microprofile.config.inject.ConfigProperty; @@ -198,6 +199,71 @@ public String getReadme() { return renderer.render(document); } + private static boolean isMetadata(String singular, String plural, String line) { + var l = line.toLowerCase().trim(); + return l.startsWith("* " + singular.toLowerCase() + ":") + || l.startsWith("* " + plural.toLowerCase() + ":"); + } + + public String getDeliverable() { + String line = longDescription().lines() + .filter(s -> isMetadata("Deliverable", "Deliverables", s)) + .findFirst() + .orElse(null); + + if (line != null) { + var content = line.substring(line.indexOf(":") + 1).trim(); + Parser parser = Parser.builder().build(); + Node document = parser.parse(content); + HtmlRenderer renderer = HtmlRenderer.builder() + .omitSingleParagraphP(true) + .escapeHtml(false) + .sanitizeUrls(true) + .build(); + return renderer.render(document); + } + + return null; + } + + public String getPointOfContact() { + String line = longDescription().lines() + .filter(s -> isMetadata("Point of contact", "Points of contact", s)) + .findFirst() + .orElse(null); + + if (line != null) { + var content = line.substring(line.indexOf(":") + 1).trim(); + Parser parser = Parser.builder().build(); + Node document = parser.parse(content); + HtmlRenderer renderer = HtmlRenderer.builder() + .omitSingleParagraphP(true) + .build(); + return renderer.render(document); + } + + return null; + } + + public String getDiscussionLink() { + String line = longDescription().lines() + .filter(s -> isMetadata("Discussion", "Discussions", s)) + .findFirst() + .orElse(null); + + if (line != null) { + var content = line.substring(line.indexOf(":") + 1).trim(); + Parser parser = Parser.builder().build(); + Node document = parser.parse(content); + HtmlRenderer renderer = HtmlRenderer.builder() + .omitSingleParagraphP(true) + .build(); + return renderer.render(document); + } + + return null; + } + public String getIndentedReadme() { String readme = getReadme(); return readme.replaceAll("\n", "\n ").trim(); diff --git a/working-groups/templates/wg.yaml.template b/working-groups/templates/wg.yaml.template index cbd0efcdeca..d3bfe6645e9 100644 --- a/working-groups/templates/wg.yaml.template +++ b/working-groups/templates/wg.yaml.template @@ -13,4 +13,13 @@ working-groups: last-update: | {board.getIndentedLastUpdate().raw} {/if} + {#if board.getDeliverable()} + deliverable: {board.getDeliverable().raw} + {/if} + {#if board.getPointOfContact()} + point-of-contact: "{board.getPointOfContact().raw}" + {/if} + {#if board.getDiscussionLink()} + discussion: {board.getDiscussionLink().raw} + {/if} {/for}