-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MEL]: Application banner #1142
base: main
Are you sure you want to change the base?
Conversation
Affected libs: Affected apps:
|
📷 Screenshots are here! |
.type( | ||
'This is a warning message that should be shown when the key is set' | ||
) | ||
cy.get('.btn-group').eq(1).find('button').first().click() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there is an enpoint api to add a new translation key, maybe it will save time to do so as a POST instead of login and navigate in geonetwork admin.
But it works fine as is too, this is a thought about improving e2e runing time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is, and it would also fail a bit less. Will change that, thanks for the suggestion :)
[message]="platformService.translateKey(bannerKey) | async" | ||
class="container-sm" | ||
type="secondary" | ||
></gn-ui-application-banner> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libs/ui/elements/src/lib/application-banner/application-banner.component.html
Outdated
Show resolved
Hide resolved
libs/ui/elements/src/lib/application-banner/application-banner.component.ts
Outdated
Show resolved
Hide resolved
libs/ui/elements/src/lib/application-banner/application-banner.component.ts
Show resolved
Hide resolved
libs/ui/elements/src/lib/application-banner/application-banner.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the small display issue with long text, it is working great!
Thanks for the work!
title: 'Warning', | ||
closeEnabled: true, | ||
type: 'light', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't, I don't know why it's happening like that in the storybook, maybe it's a matter of colors imports? Because in the datahub the right colors are shown when switching to secondary or light :/
Since it works in the app & it's only on storybook, I will look into it if there is time left
Description
This PR introduces an application banner, shown on the datahub header when the translation key
appplication-banner
is set in the backend.It includes different display & styling options as described in https://www.figma.com/design/gA3wp0RCnrZtvEBhtdVkpO/GN4-datahub-camptocamp?node-id=3902-13462&m=dev. Some adaptations will be done on MEL & that's why the component has been made configurable.
To test
Login & go to
/geonetwork/srv/eng/admin.console#/settings/languages
.Add the translation key "application-banner" and add the english/french translation (depending on your browser language). Don't forget to save!
Architectural changes
none
Screenshots
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label