Skip to content

Remove @ember/modifier import for on (now a keyword in Ember 7.1) - #291

Merged
kategengler merged 1 commit into
mainfrom
copilot/remove-unnecessary-imports
Aug 16, 2026
Merged

Remove @ember/modifier import for on (now a keyword in Ember 7.1)#291
kategengler merged 1 commit into
mainfrom
copilot/remove-unnecessary-imports

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

In Ember 7.1, on became a built-in template keyword, making import { on } from '@ember/modifier' unnecessary.

Changes

  • Chapter 06 (06-interactive-components.md)

    • Drop import { on } from '@ember/modifier' from the rental/image.gjs patch; fix diff hunk header accordingly
    • Update prose: "imported from the @ember/modifier package" → "a built-in keyword in Ember"
  • Chapter 12 (12-provider-components.md)

    • Drop import { on } from '@ember/modifier' from the first rentals.gjs patch; adjust both hunk headers (@@ -1,2 +1,5 @@@@ -1,2 +1,4 @@, @@ -4,9 +7,24 @@@@ -4,9 +6,24 @@)
    • Update the subsequent rentals.gjs patch whose context line referenced the now-removed on import; shift line numbers down by one (@@ -5,2 +5,3 @@@@ -4,2 +4,3 @@, @@ -32,5 +33,7 @@@@ -31,5 +32,7 @@)

Before / After (chapter 06):

-@@ -3,2 +3,3 @@ import { tracked } from '@glimmer/tracking';
+@@ -3,2 +3,2 @@ import { tracked } from '@glimmer/tracking';
  import { action } from '@ember/object';
-+import { on } from '@ember/modifier';

Fixes #288

@kategengler

Copy link
Copy Markdown
Contributor

@copilot The patches don't apply

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The patches don't apply

Fixed in 7115384..latest. The chapter 06 patch had a leftover context-only hunk (no additions/deletions) with a bare empty line that git apply rejected as a corrupt patch. Removed that no-op hunk entirely — the second hunk (@@ -13,11 +13,11 @@) stands alone and applies cleanly. The chapter 12 patches were already correct and apply successfully.

@kategengler

Copy link
Copy Markdown
Contributor

@copilot CI is failing

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot CI is failing

Fixed in 595db9a. I reverted the unrelated chapter 07 MapLibre marker-load deferral so this PR is back to just the on keyword docs changes.

@kategengler

Copy link
Copy Markdown
Contributor

@copilot rebase this and make it one commit

Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
@kategengler
kategengler force-pushed the copilot/remove-unnecessary-imports branch from 595db9a to 6db9765 Compare August 16, 2026 16:51
@kategengler
kategengler merged commit b9c8c22 into main Aug 16, 2026
6 checks passed
@kategengler
kategengler deleted the copilot/remove-unnecessary-imports branch August 16, 2026 21:02
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.

Tutorial still imports on modifier

3 participants