change hardcoded links in theme pull to use methods to surface urls instead#6881
Merged
change hardcoded links in theme pull to use methods to surface urls instead#6881
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Coverage report
Test suite run success3778 tests passing in 1455 suites. Report generated by 🧪jest coverage report action from b776177 |
EvilGenius13
approved these changes
Feb 23, 2026
Contributor
EvilGenius13
left a comment
There was a problem hiding this comment.
Thank you for the PR @FKauwe!
Contributor
|
Let's add a |
aswamy
approved these changes
Feb 23, 2026
7c8e368 to
b776177
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


WHY are these changes introduced?
The
theme pullcommand had hardcoded links for previewing your theme, and launching the theme editor.Fixes #1063
WHAT is this pull request doing?
The hardcoded links were replaced by
themePreviewUrlandthemeEditorUrlmethods.The
themePreviewURLfunction builds the url following two paths and one path can lead to the url looking slightly different than the original string behavior (it truncates the url iftheme.role === live, but I tested both urls in my browser and they went to the same place.This is the Before + After:
Before:
After:
The After is cleaner for this edge case and doesn't add the unnecessary preview part, as the theme is live and the url can point to the live view.
I noticed there were no unittests testing
renderSuccessbut that other sibling tests do test that and the message surfaced to user, so I added that testHow to test your changes?
p build, thenshopify-dev theme pull -e <local-env-name>in external terminalrenderSuccessmessagefix-hardcoded-links-in-theme-pullp buildshopify-dev theme pull -e <local-env-name>in external terminalMeasuring impact
How do we know this change was effective? Please choose one: