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

Merged
merged 4 commits into from
Feb 8, 2025

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

Copy link
Collaborator

@willydouhard willydouhard left a comment

Choose a reason for hiding this comment

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

lgtm

@willydouhard willydouhard added this pull request to the merge queue Feb 8, 2025
@willydouhard willydouhard removed this pull request from the merge queue due to a manual request Feb 8, 2025
@willydouhard willydouhard merged commit 2dff4f6 into Chainlit:main Feb 8, 2025
9 checks passed
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