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

Fix Table Editor not persisting changes when using an alternative code formatting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.16.0
    • Fix Version/s: 3.19.0
    • Component/s: Studio Designer

      Description

      Steps to reproduce:
      1. In Modeler, create a pp Page Provider.
      2. In Designer, configure the results layout for pp.
      3. Switch to code.
      4. At the end of the template, instead of closing nuxeo-data-table and nuxeo-results in different lines:

        </nuxeo-data-table>
      </nuxeo-results>
      

      Change it so they close in the same line:

      </nuxeo-data-table></nuxeo-results>
      

      5. Save.
      6. Switch to view.
      7. Edit the table.
      8. Switch to Table Editor.
      9. Notice how changes are no longer persisted in this editor. Not only that, the editor won't give you any feedback that it isn't saving your work, you'll only notice it once you try to open the Table Editor later. When checking the browser console, there are several instances of Uncaught (in promise) TypeError: Cannot read property 'nodeName' of undefined.

      Why is this problem relevant?
      Allowing users to switch to code to make changes in the layout can introduce this sort of problems. For the provided reproduction steps, the changes in the layout don't really change it's structure, but are enough to break the editor. We have to keep in mind that users might want to use a formatting structure that is different than what we currently support.

      What can we do?
      For now, the purpose of this ticket is to understand if something can be done in order to properly parse the HTML, regardless of formatting. If that cannot be achieved, when the HTML can't be parsed properly, a message should be shown to the user, warning him/her that there's something wrong.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 6 hours, 30 minutes
                  6h 30m