Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-4856

[Figma Bridge] Export/Import breaks if the main Component is deleted while instances exist

    XMLWordPrintable

Details

    • ec760a67a (master), 529cec0e2 (3.9)
    • QDS Berlin - 2022 Week 49-52

    Description

      Context

      Figma has the concept of reusable Components (https://www.figma.com/blog/components-in-figma/ ). Users can right-click a Component's instance and navigate to the main Component (figma-go-to-main-component.png )

      Users are allowed to delete the main Component even if instances exist. When this happens, the Figma project remains valid. The instances remember information about main Component and allow the user to re-generate the deleted main Component (figma-restore-main-component.png )

      Steps to Reproduce Issue

      1. Load the attached Figma project – it consists of 1 Frame ("Banner") that contains 3 instances of a Component ("Triangle") (ComponentExportStudy.fig )
      2. Go to the Symbols page and delete the "Triangle" Component
      3. Export the "Banner" in Page 1 and import it into Qt Design Studio

       

      Issues

      • When exporting, the Triangle image silently fails to be exported.
      • When importing, there is an obscure error message, "QML type cannot be resolved. Generated QML might not work properly. Component: Banner" (qtds-import-missing-components.png). This is bad for multiple reasons:
        • The user is only told that there is something wrong with Banner; they are not told that the Triangle is the culprit.
        • The term "Component" is overloaded in this context (QML Component vs. Figma Component)

       

      Workaround

      [Right click] > "Main component" > "Restore main component" (figma-restore-main-component.png ) makes the export work again.

       

      Suggestions

      When exporting, Qt Bridge for Figma should check if the main Component still exists.

      If the main Component is missing, the Bridge should try to extract the Component's details from the existing instances.

      If this is not possible from the Figma API, then the Bridge should at least flag that the export has failed, alert the user, and specify the IDs of the items which failed to export.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              algerman Aleksei German
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes