Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1211

Alloy: Add support ENV and DIST conditions in XML and TSS

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Runtime, Styling
    • Labels:
    • Environment:

      master

    • Story Points:
      8

      Description

      To complete the consistency in the options for conditional code in controllers, config.json, views and styles, I'd like to ask for support for ENV and DIST conditions in XML and TSS.

      Example use case

      A feedback button you only want to show in ad-hoc builds and not in store-builds.

      Examples

      index.tss

      "#feedback[env=production]": {
        visible: false
      }
       
      "#rate[dist=store]": {
        visible: true
      }
      

      index.xml

      <Alloy>
        <Button env="production">Feedback</Button>
        <Button dist="store">Rate</Button>
      </Alloy>
      

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration