Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-374

Plugin site seems to remove all tables from wiki output, not just the stats one

    Details

    • Similar Issues:

      Description

      https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin now has tables for the changelog.

      https://plugins.jenkins.io/blueocean doesn't show them.

      Hypothesis: Over-eager removal of all tables when we really only want to remove the macro-provided statistics table that's typically on top.

        Attachments

          Issue Links

            Activity

            danielbeck Daniel Beck created issue -
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck - My suspicion here is more Confluence macro magic stuff happening that the server can't do since it's client-side in the browser.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck - My suspicion here is more Confluence macro magic stuff happening that the server can't do since it's client-side in the browser.
            Hide
            danielbeck Daniel Beck added a comment -

            Michael McCaskill That was before; now I can curl and get the tables that are missing on the plugin site.

            Show
            danielbeck Daniel Beck added a comment - Michael McCaskill That was before; now I can curl and get the tables that are missing on the plugin site.
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck Ok great. I'll investigate now. Thanks.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck Ok great. I'll investigate now. Thanks.
            mmccaskill Michael McCaskill made changes -
            Field Original Value New Value
            Status To Do [ 10003 ] In Progress [ 3 ]
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck - You were correct. The wiki scraping was too aggressive. However, there's still some UI work that needs to be done. I've attached a screenshot of what it looks like.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck - You were correct. The wiki scraping was too aggressive. However, there's still some UI work that needs to be done. I've attached a screenshot of what it looks like.
            mmccaskill Michael McCaskill made changes -
            Hide
            danielbeck Daniel Beck added a comment -

            Well, it looks like a table with stuff in it to me

            Some CSS for padding etc. perhaps, should be fairly straightforward. Alternatively, consider stealing some more from the wiki CSS – e.g. see also in the neighboring issue by Cyrille on how the code block in another plugin's doc looks.

            Show
            danielbeck Daniel Beck added a comment - Well, it looks like a table with stuff in it to me Some CSS for padding etc. perhaps, should be fairly straightforward. Alternatively, consider stealing some more from the wiki CSS – e.g. see also in the neighboring issue by Cyrille on how the code block in another plugin's doc looks.
            Hide
            mmccaskill Michael McCaskill added a comment -

            I'm no CSS Ninja™® but I'll make an attempt at it and post a screenshot here of the results.

            Show
            mmccaskill Michael McCaskill added a comment - I'm no CSS Ninja™® but I'll make an attempt at it and post a screenshot here of the results.
            mmccaskill Michael McCaskill made changes -
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck - So I hacked it by inserting the batch.css into the header.hbs

            <link type="text/css" rel="stylesheet" href="https://wiki.jenkins.io/s/f68dfafb2b4588f7b31742327b4469ae-CDN/en_GB/6441/82994790ee2f720a5ec8daf4850ac5b7b34d2194/be65c4ed0984ca532b26983f5fc1813e/_/download/contextbatch/css/_super/batch.css?atlassian.aui.raphael.disabled=true" data-wrm-key="_super" data-wrm-batch-type="context" media="all">
            

            But I don't know if that CSS is specific for that page or if the link should be considered permanent.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck - So I hacked it by inserting the batch.css into the header.hbs <link type="text/css" rel="stylesheet" href="https://wiki.jenkins.io/s/f68dfafb2b4588f7b31742327b4469ae-CDN/en_GB/6441/82994790ee2f720a5ec8daf4850ac5b7b34d2194/be65c4ed0984ca532b26983f5fc1813e/_/download/contextbatch/css/_super/batch.css?atlassian.aui.raphael.disabled=true" data-wrm-key="_super" data-wrm-batch-type="context" media="all"> But I don't know if that CSS is specific for that page or if the link should be considered permanent.
            mmccaskill Michael McCaskill made changes -
            Remote Link This issue links to "UI PR (Web Link)" [ 17205 ]
            mmccaskill Michael McCaskill made changes -
            Remote Link This issue links to "REST API PR (Web Link)" [ 17206 ]
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck - I linked the PRs if you want to take a look. I'm not necessarily asking for this solution to be accepted but rather as a means to demonstrate how I "fixed" it.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck - I linked the PRs if you want to take a look. I'm not necessarily asking for this solution to be accepted but rather as a means to demonstrate how I "fixed" it.
            orrc Christopher Orr made changes -
            Link This issue is duplicated by INFRA-1265 [ INFRA-1265 ]
            mmccaskill Michael McCaskill made changes -
            Link This issue relates to WEBSITE-356 [ WEBSITE-356 ]
            mmccaskill Michael McCaskill made changes -
            Status In Progress [ 3 ] Done [ 10004 ]
            Resolution Fixed [ 1 ]
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status Done [ 10004 ] To Do [ 10003 ]
            Hide
            danielbeck Daniel Beck added a comment - - edited

            Reopening this as it seems that currently, at least for some wiki pages, no tables are getting removed: https://plugins.jenkins.io/mesos includes the full "Plugin Information" table.

            Is there an implied assumption that an "excerpt" element is the first element of the page, or similar?

            FWIW I may soon rewrite the wiki macro to just point to the plugins.jenkins.io URL, if that needs to be finished before a solution can be found here, please let me know.

            Show
            danielbeck Daniel Beck added a comment - - edited Reopening this as it seems that currently, at least for some wiki pages, no tables are getting removed: https://plugins.jenkins.io/mesos includes the full "Plugin Information" table. Is there an implied assumption that an "excerpt" element is the first element of the page, or similar? FWIW I may soon rewrite the wiki macro to just point to the plugins.jenkins.io URL, if that needs to be finished before a solution can be found here, please let me know.
            Hide
            mmccaskill Michael McCaskill added a comment -

            So I've noticed in the Mesos page the <span> I'm searching for is inside of a <p> whereas in other places there's not a <p>. I could try attempting to detect for the <p> as well but not sure how complete of a fix it is.

            Show
            mmccaskill Michael McCaskill added a comment - So I've noticed in the Mesos page the <span> I'm searching for is inside of a <p> whereas in other places there's not a <p>. I could try attempting to detect for the <p> as well but not sure how complete of a fix it is.
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck This still looks mostly correct to me. The only remaining item is the section under 1.1.7 (August 11th 2017). It's red and the state doesn't update. I don't see any console errors locally so not sure what's going there.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck This still looks mostly correct to me. The only remaining item is the section under 1.1.7 (August 11th 2017). It's red and the state doesn't update. I don't see any console errors locally so not sure what's going there.
            Hide
            danielbeck Daniel Beck added a comment -

            Michael McCaskill Don't worry about that in this context, that's a wiki macro with JS that doesn't work on the plugin site (topic of a different thread).

            But the Mesos plugin (my comment above) still shows the full table, so I reopened, as that's related to this issue.

            Show
            danielbeck Daniel Beck added a comment - Michael McCaskill Don't worry about that in this context, that's a wiki macro with JS that doesn't work on the plugin site (topic of a different thread). But the Mesos plugin (my comment above) still shows the full table, so I reopened, as that's related to this issue.
            Hide
            mmccaskill Michael McCaskill added a comment - - edited

            Daniel Beck Ok let me run locally to see if I can fix the Mesos plugin. Thanks.

             

            Yeah it's still there because the table comes after the h4 whereas in other plugins it's all inside of a span.

            Show
            mmccaskill Michael McCaskill added a comment - - edited Daniel Beck Ok let me run locally to see if I can fix the Mesos plugin. Thanks.   Yeah it's still there because the table comes after the h4 whereas in other plugins it's all inside of a span.
            Hide
            danielbeck Daniel Beck added a comment -
            Show
            danielbeck Daniel Beck added a comment - Another example: https://plugins.jenkins.io/vectorcast-execution
            mmccaskill Michael McCaskill made changes -
            Status To Do [ 10003 ] In Progress [ 3 ]
            Hide
            mmccaskill Michael McCaskill added a comment -

            Daniel Beck So I've narrowed some use cases that I want to get your opinion.

            <span class="conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup">
            <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4>
            </span>
            
            <span class="conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup"></span>
            <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4>
            
            <p>
            <spanclass="conf-macro output-inline"data-hasbody="true"data-macro-name="unmigrated-inline-wiki-markup">
            <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4>
            </span>
            </p>
            

            The new algorithm is simply checking for the h4 specifically with Project Information and removing it so the span isn't being used. The only other thing is the table with all of the plugin information. Sometimes it's inside of the span, sometimes not. Not sure if we know if every plugin has one of these tables. If so it might be reasonable to assume removing the first table with class "confluenceTable" will work.

            Show
            mmccaskill Michael McCaskill added a comment - Daniel Beck So I've narrowed some use cases that I want to get your opinion. <span class="conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup"> <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4> </span> <span class="conf-macro output-inline" data-hasbody="true" data-macro-name="unmigrated-inline-wiki-markup"></span> <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4> <p> <spanclass="conf-macro output-inline"data-hasbody="true"data-macro-name="unmigrated-inline-wiki-markup"> <h4><a name="GitPlugin-PluginInformation"></a>Plugin Information</h4> </span> </p> The new algorithm is simply checking for the h4 specifically with Project Information and removing it so the span isn't being used. The only other thing is the table with all of the plugin information. Sometimes it's inside of the span, sometimes not. Not sure if we know if every plugin has one of these tables. If so it might be reasonable to assume removing the first table with class "confluenceTable" will work.
            Hide
            danielbeck Daniel Beck added a comment -

            Not sure if we know if every plugin has one of these tables.

            Since the macro is optional, I expect there will be plugins without.

            If so it might be reasonable to assume removing the first table with class "confluenceTable" will work.

            Some plugin wiki pages have content above the macro table, so that wouldn't work.

            I'll simplify the macro output first, then we'll take another stab at this.

            Show
            danielbeck Daniel Beck added a comment - Not sure if we know if every plugin has one of these tables. Since the macro is optional, I expect there will be plugins without. If so it might be reasonable to assume removing the first table with class "confluenceTable" will work. Some plugin wiki pages have content above the macro table, so that wouldn't work. I'll simplify the macro output first, then we'll take another stab at this.
            Hide
            danielbeck Daniel Beck added a comment -

            Michael McCaskill PTAL https://github.com/jenkins-infra/backend-jenkins-plugin-info-plugin/pull/18 for what I hope future output looks like. It's just a table cell with mostly fixed content (plus warnings and adopt-a-plugin messages as today). No "Plugin Information" title anymore.

            Show
            danielbeck Daniel Beck added a comment - Michael McCaskill PTAL https://github.com/jenkins-infra/backend-jenkins-plugin-info-plugin/pull/18 for what I hope future output looks like. It's just a table cell with mostly fixed content (plus warnings and adopt-a-plugin messages as today). No "Plugin Information" title anymore.
            danielbeck Daniel Beck made changes -
            Assignee Michael McCaskill [ mmccaskill ] Daniel Beck [ danielbeck ]
            Show
            danielbeck Daniel Beck added a comment - I think between https://github.com/jenkins-infra/plugin-site-api/pull/47 https://github.com/jenkins-infra/plugin-site-api/pull/48 and https://github.com/jenkins-infra/plugin-site-api/pull/49 this is done.
            danielbeck Daniel Beck made changes -
            Status In Progress [ 3 ] Done [ 10004 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                danielbeck Daniel Beck
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: