Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-4758

Separate users custom code from Designer's automatic code generation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 73.13
    • Fix Version/s: 73.20
    • Component/s: Studio Designer

      Description

      In Studio Designer, a single bundle.html file is currently used:

      • By Studio Designer itself to take into account changes made by users in the UI, like disabling default contributions
      • By users to add custom code

      These use cases should be separated in a clean way, so that Studio never touches user code, and so that users do not potentially break the configuration generated by Studio automatically.

      AC

      • In Studio Designer, a separate bundle.html file named [projectname]-custom-bundle.html is available
        • For a new project (initiated during project creation)
        • For an existing project
          • I am prompted about the change when visiting the bundle.html file if it does not reference that file already
            A separate bundle file can be created for you to put any custom code you want to deploy on top of Studio's automatically generated configuration.
            
            We recommend using it to make sure any customization you want to add remains untouched.
            [NOT NOW] [OK]
            
          • NOT NOW => don't create and browse bundle.html
          • OK => the file is created, I am taken to it

      Following steps assume the new file is created

      • The new file contains the following:
        <!-- 
        ***
        CUSTOM CODE SPACE
        ***
        Use this file to put any custom code you want to deploy on top of Studio's automatically generated configuration.
        
        This code will take precedence over Studio's automatically generated configuration.
        -->
        
      • In the existing bundle.html, the following is added on top of the file
        <!-- 
        ***
        STUDIO CODE SPACE
        ***
        Studio will use this file to generate your configuration. You may tweak it, but note that any configuration seen as invalid by Studio will automatically be removed.
        
        Should you wish to add custom code, we recommend using the [projectname]-custom-code-bundle.html file instead.
        -->
        
      • In the existing bundle.html, the following is removed
        <!-- Custom code -->
        <!-- Insert custom code -->
        
      • When deploying my project, code from both files is taken into account
      • When files contain conflicting code (e.g. studio bundle disables a contrib, custom one enables it) custom one wins

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days
                  4d