[wp-meta] [Making WordPress.org] #7382: Add Playground links to themes trac tickets

Making WordPress.org noreply at wordpress.org
Fri Dec 22 06:11:49 UTC 2023


#7382: Add Playground links to themes trac tickets
-----------------------------+---------------------
 Reporter:  acosmin          |       Owner:  (none)
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:
Component:  Theme Directory  |  Resolution:
 Keywords:                   |
-----------------------------+---------------------
Changes (by dd32):

 * keywords:  needs-patch 2nd-opinion =>


Comment:

 Copying my comment from Github over here, because the PR didn't auto-link
 for some reason, and as a result didn't sync over here...

 And as a bonus, I incorrectly linked the ticket in the Commit and forgot
 props :facepalm:.

 In [13080]:
 > Theme Directory: Review: Add a live preview to review trac tickets.
 >
 > See https://meta.trac.wordpress.org/ticket/7382
 > Closes https://github.com/WordPress/wordpress.org/pull/186

 ----
 [https://github.com/WordPress/wordpress.org/pull/186#issuecomment-1867281078
 GitHub Comment]

 > I am not sure how to test this PR 😆

 Testing the Trac integrations is never easy :) because of that I don't
 usually actually test it.. I just do it live 🤠

 The part that can be tested though is the PHP in a standalone file, and a
 Trac admin can edit the existing trac tickets/comments with the new
 generated text to see how it works.

 Unfortunately, the link in the PR as-is is a bit.. finicky with Trac.. the
 Trac linking code gets a bit confused by the { and [ in the link.

 > The zip file URL used in the comment follows this pattern:
 >
 > https://wordpress.org/themes/download/...

 Ha.. there's no reason that specific link format was used here, other than
 legacy reasons, it pre-dates downloads.wordpress.org being a "thing", so
 I'll change that as part of this.

 > Missing images in the theme unit test data
 > This is outside of scope for this PR and can be addressed separately if
 needed.

 Agreed, this is a change that should be made, but it doesn't need to be
 done before this is implemented.



 I'm not 100% sure on the blueprint, the PR used one which doesn't import
 the test data, so I've used the one from the description, which seems to
 work.

 I'm also not 100% sure that hard-coding the blueprint into the Trac
 tickets is the right way to go, we might be better off having a redirect
 location like `https://wordpress.org/themes/wp-json/trt/live-
 preview?slug={$slug}&version={$version}`, but I guess in a way it's good
 that it's hard-coded, it means that future PHP version changes in the
 blueprint won't change the url in older tickets, etc.. so I'm just going
 to hard-code it for now.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/7382#comment:3>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list