cncf / landscapeapp

🌄Upstream landscape generation application
https://landscapes.dev/
Apache License 2.0
255 stars 125 forks source link

Enable multiline badge text banner and 'Project' line in card #832

Closed jmertic closed 2 years ago

jmertic commented 2 years ago

First request, let the next under the badges be multiline; see image below for where I'm talking about. Ideally that text would change to 'Technical Project\nIncubation'

Screen Shot 2022-07-14 at 7 40 05 AM

Second, notice the text for 'LF Energy Technical Project' cuts off as it's too long. Would be great for it to not cut off or wrap perhaps.

Screen Shot 2022-07-14 at 7 40 15 AM
AndreyKozlov1984 commented 2 years ago

Well, I'll have to take a look at that, certainly. We generate all pages during the build time, so the plan is to run a Chrome in the background, calculate the text size and make a word wrap if necessary.

jmertic commented 2 years ago

Hey @AndreyKozlov1984 - any updates on this?

AndreyKozlov1984 commented 2 years ago

Ok, focusing on this task now

AndreyKozlov1984 commented 2 years ago

@jmertic

image

I support the big_picture_label like : Early Adoption - Incubation, the rule is simple - if there are more than 20 symbols I make it 2 lines, now when it is multiline - if - is present in the label, I replace it with a new line, otherwise word wrap happens automatically

jmertic commented 2 years ago

Awesome - thank you @AndreyKozlov1984! That looks awesome!

Can you do something similar on the cards themselves?

AndreyKozlov1984 commented 2 years ago

With cards it looks complicated, my best approach would be to treat ' - ' as a line break. If we can agree that multiline is triggered by the presence of ' - ' in the text and that is replace with a new line, then yeah, I can get it working

AndreyKozlov1984 commented 2 years ago

On your screenshot it is basically not enough space, even for a multiline

jmertic commented 2 years ago

On Wed, Aug 17, 2022 at 7:38 AM Andrey Kozlov @.***> wrote:

On your screenshot it is basically not enough space, even for a multiline

— Reply to this email directly, view it on GitHub https://github.com/cncf/landscapeapp/issues/832#issuecomment-1217895210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACIOIPSCFBXZPM5G7MMEA3VZTFMFANCNFSM53R6Z24A . You are receiving this because you were mentioned.Message ID: @.***>

-- Thank you,

John Mertic Director of Program Management - Linux Foundation ASWF, LF Energy, and Open Mainframe Project @.*** +1 234-738-4571 Schedule time with me at https://meetings.hubspot.com/jmertic

jmertic commented 2 years ago

On your screenshot it is basically not enough space, even for a multiline

Hmm - what other options do I have then? Could we have the badge two lines with line one the title and line two the text?

jmertic commented 2 years ago

Checking back in @AndreyKozlov1984 - seeing if you thought about my earlier comment and had any suggestions.

AndreyKozlov1984 commented 2 years ago

Yes, multiline seems fine, I am a concerned with automatic detection of multiline, thus the label should somehow contain the information that we need to make it multiline. Maybe "!" or "..." or "-" on the end,

image image

@jmertic That one is possible for this tag, just I need to have a clear way to see that multiline is necessary, like "-" in the text. I thought about a total number of characters, but that seems to be unreliable.

AndreyKozlov1984 commented 2 years ago

My proposal is that " - " in the value would mean we want a multiline. And, say, over 30 characters either in the name or in the value. Is this good ?

jmertic commented 2 years ago

Love it! Thanks @AndreyKozlov1984

AndreyKozlov1984 commented 2 years ago

Ok, I am pushing the change at this moment, the criteria is over 30 characters or "-" in the value, works well for LF-Energy

I will ping you when this is deployed to production

jmertic commented 2 years ago

Thank you!

On Thu, Sep 1, 2022 at 9:51 AM Andrey Kozlov @.***> wrote:

Ok, I am pushing the change at this moment, the criteria is over 30 characters or "-" in the value, works well for LF-Energy

I will ping you when this is deployed to production

— Reply to this email directly, view it on GitHub https://github.com/cncf/landscapeapp/issues/832#issuecomment-1234311130, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACIOIP4RM5XAA2W3V6ERFTV4CYE3ANCNFSM53R6Z24A . You are receiving this because you were mentioned.Message ID: @.***>

AndreyKozlov1984 commented 2 years ago

Done!

image
jmertic commented 2 years ago

Awesome! I am seeing some alignment issues in my deploy preview below...

https://deploy-preview-565--lfenergy.netlify.app/?selected=carbon-data-specification-consortium-cdsc

Can you take a quick peek?

AndreyKozlov1984 commented 2 years ago

Done, I have updated the landscapeapp.

jmertic commented 2 years ago

Awesome - thank you @AndreyKozlov1984 !