• We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      We need ability to specify columns with their widths, e.g.
      columns=key:10%,description:70%,resolution:20%

      or alternatively in pixel
      columns=key:100,description:600,resolution:200

      Idea is that same will be passed onto the JavaScript implementing the grid display and also into the PDF Exporter.

            [CONFSERVER-23286] JIRA Issues Macro ability to pass column widths

            Sen made changes -
            Workflow Original: JAC Suggestion Workflow 4 [ 3574650 ] New: JAC Suggestion Workflow 3 [ 4337984 ]

            Robert Louie added a comment - - edited

            Confluence 6.13.4

            To build off of David May's post. We had to target a specific class and not just the table:

            <style>
            .jira-macro-table-underline-pdfexport:nth-child(4) {
             max-width: 400px;
             overflow: hidden;
             white-space: wrap;
            }
            </style>
            

            You can still specify a specific Jira issues macro like David mentioned if you'd like:

            #issue-macro-1 .jira-macro-table-underline-pdfexport:nth-child(4) {max-width: 400px;}
            

            Just remember to place the HTML macros around your Jira Issues macro:

            html
            <div id="issue-macro-1">
            

            <JIRA ISSUES MACRO>

            HTML
            </div>
            

            Robert Louie added a comment - - edited Confluence 6.13.4 To build off of David May's post. We had to target a specific class and not just the table: <style> .jira-macro-table-underline-pdfexport:nth-child(4) { max-width: 400px; overflow: hidden; white-space: wrap; } </style> You can still specify a specific Jira issues macro like David mentioned if you'd like: #issue-macro-1 .jira-macro-table-underline-pdfexport:nth-child(4) {max-width: 400px;} Just remember to place the HTML macros around your Jira Issues macro: html <div id= "issue-macro-1" > < JIRA ISSUES MACRO > HTML </div>
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow 2 [ 3179225 ] New: JAC Suggestion Workflow 4 [ 3574650 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]

            David May added a comment - - edited

            [We are using Confluence 6.8.1]

            Prerequisite: Confluence HTML macro.

            You can do all kinds of things with simple css in an HTML macro 

            <style>
              div.jira-issues table td { padding: 4px 10px !important; }                // Make rows narrow
              div.jira-issues table th { white-space: nowrap; }                         // Don't let header title wrap
              div.jira-issues table td:not(:last-child) { white-space: nowrap; }        // nowrap for all non-last col
              div.jira-issues table th:last-child { width: 50% !important; }            // Expand last col to fit rest of width
              div.jira-issues table tr.rowAlternate { background: #F3F5F7 !important; } // Zebra stripes
            </style>
            

            You would need to add a javascript section to apply specific widths based on the name of the column and that's problematic since the macro load time is delayed and there is not AJS trigger to let you know when a specific Jira Issues macro is fully loaded. However, if you are ok explicitly specifying the columns by number, then you can accomplish it easily with
            I'm using !important just so that I win a specificity battle with the confluence/macro-native css definitions. It may not be necessary.

            <style>
             div.jira-issues table th:nth-child(1) { width: 10%; } 
             div.jira-issues table th:nth-child(2) { width: 200px; } 
             div.jira-issues table th:nth-child(3) { width: 30%; } 
            </style>
            

            If you need to have different once for different Jira macros, then you'll need to put HTML macros above and below each Jira issue macro with <div id="issue-macro-1"> and </div> then prefix the above lines in the <script> with #issue-macro-1. e.g., 

            #issue-macro-1 div.jira-issues table th:nth-child(1) { width: 50%; }
            

            issue-macro-1 can be any string you want and you can have as many different ones as you like.

            David May added a comment - - edited [We are using Confluence 6.8.1] Prerequisite: Confluence HTML macro. You can do all kinds of things with simple css in an HTML macro  <style>   div.jira-issues table td { padding : 4px 10px !important ; }                // Make rows narrow   div.jira-issues table th { white-space : nowrap; }                          // Don't let header title wrap   div.jira-issues table td :not ( :last-child ) { white-space : nowrap; }        // nowrap for all non-last col   div.jira-issues table th :last-child { width : 50% !important ; }            // Expand last col to fit rest of width   div.jira-issues table tr.rowAlternate { background : #F3F5F7 !important ; } // Zebra stripes </style> You would need to add a javascript section to apply specific widths based on the name of the column and that's problematic since the macro load time is delayed and there is not AJS trigger to let you know when a specific Jira Issues macro is fully loaded. However, if you are ok explicitly specifying the columns by number, then you can accomplish it easily with I'm using !important just so that I win a specificity battle with the confluence/macro-native css definitions. It may not be necessary. <style> div.jira-issues table th :nth-child (1) { width : 10%; }  div.jira-issues table th :nth-child (2) { width : 200px; }  div.jira-issues table th :nth-child (3) { width : 30%; } </style> If you need to have different once for different Jira macros, then you'll need to put HTML macros above and below each Jira issue macro with <div id="issue-macro-1"> and </div> then prefix the above lines in the <script> with #issue-macro-1. e.g.,  #issue -macro-1 div.jira-issues table th :nth-child (1) { width : 50%; } issue-macro-1 can be any string you want and you can have as many different ones as you like.
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3038565 ] New: JAC Suggestion Workflow 2 [ 3179225 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing v4 [ 2536101 ] New: JAC Suggestion Workflow [ 3038565 ]
            Rachel Lin (Inactive) made changes -
            Workflow Original: Confluence Workflow - Public Facing v3 [ 2299577 ] New: Confluence Workflow - Public Facing v4 [ 2536101 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing v3 - TEMP [ 2195889 ] New: Confluence Workflow - Public Facing v3 [ 2299577 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing v3 [ 1920852 ] New: Confluence Workflow - Public Facing v3 - TEMP [ 2195889 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing v2 [ 1758929 ] New: Confluence Workflow - Public Facing v3 [ 1920852 ]

              Unassigned Unassigned
              c8b69c0f0c51 Pavel Smirnov
              Votes:
              15 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: