Making WordPress.org

Changeset 11614


Ignore:
Timestamp:
02/25/2022 06:41:30 AM (2 years ago)
Author:
dd32
Message:

Trac: Don't apply the mobile table styles to tables in oEmbed embeds.

See https://make.wordpress.org/meta/2022/02/24/meta-trac-ticket-focus-feb-24/
See #4917.

Location:
sites/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/trac/oembed/index.php

    r11600 r11614  
    173173        $remove_tags[] = 'h1';
    174174        $remove_tags[] = 'h2';
     175        $remove_tags[] = 'div.paging';
    175176        break;
    176177}
     
    258259    function send() {
    259260        window.parent.postMessage( {
    260             height: Math.max( document.getElementsByTagName('html')[0].offsetHeight, document.documentElement.clientHeight ),
     261            height: Math.max( document.getElementsByTagName('html')[0].offsetHeight, document.documentElement.offsetHeight ),
    261262            el: id
    262263        }, '*' );
     
    279280$doc->getElementsByTagName( 'head' )[0]->appendChild( $doc->createElement( 'style', $css ) );
    280281
     282// Finally add a CSS class to target.
     283$body = $doc->getElementsByTagName( 'body' )[0];
     284$body->setAttribute( 'class', $body->getAttribute( 'class' ) . ' is-oembed' );
     285
    281286$data = $doc->saveHTML();
    282287
  • sites/trunk/trac.wordpress.org/templates/site.html

    r11612 r11614  
    55
    66<?python
    7     scripts_version = '167'
     7    scripts_version = '168'
    88    project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0]
    99    wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/'
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.css

    r11611 r11614  
    20942094        padding-left: 22px;
    20952095    }
    2096     .listing.tickets th,
    2097     .listing.tickets td {
     2096    body:not(.is-oembed) .listing.tickets th,
     2097    body:not(.is-oembed) .listing.tickets td {
    20982098        display: block;
    20992099    }
    2100     .listing.tickets thead th,
    2101     .listing.tickets tbody .trac-columns th {
     2100    body:not(.is-oembed) .listing.tickets thead th,
     2101    body:not(.is-oembed) .listing.tickets tbody .trac-columns th {
    21022102        display: inline-block;
    21032103    }
    2104     .listing.tickets tbody tr td.id::before,
    2105     .listing.tickets tbody tr td.ticket::before {
     2104    body:not(.is-oembed) .listing.tickets tbody tr td.id::before,
     2105    body:not(.is-oembed) .listing.tickets tbody tr td.ticket::before {
    21062106        content: "Ticket: ";
    21072107    }
    2108     .listing.tickets tbody tr td.summary::before {
     2108    body:not(.is-oembed) .listing.tickets tbody tr td.summary::before {
    21092109        content: "Summary: ";
    21102110    }
    2111     .listing.tickets tbody tr td.status::before {
     2111    body:not(.is-oembed) .listing.tickets tbody tr td.status::before {
    21122112        content: "Status: ";
    21132113    }
    2114     .listing.tickets tbody tr td.resolution::before {
     2114    body:not(.is-oembed) .listing.tickets tbody tr td.resolution::before {
    21152115        content: "Resolution: ";
    21162116    }
    2117     .listing.tickets tbody tr td.owner::before {
     2117    body:not(.is-oembed) .listing.tickets tbody tr td.owner::before {
    21182118        content: "Owner: ";
    21192119    }
    2120     .listing.tickets tbody tr td.type::before {
     2120    body:not(.is-oembed) .listing.tickets tbody tr td.type::before {
    21212121        content: "Type: ";
    21222122    }
    2123     .listing.tickets tbody tr td.priority::before {
     2123    body:not(.is-oembed) .listing.tickets tbody tr td.priority::before {
    21242124        content: "Priority: ";
    21252125    }
    2126     .listing.tickets tbody tr td.milestone::before {
     2126    body:not(.is-oembed) .listing.tickets tbody tr td.milestone::before {
    21272127        content: "Milestone: ";
    21282128    }
    2129     .listing.tickets tbody tr td.component::before {
     2129    body:not(.is-oembed) .listing.tickets tbody tr td.component::before {
    21302130        content: "Component: ";
    21312131    }
    2132     .listing.tickets tbody tr td.severity::before {
     2132    body:not(.is-oembed) .listing.tickets tbody tr td.severity::before {
    21332133        content: "Severity: ";
    21342134    }
    2135     .listing.tickets tbody tr td.workflow::before {
     2135    body:not(.is-oembed) .listing.tickets tbody tr td.workflow::before {
    21362136        content: "Workflow: ";
    21372137    }
    2138     .listing.tickets tbody tr td.date::before {
     2138    body:not(.is-oembed) .listing.tickets tbody tr td.date::before {
    21392139        content: "Date: ";
    21402140    }
    2141     .listing.tickets tbody tr td.time::before {
     2141    body:not(.is-oembed) .listing.tickets tbody tr td.time::before {
    21422142        content: "Created: ";
    21432143    }
    2144     .listing.tickets tbody tr td.changetime::before {
     2144    body:not(.is-oembed) .listing.tickets tbody tr td.changetime::before {
    21452145        content: "Modified: ";
    21462146    }
    2147     .listing.tickets tbody tr td.version::before {
     2147    body:not(.is-oembed) .listing.tickets tbody tr td.version::before {
    21482148        content: "Version: ";
    21492149    }
    2150     .listing.tickets tbody tr td.reporter::before {
     2150    body:not(.is-oembed) .listing.tickets tbody tr td.reporter::before {
    21512151        content: "Reporter: ";
    21522152    }
    2153     .listing.tickets tbody tr td.Comments::before {
     2153    body:not(.is-oembed) .listing.tickets tbody tr td.Comments::before {
    21542154        content: "Comments: ";
    21552155    }
    2156     .listing.tickets tbody tr td.Stars::before {
     2156    body:not(.is-oembed) .listing.tickets tbody tr td.Stars::before {
    21572157        content: "Stars: ";
    21582158    }
    2159     .listing.tickets tbody tr td.keywords::before {
     2159    body:not(.is-oembed) .listing.tickets tbody tr td.keywords::before {
    21602160        content: "Keywords: ";
    21612161    }
    2162     .listing.tickets tbody tr td.focuses::before {
     2162    body:not(.is-oembed) .listing.tickets tbody tr td.focuses::before {
    21632163        content: "Focuses: ";
    21642164    }
    2165     .listing.tickets tbody tr td.cc::before {
     2165    body:not(.is-oembed) .listing.tickets tbody tr td.cc::before {
    21662166        content: "CC: ";
    21672167    }
    2168     .listing.tickets tbody tr td:not(.Comments, .Stars)::before {
     2168    body:not(.is-oembed) .listing.tickets tbody tr td:not(.Comments, .Stars)::before {
    21692169        font-weight: 600;
    21702170    }
    2171     .listing.tickets tbody tr td.Stars,
    2172     .listing.tickets tbody tr td.Comments {
     2171    body:not(.is-oembed) .listing.tickets tbody tr td.Stars,
     2172    body:not(.is-oembed) .listing.tickets tbody tr td.Comments {
    21732173        display: inline-block;
    21742174        float: right;
     
    24802480    }
    24812481}
     2482
     2483/* Trac oEmbed rules */
     2484body.is-oembed table.listing {
     2485    display: block;
     2486    overflow-x: auto;
     2487}
     2488body.is-oembed table.listing .summary {
     2489    min-width: 40vw;
     2490}
Note: See TracChangeset for help on using the changeset viewer.