New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate playground previews for theme changes #7719
Conversation
b021a93
to
ece2f44
Compare
ece2f44
to
b741aaa
Compare
This is the best kind of magic. |
Should we also have the Gutenberg plugin activated as well? |
19b6421
to
de009b9
Compare
I've added a check and a warning for child themes, advising the user to install the parent theme in order for the preview to work.
For what purpose? I'd imagine that if we intend on shipping themes compatible with the latest version that might be necessary, but I don't know if that's the case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ace! Thank you for working on it.
I tested this by making changes to LowFi and Programme, and I can see the preview links were generated correctly and the GH comment was updated, but I don't think I'm seeing the changes made to the themes correctly. For Programme, I updated the theme.json color presets, but they're not reflected in the preview link version of the theme:
The palette should include a new "accent" color (#E619CE) and "secondary" should be changed to #000000.
b9e5cf9
to
45796d8
Compare
Thanks for noticing this. It took a bit of debugging to figure out what was happening, and it's caused by the fact that the branch name includes a |
Oh wow, good detective work there. Is this ready to test again? I saw your PR/proposed changes for |
It doesn't seem to have fixed things yet... I made some changes in Blockbase and don't see them reflected yet. |
Things should be working now, this is good for another review. |
Yesss! Works for me. This is beautiful. |
I have removed my Blockbase changes and approve this message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great now.
I'm still not seeing changes to Programme, am I testing in a weird way? 😅 I changed the Secondary colour and removed the 404 template, but I'm not seeing either change in the Playground link. |
Weird. I also made some changes to Programme and am not seeing them reflected in the link. Strange. I'm certain I saw Blockbase changes earlier (the same type). I'm not sure what's going on. :P |
@pbking @mikachan the problem with Programme in particular is caused upstream, by the github-proxy service, because there seem to be temp files around from before the bug related to branch naming was fixed. I'm working with the author of that tool to get it fixed. Could you try with another theme? I believe this PR is ready to be shipped if a theme that we haven't tried before works fine. |
Hrm... I made font and color changes to Pendant. However I'm not seeing either change now. |
I see. Yeah, still an upstream issue. I'll let you know when to review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working great for me now, when testing Programme again and a different theme, Raw 🎉
Nice work @vcanales!
1aa0367
to
8c2cc06
Compare
8c2cc06
to
0ecb30c
Compare
Changing where we make the call to download the theme, to make sure that we're using stable code. Additionally, add child theme handling. Discussion around this: - Automattic/themes#7719 - stoph/github-proxy#3
* Playground Previews: use correct github proxy URL Changing where we make the call to download the theme, to make sure that we're using stable code. Additionally, add child theme handling. Discussion around this: - Automattic/themes#7719 - stoph/github-proxy#3 * change on a child theme * pushed another test * remove tests * Update .github/scripts/create-preview-links.js --------- Co-authored-by: MaggieCabrera <maggie.cabrera@automattic.com>
Adds a GitHub action that creates Preview Links for changed themes within a PR.
The action leverages two key tools:
The created links are then added as a comment on the PR thread, as you can see below.
The comment is updated after every push, accounting for changes to other themes.
Testing
Feel free to push changes to other themes to this branch.
I'll remove all theme-related changes before merging.