Skip to content

Commit

Permalink
fix&update[OrganizationPage]: Fix duplication and update paragraph sp…
Browse files Browse the repository at this point in the history
…acing on the description fetched from API
  • Loading branch information
Fredrik Marjoni committed Apr 10, 2026
1 parent 441155e commit 4edd823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public String fetchDescription(String pageUrl) {

// Extract all <p> tags and <div> elements as separate paragraphs
String description = section.select("p, div").stream()
.filter(el -> el.tagName().equals("p") || el.select("p").isEmpty())
.filter(el -> !el.hasClass("extra-info") && !el.hasClass("logo"))
.map(Element::text)
.map(text -> text.replace("Les mer", "").trim())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private StackPane createImageContainer() {
imageContainer.setId("imageContainer");
imageContainer.setPrefHeight(120);
imageContainer.setPrefWidth(120);
imageContainer.setMaxWidth(Double.MAX_VALUE);
imageContainer.setMaxWidth(120);

Organization org = appState.getCurrentOrganization();
if (org != null && org.logoUrl() != null && !org.logoUrl().isBlank()) {
Expand Down Expand Up @@ -121,6 +121,8 @@ private VBox createOrgInfoSection() {
descriptionScroll.setStyle("-fx-focus-color: transparent; -fx-faint-focus-color: transparent;");
descriptionScroll.setPrefHeight(400);
descriptionScroll.setMaxHeight(400);
descriptionScroll.setPrefWidth(750);
descriptionScroll.setMinWidth(750);

orgNameAndDescription.getChildren().addAll(orgName, descriptionScroll);

Expand Down

0 comments on commit 4edd823

Please sign in to comment.