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

feat: support adding custom links on the nav header #1836

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

Conversation

fgalind1
Copy link
Contributor

@fgalind1 fgalind1 commented Jan 30, 2025

This PR allows to configure custom links to be added in the menu/navigation header by adding them in the config.toml file

For example:

[[UI.header_links]]
    name = "Confluence"
    icon_url = "https://www.atlassian.com/favicon.ico"
    url = "https://www.atlassian.com"

[[UI.header_links]]
    name = "Issues"
    icon_url = "https://mintlify.s3-us-west-1.amazonaws.com/chainlit-43/_generated/favicon/favicon.ico?v=3"
    url = "https://github.com/Chainlit/chainlit/issues"

That will result in the following:

image

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. backend Pertains to the Python backend. enhancement New feature or request frontend Pertains to the frontend. labels Jan 30, 2025
@willydouhard
Copy link
Collaborator

That's great! The size of the button is too big i think. Also we should remove the current github config which does exactly that buy specifically for github, this can be now generalised with this PR

@fgalind1
Copy link
Contributor Author

fgalind1 commented Feb 5, 2025

That's great! The size of the button is too big i think. Also we should remove the current github config which does exactly that buy specifically for github, this can be now generalised with this PR

indeed, I've adjusted the size, now they show more uniform with the theme/user icons
image

prev size:
image

@willydouhard for the github config I only found a reference of being used here https://github.com/Chainlit/chainlit/blob/main/backend/chainlit/server.py#L347 but not to used in the frontend or render an icon/link anywhere?

@fgalind1
Copy link
Contributor Author

fgalind1 commented Feb 5, 2025

I believe it is indeed not used, so I've created a PR #1865 that removes this in favor of this generalized approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pertains to the Python backend. enhancement New feature or request frontend Pertains to the frontend. size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants