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

text-align of th elements in Stage View depends on whether there are graphs on the page

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      In the Stage View, the alignment of the column headers like "Declarative: Checkout SCM" changes depending on how many builds have completed.

      • If there is just one completed build and one in progress, then the column headers are centered. This comes from the browser default rule th { text-align: center; }.
      • If there are two or more completed builds, so that the page also contains a warnings trend chart and a test results trend chart, then the column headers are aligned to the left edge. This comes from the rule th { text-align: inherit; } in https://REDACTED/jenkins/static/a8fa6dd6/plugin/bootstrap5-api/css/bootstrap-custom-build.css

      In my opinion, bootstrap5-api should not be changing the styling of Jenkins components that are not deliberately using it.

          [JENKINS-66383] text-align of th elements in Stage View depends on whether there are graphs on the page

          Ulli Hafner added a comment -

          I don't remember why Felix added that part in the CSS file (see https://github.com/jenkinsci/bootstrap4-api-plugin/commit/739b8d8a2c089d98a8a6a996ce17bbd76d5dcbee).

          I think the risk to change it in BS5 is too high, I don't know what else will break. It should be much easier to provide the wanted alignment in the stage view plugin.  

           

          Ulli Hafner added a comment - I don't remember why Felix added that part in the CSS file (see https://github.com/jenkinsci/bootstrap4-api-plugin/commit/739b8d8a2c089d98a8a6a996ce17bbd76d5dcbee). I think the risk to change it in BS5 is too high, I don't know what else will break. It should be much easier to provide the wanted alignment in the stage view plugin.    

          Kalle Niemitalo added a comment - - edited

          Pipeline-stage-view-plugin currently includes a th { text-align: left; } rule in its embedded bootstrap-3.2.0. I wonder why that does not take effect.

          I suppose the maintainable fix would be to first replace this embedded bootstrap-3.2.0 with a dependency on bootstrap5-api-plugin and then add local styling to center the table headers.

          Kalle Niemitalo added a comment - - edited Pipeline-stage-view-plugin currently includes a th { text-align: left; } rule in its embedded bootstrap-3.2.0 . I wonder why that does not take effect. I suppose the maintainable fix would be to first replace this embedded bootstrap-3.2.0 with a dependency on bootstrap5-api-plugin and then add local styling to center the table headers.

          The generated org/jenkinsci/pipeline/stageview_adjunct.css does not include the th { text-align: left; } rule because ui/src/main/less/bootstrap.less does not import "bootstrap-3.2.0/tables".

          Kalle Niemitalo added a comment - The generated org/jenkinsci/pipeline/stageview_adjunct.css does not include the th { text-align: left; } rule because ui/src/main/less/bootstrap.less does not import "bootstrap-3.2.0/tables".

            Unassigned Unassigned
            kon Kalle Niemitalo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: