divriots / story-to-design

Keep your Figma libraries true-to-code in a single click.
https://story.to.design
26 stars 0 forks source link

New component issue report / Text Horizontal Resize #162

Closed Riandan closed 2 months ago

Riandan commented 3 months ago

Describe the problem

I'm working on syncing a basic card component into Figma, and everything resizes well except for the text. It doesn't stretch with the rest of the content; instead, it stays the same width, which causes it to overflow its container. I'm trying to figure out if I'm missing a step in my code that signals the plugin to adjust the text for Horizontal Resize to 'Fill' instead of 'Hug', or is this a constraint of the tool itself?

Screenshot of figma: image

My basic component:


type CardScratchProps = {
    title: string;
    description: string;
    imageUrl: string;
};

export const CardScratch: React.FC<CardScratchProps> = ({ title, description, imageUrl }) => {
    return (
        <div className="self-stretch bg-white rounded-lg shadow border border-gray-200 flex-col justify-start items-start">
            <div className="p-6 flex-col justify-start items-start gap-3">
                <div className="flex-col justify-start items-start gap-2">
                    <p className="text-gray-900 text-2xl font-bold leading-[30px]">{title}</p>
                    <p className="text-gray-500 text-base font-normal leading-normal flex-wrap">{description}</p>
                </div>
            </div>
        </div>
    );
};

Bug report identity: Please do not edit

Task path: o2cjuvRy2GAjx6T0gSSr/IBMamgEWJNXRvr2fMSKZ/12o29lc12nri5t

muryoh commented 3 months ago

Hi @Riandan, sorry for the delay!

It does seem to be a limitation in the product at the moment Looking into it!

Cheers Remy

muryoh commented 2 months ago

We just fixed it internally, it will be released soon 👍

Riandan commented 2 months ago

Cheers for that 👍

muryoh commented 2 months ago

Hi @Riandan ! We released a new patch today that should contain the fix, hope it helps!

Cheers Remy

Riandan commented 2 months ago

Hi @muryoh, Cheers for helping on this. I've just booted up and imported the component again and it seems to still be displaying the same behavior. That is the text has the Horizontal resizing of Hug instead of Fill, so when I resize the component all through the container for the text resizes correctly the actual text overspills. Is there something that I am missing? Is there some sort of process I need to do to update my plugin? 🤔

image

muryoh commented 2 months ago

Could you try hitting the Reprocess option on your component? 🤞

image

Riandan commented 2 months ago

Ahh! Works great, thankyou 👍

muryoh commented 2 months ago

Amazing - sorry, I should have mentioned it 👍