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

support links in banner message #21657

Open
Ankurk99 opened this issue Feb 20, 2025 · 3 comments · May be fixed by #21688
Open

support links in banner message #21657

Ankurk99 opened this issue Feb 20, 2025 · 3 comments · May be fixed by #21688
Labels
area/ui kind/requirement New feature or idea on top of harbor

Comments

@Ankurk99
Copy link

Description
Harbor provides a global configuration for setting a banner message, which is useful for displaying important notices to users, especially for maintenance.
One of our use-cases requires adding links to these messages to direct our users to more information. However, since BannerMessage is an HTML-safe string, it does not support HTML tags, making it difficult to include links.

I am looking for advice on how to achieve this.
One approach is to use an HTML sanitizer (such as bluemonday) and allow only a few tags (for eg. <a>). However, this would introduce an additional dependency, and I'm unsure if Harbor would be open to including it. The alternative would be handling sanitization ourselves, which isn’t ideal either. Does anyone have other suggestions?

I’d also like to hear the community’s opinion on adding this feature.

@Vad1mo Vad1mo added the kind/requirement New feature or idea on top of harbor label Feb 21, 2025
@bupd
Copy link
Contributor

bupd commented Feb 22, 2025

Just brainstorming here. what if we use markdown formatting for the Banner Message. which would allow you to have multiple things.
including links

@Ankurk99
Copy link
Author

Ankurk99 commented Feb 28, 2025

Certainly, using markdown works just fine. I'd be happy to contribute to this issue once we settle on how to implement it.

@bupd
Copy link
Contributor

bupd commented Mar 3, 2025

Good then, We already have markdown implementation in Harbor UI in Artifact Summary Component. we need to replicate the same here in banner message component.

@Ankurk99 Ankurk99 linked a pull request Mar 3, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui kind/requirement New feature or idea on top of harbor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants