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

Fixed shopify theme dev to avoid emitting full page reload events when files are updated successfully #5448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karreiro
Copy link
Contributor

WHY are these changes introduced?

Fixes https://github.com/Shopify/developer-tools-team/issues/583

WHAT is this pull request doing?

This PR updates the error overlay to only reload the page when there was an error being loaded.

How to test your changes?

  • Run shopify theme dev
  • Update a section file
  • Notice that hot-reloading works

Post-release steps

N/A

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

…hen files are updated successfully, preventing conflicts with hot-reloading
@karreiro karreiro requested a review from jamesmengo February 21, 2025 10:05
@karreiro karreiro requested review from a team as code owners February 21, 2025 10:05
Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 75.73% 9113/12034
🟡 Branches 70.92% 4455/6282
🟡 Functions 75.42% 2375/3149
🟡 Lines
76.27% (+0.01% 🔼)
8606/11283
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app-event-watcher.ts
95.18% (-1.2% 🔻)
86.49% (-2.7% 🔻)
95.45% 100%

Test suite run success

2066 tests passing in 922 suites.

Report generated by 🧪jest coverage report action from d361f3a

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

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

Nice catch, this saved us a lot of bug reports 😅

throw new Error(errors.join('\n'))
}

if (uploadErrors.delete(fileKey)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL this returns a boolean

Copy link
Contributor

@EvilGenius13 EvilGenius13 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 for finding this! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants