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

Adding custom properties on master components in Figma Quick Controls templates

    XMLWordPrintable

Details

    Description

      This issue was originally started with https://bugreports.qt.io/browse/QDS-13688 .

      The starting point was that a user wanted to add a custom property to a main component defined in Figma Quick Control Templates, but it didn't work.

      In QDS-13688, some fixes were done in the Qt Bridge importer side, but there are still limitations described as below. To remove those limitaions, fixes in Qt Bridge for Figma side are considered to be necessary.

      • The behavior of custom properties is a bit erratic as the handling differs between regular and template components and it is different from what I would have expected. From what I have seen the custom properties from Qt Bridge:
        - if they are of  `property type something: somebinding` type they end up as
                - an invalid property `property type something: "somebinding"` for regular components (note the quotes),
                - a properly defined binding with wrong value (default for the type) for template components.
        - if they are of `property alias something: somebinding` type they end up as
                - a correct binding for regular components,
                - a binding change property (i.e. `something: somebinding`, the declaration part is missing) for template components, what is incorrect.
        This most likely happens at property parsing level somewhere long before style/template merging happens. Nonetheless, this is not in the ticket scope and from what I've seen there were no reports requesting fixes here.
      • Subsequently, the usage of templates and complete instance export introduced in Qt Bridge should not be used together and is expected to be erratic as they serve mostly the same function and only one should be used.
      • Lastly, using the `Alias` option with Template components seems quite difficult. If someone selects background rectangle as an aliased item, then the alias will only appear at `BasicButtonbackground` Component level and it will not be propagated to `BasicButton`. This is not limited to Template components but in my opinion it is more problematic here as a user has no control over all the internals of the items being generated.

       

      Attachments

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

        Activity

          People

            algerman Aleksei German
            hitoshiito Hitoshi Ito
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes