From d585a6e615f4492398e7da3688657382092f1dd8 Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Fri, 2 Feb 2024 15:24:06 -0600 Subject: [PATCH] fix(announcements): adjust announcements menu icon size (#27496) * Adjust icons #27463 * #27463 Fix sizing * Adding noopener --- .../dot-toolbar-announcements.component.html | 20 ++++++++++++++----- .../dot-toolbar-announcements.component.scss | 12 ++++++----- ...ot-toolbar-announcements.component.spec.ts | 9 ++++++++- .../dot-toolbar-notifications.component.html | 7 +++++-- .../dot-toolbar-notifications.component.scss | 14 ++++++------- 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.html b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.html index 21ff12cc2932..8bdbf7952d7a 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.html +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.html @@ -11,6 +11,7 @@
{{ 'announcements' | dm }}
[href]="item.url" target="_blank" rel="noopener noreferrer" + data-testId="announcement_link" aria-labelledby="announcement-label date-label">
{{ item.title }} @@ -23,21 +24,30 @@
{{ 'announcements' | dm }}
{{ 'announcements.knowledge.center' | dm }}
@for (item of knowledgeCenterLinks(); track item.id;) { - {{ item.label }} + {{ + item.label + }} }
{{ 'announcements.knowledge.contact.us' | dm }}
@for (item of contactLinks(); track item.id;) { - {{ item.label }} + {{ + item.label + }} }
diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.scss b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.scss index 9b5887310ec9..a6966dd271fe 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.scss +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.scss @@ -58,11 +58,12 @@ } .announcements__image { - height: 2.5rem; - width: 2.5rem; + height: 2.7rem; + width: 2.7rem; background-color: var(--color-palette-secondary-200); color: var(--color-palette-secondary-500); border-radius: 50%; + font-size: $font-size-lg; } .announcements__label { @@ -96,10 +97,11 @@ color: $white; font-size: $font-size-sm; line-height: $font-size-sm; - padding: $spacing-0; + width: 0.625rem; + height: 0.625rem; position: absolute; - left: 35px; - top: 12px; + left: 39px; + top: 14px; } ::ng-deep { diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.spec.ts b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.spec.ts index 31340eb17a24..8fcd73fa91b7 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.spec.ts +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-announcements/dot-toolbar-announcements.component.spec.ts @@ -67,7 +67,14 @@ describe('DotToolbarAnnouncementsComponent', () => { it('should have a "Show All" link', () => { spectator.detectChanges(); - const showAllLink = spectator.query(byTestId('announcement_link')); + const showAllLink = spectator.query(byTestId('announcement_link_all')); expect(showAllLink).toBeTruthy(); + expect(showAllLink.getAttribute('target')).toBe('_blank'); + }); + + it('should have a target blank on the announcements link', () => { + spectator.detectChanges(); + const announcementLink = spectator.query(byTestId('announcement_link')); + expect(announcementLink.getAttribute('target')).toBe('_blank'); }); }); diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.component.html b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.component.html index 72f74c92ecf2..a5b2d801e1a9 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.component.html +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.component.html @@ -5,7 +5,10 @@ icon="pi pi-megaphone" styleClass="p-button-rounded p-button-text"> - +