lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
880 stars 62 forks source link

Do not trim the text in the list component (mobile) #437

Closed amrutadotorg closed 1 week ago

amrutadotorg commented 1 week ago

image

Hi. I would suggest to remove the trim option for the row contents in the card component (for mobile version). Attaching example.

Thank you

lovasoa commented 1 week ago

I don't think it shoud be the default, but we could have an option to wrap the text. Do you want to make a pr ?

amrutadotorg commented 1 week ago

How about introducing a top-level parameter wrap of type bool? If wrap is set to true, then all description & description_md parameters at both the top level and row level will be wrapped.

lovasoa commented 1 week ago

Yes, that would be good

amrutadotorg commented 1 week ago

Great. Do we have already a css class for that?

For example we could use it like that:

`{{#if description_md}} {{#if wrap}}

{{{markdown description_md}}}
{{else}}
    {{{markdown description_md}}}
{{/if}}`
lovasoa commented 1 week ago

Yes, we have the text-wrap class

image

amrutadotorg commented 1 week ago

thank you, I tired this, but it does not work. Have no other ideas.

{{#if title}}
    <h2 class="mt-3 mb-0">{{title}}</h2>
{{/if}}
{{#if description}}
    {{#if wrap}}
        <p class="text-wrap">{{description}}</p>
    {{else}}
        <p>{{description}}</p>
    {{/if}}
{{/if}}

Screenshot 2024-06-22 at 07 05 14

lovasoa commented 1 week ago

I implemented it

amrutadotorg commented 1 week ago

Ahh I modified card component instead of a list component:)