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

Improved language around --nodelete flag in push and pull commands #4659

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

EvilGenius13
Copy link
Contributor

@EvilGenius13 EvilGenius13 commented Oct 16, 2024

WHY are these changes introduced?

Create some clarity around wording for --nodelete flag

Closes: https://github.com/Shopify/develop-advanced-edits/issues/225

WHAT is this pull request doing?

Updating the language for the --nodelete flag on push and pull commands

How to test your changes?

Purely documentation changes but you can see them by

  • pulling down this branch
  • building the branch
    Running:
    • shopify theme push --help
    • shopify theme pull --help

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

@EvilGenius13 EvilGenius13 requested a review from a team as a code owner October 16, 2024 14:23

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 72.52% 8393/11574
🟡 Branches 69.03% 4115/5961
🟡 Functions 71.96% 2194/3049
🟡 Lines 72.79% 7937/10904
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / ConcurrentOutput.tsx
98.39% (-1.61% 🔻)
90.91% (-4.55% 🔻)
100%
98.33% (-1.67% 🔻)

Test suite run success

1917 tests passing in 871 suites.

Report generated by 🧪jest coverage report action from 58768c3

packages/theme/src/cli/commands/theme/push.ts Outdated Show resolved Hide resolved
packages/theme/src/cli/commands/theme/pull.ts Outdated Show resolved Hide resolved
@EvilGenius13 EvilGenius13 force-pushed the fix-issue-225 branch 4 times, most recently from 412b5e3 to 0a344c9 Compare October 16, 2024 18:03
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 for this PR, @EvilGenius13!

I've left only one minor suggestion — please feel free to adopt a different version from mine, following a similar idea :)

@@ -33,7 +33,7 @@ If no theme is specified, then you're prompted to select the theme to pull from
}),
nodelete: Flags.boolean({
char: 'n',
description: 'Runs the pull command without deleting local files.',
description: 'Prevent deleting local files that have been removed remotely.',
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't know if the given files ever exist remotely, so I'd update this to something like this:

Suggested change
description: 'Prevent deleting local files that have been removed remotely.',
description: 'Prevent deleting local files that that do not exist remotely.',

@@ -65,7 +65,7 @@ export default class Push extends ThemeCommand {
}),
nodelete: Flags.boolean({
char: 'n',
description: 'Runs the push command without deleting local files.',
description: 'Prevent deleting remote files that have been removed locally.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Adopting the same reasoning:

Suggested change
description: 'Prevent deleting remote files that have been removed locally.',
description: 'Prevent deleting remote files that that do not exist locally.',

Copy link
Contributor

@jamesmengo jamesmengo left a comment

Choose a reason for hiding this comment

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

+1 to Guilherme's suggestion (or something along those lines)

Thanks Josh!

@EvilGenius13
Copy link
Contributor Author

The final edits are
Prevent deleting remote files that don't exist locally.
Prevent deleting local files that don't exist remotely.
This is due to the stricter ESLint rules recently imposed: Be human - prefer don't to do not, won't to will not etc.

This commit updates the language around the --nodelete flag in the push and pull commands
to make it more clear what files are being affected by the flag.
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, @EvilGenius13 🚀

@EvilGenius13
Copy link
Contributor Author

@Shopify/app-inner-loop could someone please take a look at this? Thanks so much!

@EvilGenius13 EvilGenius13 added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit 26be836 Oct 25, 2024
27 checks passed
@EvilGenius13 EvilGenius13 deleted the fix-issue-225 branch October 25, 2024 08:25
@jamesmengo jamesmengo added the #gsd:40767 Fortify local development experience for Liquid themes label Oct 29, 2024
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.

5 participants