dustinmoris / CI-BuildStats

Little widget to display AppVeyor, TravisCI, CircleCI, GitHub Actions or Azure Pipelines build history charts and other SVG badges.
https://buildstats.info
GNU General Public License v2.0
171 stars 25 forks source link

Consider Fixed Width badges #22

Closed cleemullins closed 6 years ago

cleemullins commented 6 years ago

As the download counts of packages get wider, it causes overall width to change. This makes tables of these look jagged.

Consider a "Fixed width" or a "Padded Width" or "Normalize To" as an option.

image

An easy answer may simply be parameters for width for 2 two variable fields:

downloadCountWidth=500px
versionWidth=300px

The downloadCountWidth would let me deal with packages that have low (or high) counts. The versionWidth would let me deal with the version labels like "-preview", "-daily", and so on.

For example, something like: [![BotBuilder Badge](https://buildstats.info/myget/botbuilder/botbuilder-v4-dotnet-daily/Microsoft.Bot.Builder.AI.LUIS?includePreReleases=true&downloadCountWidth=500px&versionWidth=300px)](https://botbuilder.myget.org/feed/botbuilder-v4-dotnet-daily/package/nuget/Microsoft.Bot.Builder.AI.LUIS)

dustinmoris commented 6 years ago

What would you expect to happen with text which overflows the set width? Should it be simply cut off or would you prefer it to end with an ellipsis (which then would reduce even more of the version/download text)?

cleemullins commented 6 years ago

Personally I think the ellipse is good, as it provides a visual indicator that I need to widen it.

... but I have no data to back this up as the “right” choice.

Another option would be “min width” and if it needs to be wider, then so be it. For me, this would be fine.


From: Dustin Moris Gorski notifications@github.com Sent: Tuesday, October 16, 2018 3:02 PM To: dustinmoris/CI-BuildStats Cc: Chris Mullins; Author Subject: Re: [dustinmoris/CI-BuildStats] Consider Fixed Width badges (#22)

What would you expect to happen with text which overflows the set width? Should it be simply cut off or would you prefer it to end with an ellipsis (which then would reduce even more of the version/download text)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdustinmoris%2FCI-BuildStats%2Fissues%2F22%23issuecomment-430416903&data=02%7C01%7Ccmullins%40microsoft.com%7C5286aaa780154e8e57c708d633b30e40%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636753241468292836&sdata=L%2BwEmB%2BslX07MXlBGIPnxhWJSFLA9nNrQIh8hUKlrIE%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABHICessxRfkZ4OMu8W1cz0SBk-f6V-8ks5ulldwgaJpZM4XaYVs&data=02%7C01%7Ccmullins%40microsoft.com%7C5286aaa780154e8e57c708d633b30e40%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636753241468302845&sdata=hB6yQo61msDEfxUhCFnb1DDb%2FO6jwyQjUcXceUBjq0A%3D&reserved=0.

dustinmoris commented 6 years ago

Hi @cleemullins, sorry for the slight delay, I've just pushed a new version which supports the following two query parameters: vWidth and dWidth. Both accept an integer value which represents the pixel amount.

You can do this now:

https://buildstats.info/myget/botbuilder/botbuilder-v4-dotnet-daily/Microsoft.Bot.Builder.AI.LUIS?includePreReleases=true&vWidth=150&dWidth=50

I haven't added the ellipsis yet, but hope this addresses your current requirements enough for now.

Rendered result:

BotBuilder Badge

cleemullins commented 6 years ago

Thanks Dustin! I just asked @godsanchez to integrate this now. : )