Skip to content
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

[Themes][Feature] Theme Dev Preview - Initialize the ThemeEnvironment #3841

Merged
merged 3 commits into from
May 8, 2024

Conversation

jamesmengo
Copy link
Contributor

@jamesmengo jamesmengo commented May 2, 2024

WHY are these changes introduced?

WHAT is this pull request doing?

  • Starts setting up the local development environment when users run the theme dev with the developer-preview flag
    • Uploads the local theme to your remote theme
    • Allows users to specify a non-development theme

⚠️ This does not include --theme-editor-sync functionality. Passing the flag will, however, skip the upload

How to test your changes?

  • pnpm shopify theme dev --path=<PATH_TO_THEME> --developer-preview
Code.-.theme.src_cli_utilities_theme-environment.ts.CLI.Workspace.mp4

Copy link
Contributor

github-actions bot commented May 2, 2024

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-management

Copy link
Contributor

github-actions bot commented May 2, 2024

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

@jamesmengo jamesmengo changed the title Jmeng/theme env ci reset [Themes][Feature] Theme Dev Preview - Initialize the ThemeEnvironment May 2, 2024
@jamesmengo jamesmengo self-assigned this May 2, 2024
@jamesmengo jamesmengo added Type: Enhancement New feature or request Area: @shopify/theme @shopify/theme package issues labels May 2, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 71.78% 6941/9670
🟡 Branches 68.69% 3418/4976
🟡 Functions 71.22% 1858/2609
🟡 Lines 73.08% 6542/8952

Test suite run success

1633 tests passing in 763 suites.

Report generated by 🧪jest coverage report action from cd3689a

Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jamesmengo! This PR is in a great direction!

I've noticed that we have some Ruby-specific code we can skip, so I created this PR to share how we could do that and also included some other minor ideas. Please let me know what you think :)

Thanks again for this PR!

packages/theme/src/cli/services/dev.ts Outdated Show resolved Hide resolved
@jamesmengo jamesmengo changed the base branch from main to jmeng/themedevbeta May 6, 2024 18:19
@Shopify Shopify deleted a comment from karreiro May 6, 2024
@Shopify Shopify deleted a comment from karreiro May 6, 2024
@jamesmengo jamesmengo requested a review from karreiro May 6, 2024 19:55
Base automatically changed from jmeng/themedevbeta to main May 6, 2024 20:06
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jamesmengo! 🚀

await startDevServer(developmentTheme, context, () => {})

// Then
expect(uploadTheme).not.toHaveBeenCalled()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is going to change with #3833 but +1 for keeping it as is and updating in the following PR :)

@jamesmengo jamesmengo added this pull request to the merge queue May 8, 2024
Merged via the queue into main with commit e875474 May 8, 2024
@jamesmengo jamesmengo deleted the jmeng/theme_env_ci_reset branch May 8, 2024 15:53
@jamesmengo jamesmengo added the #gsd:40767 Fortify local development experience for Liquid themes label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues #gsd:40767 Fortify local development experience for Liquid themes Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants