Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ijlee2/ember-container-query
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.1.0
Choose a base ref
...
head repository: ijlee2/ember-container-query
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.1.1
Choose a head ref
  • 4 commits
  • 36 files changed
  • 3 contributors

Commits on Feb 24, 2025

  1. Simplified project (#255)

    * chore: Replaced staticComponents, staticHelpers, and staticModifiers (deprecated) with staticInvokables
    
    * chore: Removed rollup-plugin-copy (unused)
    
    * chore: Added lockfile
    
    * chore: Added changeset
    
    ---------
    
    Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
    ijlee2 and ijlee2 authored Feb 24, 2025
    Copy the full SHA
    0ddc892 View commit details

Commits on Mar 7, 2025

  1. Remove inject, use service to inject service. Resolves deprecation in…

    … ember 6.1+ (#256)
    
    * Remove inject, use service to inject service. Resolves deprecation in ember 6.1+
    
    * chore: Updated README
    
    * chore: Added changeset
    
    ---------
    
    Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
    NullVoxPopuli and ijlee2 authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4c358b6 View commit details
  2. Updated dependencies (#257)

    * chore: Updated dependencies
    
    * chore: Added lockfile
    
    * chore: Updated lint configurations
    
    * chore: Fixed lint errors
    
    * chore: Added changeset
    
    ---------
    
    Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
    ijlee2 and ijlee2 authored Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7ed279c View commit details
  3. Tagged 5.1.1

    ijlee2 committed Mar 7, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fee5a2e View commit details
Showing with 787 additions and 919 deletions.
  1. +1 −3 README.md
  2. +0 −4 docs-app/.prettierignore
  3. +7 −0 docs-app/CHANGELOG.md
  4. +17 −18 docs-app/app/components/navigation-menu.gts
  5. +2 −5 docs-app/app/components/products/product/card.gts
  6. +2 −7 docs-app/app/components/products/product/image.gts
  7. +20 −25 docs-app/app/components/tracks.gts
  8. +30 −31 docs-app/app/components/tracks/table.gts
  9. +4 −10 docs-app/app/components/ui/form/field.gts
  10. +24 −25 docs-app/app/components/ui/form/information.gts
  11. +9 −14 docs-app/app/components/ui/page.gts
  12. +28 −29 docs-app/app/components/widgets/widget-1.gts
  13. +7 −8 docs-app/app/components/widgets/widget-1/item.gts
  14. +1 −1 docs-app/app/components/widgets/widget-2/stacked-chart.gts
  15. +1 −1 docs-app/app/components/widgets/widget-3/tour-schedule.gts
  16. +15 −16 docs-app/app/components/widgets/widget-4.gts
  17. +22 −29 docs-app/app/components/widgets/widget-4/memo.gts
  18. +7 −31 docs-app/app/components/widgets/widget-4/memo/actions.gts
  19. +10 −14 docs-app/app/components/widgets/widget-4/memo/body.gts
  20. +1 −1 docs-app/app/components/widgets/widget-4/memo/header.gts
  21. +28 −35 docs-app/app/components/widgets/widget-5.gts
  22. +1 −3 docs-app/ember-cli-build.js
  23. +1 −1 docs-app/eslint.config.mjs
  24. +10 −10 docs-app/package.json
  25. +2 −4 docs-app/tests/integration/components/navigation-menu-test.gts
  26. +2 −2 package.json
  27. +7 −0 packages/ember-container-query/CHANGELOG.md
  28. +1 −3 packages/ember-container-query/README.md
  29. +7 −8 packages/ember-container-query/package.json
  30. +0 −9 packages/ember-container-query/rollup.config.mjs
  31. +1 −1 packages/ember-container-query/src/modifiers/container-query.ts
  32. +505 −559 pnpm-lock.yaml
  33. +0 −4 test-app/.prettierignore
  34. +6 −0 test-app/CHANGELOG.md
  35. +1 −1 test-app/eslint.config.mjs
  36. +7 −7 test-app/package.json
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -359,11 +359,9 @@ For more examples, I encourage you to check out the code for my demo app. It is
## Compatibility
- Ember.js v4.12 or above<sup>1</sup>
- Ember.js v4.12 or above
- Node.js v18 or above
<sup>1. `ember-container-query` may work on older versions of Ember (e.g. `4.4`), but issues that arise from these won't be supported.</sup>
## Contributing
4 changes: 0 additions & 4 deletions docs-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -8,7 +8,3 @@
/coverage/
!.*
.*/

# ember-template-imports
/**/*.gjs
/**/*.gts
7 changes: 7 additions & 0 deletions docs-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# docs-app

## 1.0.5

### Patch Changes

- [#257](https://github.com/ijlee2/ember-container-query/pull/257) Updated dependencies ([@ijlee2](https://github.com/ijlee2))
- [#255](https://github.com/ijlee2/ember-container-query/pull/255) Replaced staticComponents, staticHelpers, and staticModifiers (deprecated) with staticInvokables ([@ijlee2](https://github.com/ijlee2))

## 1.0.4

### Patch Changes
35 changes: 17 additions & 18 deletions docs-app/app/components/navigation-menu.gts
Original file line number Diff line number Diff line change
@@ -16,24 +16,23 @@ interface NavigationMenuSignature {
};
}

const NavigationMenuComponent: TOC<NavigationMenuSignature> =
<template>
<nav aria-label={{@name}} data-test-nav={{@name}}>
<ul class={{styles.list}}>
{{#each @menuItems as |menuItem|}}
<li>
<LinkTo
@route={{menuItem.route}}
class={{local styles "link"}}
data-test-link={{menuItem.label}}
>
{{menuItem.label}}
</LinkTo>
</li>
{{/each}}
</ul>
</nav>
</template>
const NavigationMenuComponent: TOC<NavigationMenuSignature> = <template>
<nav aria-label={{@name}} data-test-nav={{@name}}>
<ul class={{styles.list}}>
{{#each @menuItems as |menuItem|}}
<li>
<LinkTo
@route={{menuItem.route}}
class={{local styles "link"}}
data-test-link={{menuItem.label}}
>
{{menuItem.label}}
</LinkTo>
</li>
{{/each}}
</ul>
</nav>
</template>;

export default NavigationMenuComponent;

7 changes: 2 additions & 5 deletions docs-app/app/components/products/product/card.gts
Original file line number Diff line number Diff line change
@@ -37,10 +37,7 @@ const ProductsProductCardComponent: TOC<ProductsProductCardSignature> =
</div>

<div class={{styles.body}}>
<p
class={{styles.description}}
data-test-field="Short Description"
>
<p class={{styles.description}} data-test-field="Short Description">
{{@product.shortDescription}}
</p>

@@ -60,7 +57,7 @@ const ProductsProductCardComponent: TOC<ProductsProductCardSignature> =
</LinkTo>
</div>
</ContainerQuery>
</template>
</template>;

export default ProductsProductCardComponent;

9 changes: 2 additions & 7 deletions docs-app/app/components/products/product/image.gts
Original file line number Diff line number Diff line change
@@ -18,16 +18,11 @@ const ProductsProductImageComponent: TOC<ProductsProductImageSignature> =

{{else}}
{{! template-lint-disable no-redundant-role }}
<img
alt=""
class={{styles.image}}
role="presentation"
src={{@src}}
/>
<img alt="" class={{styles.image}} role="presentation" src={{@src}} />
{{! template-lint-enable no-redundant-role }}

{{/if}}
</template>
</template>;

export default ProductsProductImageComponent;

45 changes: 20 additions & 25 deletions docs-app/app/components/tracks.gts
Original file line number Diff line number Diff line change
@@ -13,33 +13,28 @@ interface TracksSignature {
};
}

const TracksComponent: TOC<TracksSignature> =
<template>
<ContainerQuery
@features={{hash
small=(width max=480)
medium=(width min=480 max=640)
large=(width min=640)
tall=(height min=320)
}}
as |CQ|
>
{{#if (and CQ.features.large CQ.features.tall)}}
<TracksTable @tracks={{@tracks}} />
const TracksComponent: TOC<TracksSignature> = <template>
<ContainerQuery
@features={{hash
small=(width max=480)
medium=(width min=480 max=640)
large=(width min=640)
tall=(height min=320)
}}
as |CQ|
>
{{#if (and CQ.features.large CQ.features.tall)}}
<TracksTable @tracks={{@tracks}} />

{{else}}
<TracksList
@numColumns={{if
CQ.features.small
1
(if CQ.features.medium 2 3)
}}
@tracks={{@tracks}}
/>
{{else}}
<TracksList
@numColumns={{if CQ.features.small 1 (if CQ.features.medium 2 3)}}
@tracks={{@tracks}}
/>

{{/if}}
</ContainerQuery>
</template>
{{/if}}
</ContainerQuery>
</template>;

export default TracksComponent;

61 changes: 30 additions & 31 deletions docs-app/app/components/tracks/table.gts
Original file line number Diff line number Diff line change
@@ -10,38 +10,37 @@ interface TracksTableSignature {
};
}

const TracksTableComponent: TOC<TracksTableSignature> =
<template>
<table data-test-table="Tracks">
<thead>
<tr>
<th class={{styles.track-number}}>#</th>
<th>Title</th>
<th class={{styles.track-length}}>Length</th>
<th class={{styles.track-is-explicit}}>Explicit</th>
</tr>
</thead>
const TracksTableComponent: TOC<TracksTableSignature> = <template>
<table data-test-table="Tracks">
<thead>
<tr>
<th class={{styles.track-number}}>#</th>
<th>Title</th>
<th class={{styles.track-length}}>Length</th>
<th class={{styles.track-is-explicit}}>Explicit</th>
</tr>
</thead>

<tbody>
{{#each @tracks as |track index|}}
<tr data-test-row>
<td>
{{add index 1}}
</td>
<td data-test-column="Title">
{{track.name}}
</td>
<td align="right" data-test-column="Length">
{{track.length}}
</td>
<td align="center" data-test-column="Explicit">
{{if track.isExplicit "Yes"}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</template>
<tbody>
{{#each @tracks as |track index|}}
<tr data-test-row>
<td>
{{add index 1}}
</td>
<td data-test-column="Title">
{{track.name}}
</td>
<td align="right" data-test-column="Length">
{{track.length}}
</td>
<td align="center" data-test-column="Explicit">
{{if track.isExplicit "Yes"}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</template>;

export default TracksTableComponent;

14 changes: 4 additions & 10 deletions docs-app/app/components/ui/form/field.gts
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ interface UiFormFieldSignature {
field: [
{
inputId: string;
}
},
];
label: [
{
inputId: string;
}
},
];
};
}
@@ -51,20 +51,14 @@ export default class UiFormFieldComponent extends Component<UiFormFieldSignature
</div>

{{#if @errorMessage}}
<div
class={{local styles "feedback" "is-error"}}
>
<div class={{local styles "feedback" "is-error"}}>
{{svgJar
"alert"
desc="A warning to indicate that the input field has an error"
role="img"
}}

<span
class={{styles.message}}
data-test-feedback
role="alert"
>
<span class={{styles.message}} data-test-feedback role="alert">
{{@errorMessage}}
</span>
</div>
49 changes: 24 additions & 25 deletions docs-app/app/components/ui/form/information.gts
Original file line number Diff line number Diff line change
@@ -12,32 +12,31 @@ interface UiFormInformationSignature {
};
}

const UiFormInformationComponent: TOC<UiFormInformationSignature> =
<template>
{{#if (or @title @instructions)}}
<div class={{styles.container}}>
{{#if @title}}
<div
class={{styles.title}}
data-test-title
id={{concat @formId "-title"}}
>
{{@title}}
</div>
{{/if}}
const UiFormInformationComponent: TOC<UiFormInformationSignature> = <template>
{{#if (or @title @instructions)}}
<div class={{styles.container}}>
{{#if @title}}
<div
class={{styles.title}}
data-test-title
id={{concat @formId "-title"}}
>
{{@title}}
</div>
{{/if}}

{{#if @instructions}}
<p
class={{styles.instructions}}
data-test-instructions
id={{concat @formId "-instructions"}}
>
{{@instructions}}
</p>
{{/if}}
</div>
{{/if}}
</template>
{{#if @instructions}}
<p
class={{styles.instructions}}
data-test-instructions
id={{concat @formId "-instructions"}}
>
{{@instructions}}
</p>
{{/if}}
</div>
{{/if}}
</template>;

export default UiFormInformationComponent;

23 changes: 9 additions & 14 deletions docs-app/app/components/ui/page.gts
Original file line number Diff line number Diff line change
@@ -11,22 +11,17 @@ interface UiPageSignature {
};
}

const UiPageComponent: TOC<UiPageSignature> =
<template>
<div class={{styles.container}}>
<h1 class={{styles.title}}>
{{@title}}
</h1>
const UiPageComponent: TOC<UiPageSignature> = <template>
<div class={{styles.container}}>
<h1 class={{styles.title}}>
{{@title}}
</h1>

<div
class={{styles.content}}
id="main-content"
tabindex="-1"
>
{{yield}}
</div>
<div class={{styles.content}} id="main-content" tabindex="-1">
{{yield}}
</div>
</template>
</div>
</template>;

export default UiPageComponent;

Loading