From 9b16de6f4036b5b6114417ab944187fbda288bf8 Mon Sep 17 00:00:00 2001 From: at055612 <22818309+at055612@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:45:47 +0100 Subject: [PATCH] gh-4527 Fix styling for Recent Items screen --- .../src/main/resources/ui/css/components.css | 5 +++++ .../client/presenter/FindResultCell.java | 13 +++++++---- .../presenter/RecentItemsPresenter.java | 22 ++++++++++++++++++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/stroom-app/src/main/resources/ui/css/components.css b/stroom-app/src/main/resources/ui/css/components.css index 9dbb9db9f96..384760d6093 100644 --- a/stroom-app/src/main/resources/ui/css/components.css +++ b/stroom-app/src/main/resources/ui/css/components.css @@ -2088,6 +2088,11 @@ button.main-menu svg { white-space: pre; color: var(--navigation__text-color); user-select: text; +} + +/* findCell-name is used for both Find In Content and Recent Items + so only add the margin when used in Find In Content */ +.findCell-sample + .findCell-name { margin-left: 6rem; } diff --git a/stroom-core-client/src/main/java/stroom/explorer/client/presenter/FindResultCell.java b/stroom-core-client/src/main/java/stroom/explorer/client/presenter/FindResultCell.java index ec50e593926..b5603ccb515 100644 --- a/stroom-core-client/src/main/java/stroom/explorer/client/presenter/FindResultCell.java +++ b/stroom-core-client/src/main/java/stroom/explorer/client/presenter/FindResultCell.java @@ -1,11 +1,11 @@ /* - * Copyright 2017 Crown Copyright + * Copyright 2024 Crown Copyright * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -59,8 +59,10 @@ public void render(final Context context, final FindResult value, final SafeHtml } // Add name - main.append(template.div(getCellClassName() + "-name", - SafeHtmlUtil.from(docRef.getName()))); + final String name = docRef.getName(); + main.append(template.divWithTitle(getCellClassName() + "-name", + value.getPath() + " / " + name, + SafeHtmlUtil.from(name))); row.append(template.div(getCellClassName() + "-main", main.toSafeHtml())); @@ -90,5 +92,8 @@ public interface Template extends SafeHtmlTemplates { @Template("