Remove importing-inject-from-ember-service deprecation#915
Conversation
- Updated formatting in README.md for media query definitions and template usage. - Changed import statements from `inject as service` to `service` for cleaner syntax in media.js and testing-helpers-test.js. - Added spacing for improved readability in various sections of README.md.
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated inject as service import syntax in favor of the modern service import syntax across the codebase, aligning with current Ember best practices. It also improves README documentation formatting for better readability.
- Updates import statements from
inject as servicetoservicein helper and test files - Standardizes formatting for media query definitions (consistent spacing after colons)
- Enhances documentation readability by adding blank lines between sections
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| addon/helpers/media.js | Updates import statement to use modern service decorator syntax |
| tests/integration/testing-helpers-test.js | Updates import statement to use modern service decorator syntax |
| README.md | Improves formatting consistency in media query definitions, fixes double-space grammar issue, adds blank lines for readability between documentation sections, and updates template example quote styles |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ```hbs | ||
| <div class="{{media 'classNames'}}"> | ||
| <div class='{{media "classNames"}}'> |
There was a problem hiding this comment.
For consistency with other examples in the documentation (lines 54 and 108), consider using single quotes for the helper argument: <div class="{{media 'classNames'}}"> instead of double quotes. This maintains consistency across all media helper usage examples.
| <div class='{{media "classNames"}}'> | |
| <div class='{{media 'classNames'}}'> |
inject as servicetoservicefor cleaner syntax in media.js and testing-helpers-test.js.