Skip to content

Commit

Permalink
gh-4527 Fix styling for Recent Items screen
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Oct 15, 2024
1 parent f96b696 commit 9b16de6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
5 changes: 5 additions & 0 deletions stroom-app/src/main/resources/ui/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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()));

Expand Down Expand Up @@ -90,5 +92,8 @@ public interface Template extends SafeHtmlTemplates {

@Template("<div class=\"{0}\">{1}</div>")
SafeHtml div(String className, SafeHtml content);

@Template("<div class=\"{0}\" title=\"{1}\">{2}</div>")
SafeHtml divWithTitle(String className, String title, SafeHtml content);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package stroom.explorer.client.presenter;

import stroom.data.grid.client.PagerView;
Expand Down Expand Up @@ -41,7 +57,7 @@ public void onShowRecentItems(final ShowRecentItemsEvent event) {
showing = true;
focusText = true;
refresh();
final PopupSize popupSize = PopupSize.resizable(800, 600);
final PopupSize popupSize = PopupSize.resizable(800, 800);
ShowPopupEvent.builder(this)
.popupType(PopupType.CLOSE_DIALOG)
.popupSize(popupSize)
Expand All @@ -61,6 +77,10 @@ protected void updateFilter(final ExplorerTreeFilterBuilder explorerTreeFilterBu
explorerTreeFilterBuilder.setNameFilter(explorerTreeFilterBuilder.build().getNameFilter(), true);
}


// --------------------------------------------------------------------------------


@ProxyCodeSplit
public interface RecentItemsProxy extends Proxy<RecentItemsPresenter> {

Expand Down

0 comments on commit 9b16de6

Please sign in to comment.