Closed libpitt closed 8 months ago
@yuanzhou Or I can just use the configuration to create what you like. Can we truly anticipate never needing this functionality? I think better to have it. For example:
NEXT_PUBLIC_BANNER_LOGIN = '{"sectionClassName": "container", "theme": "danger", "title": "<h2>Login Warning</h2>", "content": "This banner matches the width of the Login section. Can include html tags in any property marked as type <code>html str</code> in the documentation. Like: <a href='https://github.com/x-atlas-consortia/data-ingest-board?tab=readme-ov-file#content-management'>Git Hub Docs</a>", "className": "mt-4"}'
NEXT_PUBLIC_BANNER_SEARCH_ENTITIES = $NEXT_PUBLIC_BANNER_LOGIN
I can create some defaults to address:
NEXT_PUBLIC_BANNER_LOGIN = '{"title": "<h2>Login Warning</h2>", "content": "This banner matches the width of the Login section. Can include html tags in any property marked as type <code>html str</code> in the documentation. Like: <a href='https://github.com/x-atlas-consortia/data-ingest-board?tab=readme-ov-file#content-management'>Git Hub Docs</a>"}'
NEXT_PUBLIC_BANNER_SEARCH_ENTITIES = $NEXT_PUBLIC_BANNER_LOGIN
By default the banner has no dismissible or close button.
@libpitt thanks for the suggestion, I'm pretty sure we only need one banner. And we don't want to have separate title
and content
because many cases we don't use a title at all. Since HTML is supported, we can include the title in the main message too.
@yuanzhou I see. title
property also not a required field. In fact, none of the properties are required. Add as needed.
@libpitt do you need to update the example.sennet.env
?
Can you also disable these two banner config variables by default in the example config as well for both HuBMAP and SenNet? Since they are optional and we only use them on demand.
I did a quick test, looks like there's a bit inconsistency with the margin or maybe it's a padding issue. On the login page the banner spans to the content width. After login, it's narrower than the main content container.
When I mentioned "A warning style is sufficient." I really meant something like the warning alert box rather than danger alert style, using Bootstrap as an example:
Change log: