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

Shorten long project links #76

Open
dave-shawley opened this issue May 23, 2024 · 1 comment
Open

Shorten long project links #76

dave-shawley opened this issue May 23, 2024 · 1 comment

Comments

@dave-shawley
Copy link
Contributor

We recently added a link to a project's logs in our cloud provider and the link is slightly larger than 1000 characters. The resulting display clutters the project detail view considerably.

image

I'm thinking that we should truncate links by keeping the scheme, net-loc, and final path element. So a link like
https://my-service.environment.example.com wouldn't be modified. Links like https://github.com/AWeber-imbi/imbi-ui would be truncated as https://github.com/.../imbi-ui where the literal ellipsis replaces the intervening path segments. The remainder of the URL (eg, query, fragment) would be omitted. This would only affect the display of course.

@dave-shawley
Copy link
Contributor Author

Hmmm... https://www.npmjs.com/package/truncate-url might fit the bill

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

No branches or pull requests

1 participant