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] Optimize theme polling to skip re-downloading recently uploaded files #3919

Merged
merged 2 commits into from
May 22, 2024

Conversation

jamesmengo
Copy link
Contributor

@jamesmengo jamesmengo commented May 21, 2024

WHY are these changes introduced?

WHAT is this pull request doing?

Prevent an additional call to download theme assets when already present in the local theme.

How to test your changes?

  1. Create a file only present locally on your theme
  2. shopify-dev theme dev --theme-editor-sync --dev-preview
  3. Select Upload local files to the remote theme
  4. Wait for the success box
  5. After ~3 seconds, you should NOT see something like this Synced: get 'templates/list-collections.alternate.json' from remote theme
Code.-.dawn_export.templates_list-collections.json.cli.Workspace.mp4

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Copy link
Contributor

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 21, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
71.97% (+0.01% 🔼)
7034/9774
🟡 Branches
68.81% (+0.02% 🔼)
3484/5063
🟡 Functions 71.44% 1881/2633
🟡 Lines
73.28% (+0.01% 🔼)
6632/9050

Test suite run success

1650 tests passing in 766 suites.

Report generated by 🧪jest coverage report action from ec084f7

@jamesmengo jamesmengo marked this pull request as ready for review May 21, 2024 23:24
@jamesmengo jamesmengo self-assigned this May 21, 2024
@jamesmengo jamesmengo added the #gsd:40767 Fortify local development experience for Liquid themes label May 21, 2024
Copy link
Contributor

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 requested a review from karreiro May 21, 2024 23:24
Base automatically changed from jmeng/theme_sync_poll_clean to main May 22, 2024 16:54
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! Great stuff :)

@jamesmengo jamesmengo added this pull request to the merge queue May 22, 2024
Merged via the queue into main with commit 85f84ef May 22, 2024
33 checks passed
@jamesmengo jamesmengo deleted the jmeng/optimize_poll branch May 22, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:40767 Fortify local development experience for Liquid themes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants