Skip to content
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

Configuration to display an application banner #8416

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

josegar74
Copy link
Member

@josegar74 josegar74 commented Oct 9, 2024

In certain cases can be relevant to display a banner in the application to inform users, for example of a maintenance task.

This change request adds a new setting to enable an application banner and configure the text to display.

configuration-banner-1

configuration-banner-2

The banner is displayed in the public pages.

banner-1

banner-2

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Copy link
Member

@fxprunayre fxprunayre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One limitation is that the message is not multilingual. One option would be to use the service description of the catalogue like we do here https://github.com/geonetwork/core-geonetwork/blob/main/web-ui/src/main/resources/catalog/views/default/templates/home.html#L9 but not sure it worth it?

@josegar74
Copy link
Member Author

I was thinking to configure a translation-key in the database and use it. I'll check to update the pull request with this.

@fxprunayre
Copy link
Member

I was thinking to configure a translation-key in the database and use it. I'll check to update the pull request with this.

yep maybe a translation key can be good enough and will be display in main catalogue and portal more easily.

@josegar74
Copy link
Member Author

@fxprunayre updated to use a translation key

@MichelGabriel
Copy link
Contributor

@josegar74 I had a go at the styling and looked at how GitHub did it. I used the same yellow background for a better contrast of background and foreground.

For now the text is always displayed as bolder. I would leave that up to the user who writes the text for the banner. You can add html elements, like <b> in the translation.

This is the css I used:

.application-banner {
  background-color: #fff8c5;
  border: 1px solid #d4a72c66;
  margin: 15px;
  padding: 15px;
  border-radius: 4px;
  color: #000;
}

@josegar74
Copy link
Member Author

@MichelGabriel, thanks. I've updated the styling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants