penpot icon indicating copy to clipboard operation
penpot copied to clipboard

Update library-file update individual overriden properties

Open Malte-Neu opened this issue 2 years ago • 9 comments

Steps To Reproduce

I have not been able to repro the problem from the beginning, but I have a file with which it occurs reproducibly.

  • Import the bug.penpot file: Bug.penpot.zip
  • Open "Wireframe Instance" and check under Assets->Libraries that there is no update.
  • Open "Wireframe Template" and change the position of the first artboard. Save and close the document.
  • Open "Wireframe Instance" again and the information about the update appears in the library. It should look like this: grafik
  • Click on Update the library --> oops and you see this: grafik

Component values have been overwritten and all the work from before is gone. And this although nothing was changed at the components, only at another place a text position was changed.

Expected behavior

Nothing has changed, because no component values have been changed. Even if the components would have changed, all individually overwritten parameters should remain the same.

Actual behavior

You should be able to see from the images what has happened.

Screenshots or video

No response

Desktop (please complete the following information)

Firefox 108.0.1

Smartphone (please complete the following information)

No response

Environment (please complete the following information)

Hosted Version https://design.penpot.app

Frontend Stack Trace

No response

Backend Stack Trace

No response

Additional context

No response

Malte-Neu avatar Jan 02 '23 15:01 Malte-Neu

Hello @Malte-Neu I tried to reproduce your problem: Follow my steps and tell me if you did something different.

  1. I had a library file with a component. This component is a rectangle with a text. Screenshot from 2023-01-03 09-50-09

  2. I import this library file into other and create 3 new elements with that component Screenshot from 2023-01-03 09-44-57

  3. I change the text of two of them and the color of one just to check Screenshot from 2023-01-03 09-45-37

  4. I went back to the library file and modified the main component Screenshot from 2023-01-03 09-46-16

  5. Then I updated my file with the library changes Screenshot from 2023-01-03 09-47-30

The color and texts changes remain, so I think this is ok.

But please tell me. Have your components nested components? Are your steps very different from mine?

EvaMarco avatar Jan 03 '23 08:01 EvaMarco

@EvaMarco it's not that simple. Like you, I have also tried it in a completely new project. Unfortunately, I did not succeed in finding a reproducible way. It has occurred, if I have changed even more like sizes and the whole several times. I also used color templates.

Please try it with my attached file. With it I could reproduce the error as I wrote it down.

Malte-Neu avatar Jan 03 '23 11:01 Malte-Neu

Hello @Malte-Neu: I've tried the same with your file.

  1. Added some standar labels Screenshot from 2023-01-04 09-26-19

  2. I went to library page and modify that label with background color and text Screenshot from 2023-01-04 09-27-32

  3. Come back to the file and and update label Before updating Screenshot from 2023-01-04 09-28-38

After updating Screenshot from 2023-01-04 09-28-47

As you can see I can not reproduce it eather, but we are going to check it more in deep.

EvaMarco avatar Jan 04 '23 08:01 EvaMarco

Look at the other values. The ±23.00 became 123.00 again from the library. And the width properties were also changed. grafik There the properties were overwritten although they should not have been changed at all. In my case, I did not even edit a used component, I just moved an independent text field.

Malte-Neu avatar Jan 04 '23 10:01 Malte-Neu

ohh what¡¡ you are right, I was only looking to the labels... my bad. We are going to check it in deep. I will maintain you informed.

Thanks for your patience

EvaMarco avatar Jan 04 '23 11:01 EvaMarco

Sorry, this is a bug affecting component sync of text layers inside components.

I have isolated it (at https://tree.taiga.io/project/penpot/issue/4646) and it's already fixed. This will work well in the next Penpot release.

Until then, you can avoid text layers to be reset by changing anything of their size or position (e.g. changing the text size to "auto width" or moving them a bit and then moving them again to the initial position). The bug was related to the "modified" detection. If you do so, they will be correctly marked as modified and will not be overwritten with the library update.

(BTW: sorry the update library popup currently appears for any change of the library, even moving around an unrelated board; we have in the roadmap to detect what have changed and to show the popup only if there are relevant changes).

hirunatan avatar Jan 05 '23 09:01 hirunatan

I'm glad to read that the bug was fixed quickly, I am looking forward to the new version. Is it possible to estimate when the deployment to penpot.app will happen?

Malte-Neu avatar Jan 05 '23 11:01 Malte-Neu

We are planing a release for the end of this month, but I'm not sure if It will be fixed sooner. Edit -> It's posible that this bug will be fixed by monday. :)

EvaMarco avatar Jan 05 '23 12:01 EvaMarco

Yes, we have planned a hotfix update on monday, and this bug will be included.

hirunatan avatar Jan 05 '23 12:01 hirunatan

Closing as this one is solved

myfunnyandy avatar Feb 15 '23 15:02 myfunnyandy