Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29659

Write table fixing XMLOutput in Jelly

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • None

      The config-ui-changes branch finally replaces the table-based form layout with DIV-based form layout. This is great, but some plugins have Jelly templates that generate table related tags. And they will break badly.

      Such misalignment will manifest as table related tags appearing incorrectly — such as <tr> inside <div>, <div> inside <table>, and so on. These tag structure violation is bad because browsers tend to "fix" them by moving around tags, which breaks form submission that depends on the DOM structure.

      The failure has two patterns:

      • they generate <tr> because they are expecting the fragment to go in the <table> context, in which case resulting HTML contains a bare <tr> under <div>.
      • the generate <table> and <st:include> other tags, which generate the new <div>s instead of <tr>s, in which case we get <div> directly inside <table> that gets bumped away.

      The matrix-auth plugin is the latter pattern. Oleg identified that envinject plugin and xunit plugin should be looked at, as those plugins have copied some core tags and modified them.

      To resolve this situation, write `XMLOutput` that inserts table related tags appropriately, so that the resulting DOM tree is always valid XHTML. The resulting UX might still have some margin and indentation messed up, but the form will be at least functional, thereby reducing the impact of the problem.

            kohsuke Kohsuke Kawaguchi
            kohsuke Kohsuke Kawaguchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: