-
Notifications
You must be signed in to change notification settings - Fork 903
refactor: minor task page design adjustments #18187
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
Conversation
@BrunoQuaresma in the link to PR can you also specify the repo and the external link icon? looks like there is room. otherwise, it's a bit difficult to tell what it is |
site/src/pages/TaskPage/TaskPage.tsx
Outdated
href: string; | ||
}; | ||
|
||
const getLinkFormat = (uri: string): LinkFormat => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we split this into 2 functions? parseUri
that returns either an issue, a PR, or a generic link object, and renderLink
that accepts the result of the former as a param and returns a React node.
site/src/utils/uri.ts
Outdated
@@ -0,0 +1,32 @@ | |||
export const formatURI = (uri: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function's name was fine when it was local to the AppStatuses page, but it doesn't seem to be descriptive enough to be a project-wide helper function. Maybe something along the lines of truncateURIForDisplay
would be better?
|
Merging it to keep things fast. Feel free to add any relevant comments, so I can address right next. |
Before:

After:

Closes:
task/[id]
page #18162