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

Build scan badge is too small in Job Summary #175

Closed
gabrielfeo opened this issue Apr 17, 2024 · 5 comments · Fixed by #200
Closed

Build scan badge is too small in Job Summary #175

gabrielfeo opened this issue Apr 17, 2024 · 5 comments · Fixed by #200
Labels
enhancement New feature or request good first issue Good for newcomers in:setup-gradle
Milestone

Comments

@gabrielfeo
Copy link
Contributor

gabrielfeo commented Apr 17, 2024

When "requested tasks" is big, the “Build scan: Publlished” badge becomes quite small. Since you already truncate "requested tasks" (related: #35), you may want to truncate it further so that the badge is more readable. I imagine having the Gradle logo this small also hurts your brand guidelines. Repro: gabrielfeo/develocity-api-kotlin#232 (comment)

Screenshot 2024-04-17 at 12 36 27

This is a very minor suggestion, so feel free to close this issue if you disagree :)

@bigdaz
Copy link
Member

bigdaz commented Apr 17, 2024

I agree. I just haven't found the right combination of Markdown/HTML to render nicely on GitHub. (GitHub seems to ignore any column width settings).

If you'd like to help out, you could experiment with this easily by manually editing the comment in the PR and using Preview. But we need something that renders well at most windows sizes, which is tricky!

@bigdaz bigdaz changed the title PR comment "Build scan" badge too small Build scan badge is too small in Job Summary Apr 17, 2024
@bigdaz bigdaz added enhancement New feature or request in:setup-gradle good first issue Good for newcomers labels Apr 17, 2024
@gabrielfeo
Copy link
Contributor Author

After playing around a bit, one simple solution would be to truncate just a bit further and reduce the amount of text in the badge. What do you think?

Truncated to 60 + badge with label (current)

Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCentralReposito…
8.7 Build Scan PUBLISHED
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCentralReposito…
8.7 Build Scan NOT_PUBLISHED

Truncated to 50 + concise badge

Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCent…
8.7 Build Scan PUBLISHED
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCent…
8.7 Build Scan NOT_PUBLISHED

Truncated to 40 + concise badge

Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
develocity-api-kotlin
publishDevelocityApiKotlinPublicationT…
8.7 Build Scan PUBLISHED
develocity-api-kotlin
publishDevelocityApiKotlinPublicationT…
8.7 Build Scan NOT_PUBLISHED

@bigdaz
Copy link
Member

bigdaz commented Apr 19, 2024

I like the reduced text in the badge. I think if we combine this with changing the column header to Build Scan we won't need to truncate further. (We could do more truncation, but it's not required to make the badge visible).

WDYT?

Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCentralReposito…
8.7 Build Scan PUBLISHED
develocity-api-kotlin
publishDevelocityApiKotlinPublicationToMavenCentralReposito…
8.7 Build Scan NOT_PUBLISHED

@bigdaz
Copy link
Member

bigdaz commented Apr 19, 2024

@gabrielfeo
Copy link
Contributor Author

Good idea about the  ! I can work on it :)

@bigdaz bigdaz linked a pull request Apr 25, 2024 that will close this issue
bigdaz added a commit that referenced this issue Apr 25, 2024
Improve readability of build scan when requested tasks is very long, as
agreed in #175. HTML diff for each case of job summary is clearer in
cd62d9c.

- Ensure a minimum size for the badge, at least the size of "Build
scan®", by preventing a line break with ` `
- Reduce the size of the badge by tweaking the inner text

Also fix a typo in the build shell script.
@bigdaz bigdaz added this to the v3.3.2 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers in:setup-gradle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants