Skip to content

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

Open
kategengler with Copilot wants to merge 5 commits into
mainfrom
copilot/remove-unnecessary-imports
Open

Remove @ember/modifier import for on (now a keyword in Ember 7.1)#291
kategengler with Copilot wants to merge 5 commits 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';

Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
@kategengler

Copy link
Copy Markdown
Contributor

@copilot The patches don't apply

…tch error

Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>

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.

Copilot AI and others added 2 commits August 12, 2026 15:42
Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>
@kategengler

Copy link
Copy Markdown
Contributor

@copilot CI is failing

Co-authored-by: kategengler <444218+kategengler@users.noreply.github.com>

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.

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.

2 participants