Skip to content

Commit

Permalink
HAL-1945: fix notification badge visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
michpetrov committed Nov 23, 2023
1 parent d96c947 commit ab9624e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/org/jboss/hal/client/skeleton/HeaderView.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class HeaderView extends HalViewImpl implements HeaderPresenter.MyView {

private static final Logger logger = LoggerFactory.getLogger(HeaderView.class);
private static final PlaceRequest HOMEPAGE = new PlaceRequest.Builder().nameToken(NameTokens.HOMEPAGE).build();
private static final String SPACE = " ";

private final Places places;
private final Resources resources;
Expand Down Expand Up @@ -178,7 +179,9 @@ public HeaderView(Environment environment, Places places, AccessControl ac, Reso
.add(span()
.css(fontAwesome("bell"))
.style("padding-right: 0"))
.add(badgeIcon = span().css(badge).id(Ids.BADEGE_ICON).element())
.add(badgeIcon = span().css(badge).id(Ids.BADGE_ICON)
.textContent(SPACE) // badge content can't be empty
.element())
.element()))
.add(li().css(dropdown, hidden).id(Ids.HEADER_EXTENSIONS_DROPDOWN)
.add(a().css(clickable, dropdownToggle)
Expand Down Expand Up @@ -245,7 +248,7 @@ public HeaderView(Environment environment, Places places, AccessControl ac, Reso
.add(backItem = li()
.add(backLink = a().css(clickable, back)
.add(i().css(fontAwesome("angle-double-left")))
.add(" " + resources.constants().back())
.add(SPACE + resources.constants().back())
.element())
.element())
.add(breadcrumbToolsItem = li().css(breadcrumbTools)
Expand Down Expand Up @@ -635,11 +638,11 @@ public void updateBreadcrumb(FinderContext finderContext) {
String breadcrumbValue = segment.getItemTitle();
if (breadcrumbValue.length() > MAX_BREADCRUMB_VALUE_LENGTH) {
a.appendChild(span()
.textContent(abbreviateMiddle(breadcrumbValue, MAX_BREADCRUMB_VALUE_LENGTH) + " ")
.textContent(abbreviateMiddle(breadcrumbValue, MAX_BREADCRUMB_VALUE_LENGTH) + SPACE)
.title(breadcrumbValue)
.element());
} else {
a.appendChild(span().textContent(breadcrumbValue + " ").element());
a.appendChild(span().textContent(breadcrumbValue + SPACE).element());
}
a.appendChild(span().css(caret).element());
value.appendChild(ul()
Expand Down
2 changes: 1 addition & 1 deletion resources/src/main/java/org/jboss/hal/resources/Ids.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public interface Ids {
String ASSIGNMENT_EXCLUDE = "assignement-exclude";
String ASSIGNMENT_INCLUDE = "assignement-include";
String ATTRIBUTES = "attributes";
String BADEGE_ICON = "badge-icon";
String BADGE_ICON = "badge-icon";
String BOOT_ERRORS_ADDRESS_COLUMN = "boot-errors-address-column";
String BOOT_ERRORS_EMPTY = "boot-errors-empty";
String BOOT_ERRORS_FORM = "boot-errors-form";
Expand Down

0 comments on commit ab9624e

Please sign in to comment.