Skip to content

Commit ffd965e

Browse files
authored
Merge pull request #13 from Baltazore/all-in-one-without-serializers
All in one without serializers
2 parents 63fbf2a + 0fcead7 commit ffd965e

File tree

54 files changed

+720
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+720
-193
lines changed
Lines changed: 60 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,95 @@
11
{{#let
22
@subsection.id
3-
(t (concat @sectionId "." @subsection.id ".title"))
4-
(t (concat @sectionId "." @subsection.id ".description") htmlSafe=true)
3+
(t (concat @sectionId '.' @subsection.id '.title'))
4+
(t (concat @sectionId '.' @subsection.id '.description') htmlSafe=true)
55
as |subsectionId subsectionTitle subsectionDescription|
66
}}
77
<section
8-
aria-labelledby="{{@sectionId}}__{{subsectionId}}"
8+
aria-labelledby='{{@sectionId}}__{{subsectionId}}'
99
data-test-subsection={{subsectionTitle}}
1010
>
11-
<div local-class="title-container">
11+
<div local-class='title-container'>
1212
<h3
13-
data-test-field="Subsection Title"
14-
id="{{@sectionId}}__{{subsectionId}}"
15-
local-class="title"
13+
data-test-field='Subsection Title'
14+
id='{{@sectionId}}__{{subsectionId}}'
15+
local-class='title'
1616
>
1717
{{subsectionTitle}}
1818
</h3>
1919

2020
<a
21-
href="#{{@sectionId}}__{{subsectionId}}"
22-
local-class="permalink"
21+
href='#{{@sectionId}}__{{subsectionId}}'
22+
local-class='permalink'
2323
title={{subsectionTitle}}
2424
>
25-
{{t "component.guide-section.section"}}
25+
{{t 'component.guide-section.section'}}
2626
</a>
2727
</div>
2828

29-
<p
30-
data-test-field="Subsection Description"
31-
local-class="description"
32-
>
29+
<p data-test-field='Subsection Description' local-class='description'>
3330
{{subsectionDescription}}
3431
</p>
3532

3633
<ContainerQuery
37-
@features={{hash
38-
wide=(width min=900)
39-
}}
40-
local-class="code-examples-container"
34+
@features={{hash wide=(width min=900)}}
35+
local-class='code-examples-container'
4136
>
42-
<div
43-
data-test-ember-classic
44-
local-class="ember-classic"
45-
>
46-
<h4 local-class="subtitle">
47-
{{t "component.guide-section.subsection.classic"}}
48-
</h4>
37+
{{#if @subsection.classicFiles.length}}
38+
<div data-test-ember-classic local-class='ember-classic'>
39+
<h4 local-class='subtitle'>
40+
{{t 'component.guide-section.subsection.classic'}}
41+
</h4>
4942

50-
{{#each @subsection.classicFiles as |file|}}
51-
<div local-class="code-snippet">
52-
<CodeSnippet
53-
@fileName="{{@sectionId}}/{{subsectionId}}/{{file}}"
54-
/>
55-
</div>
56-
{{/each}}
43+
{{#each @subsection.classicFiles as |file|}}
44+
<div local-class='code-snippet'>
45+
<CodeSnippet
46+
@fileName='{{@sectionId}}/{{subsectionId}}/{{file}}'
47+
/>
48+
</div>
49+
{{/each}}
5750

58-
{{#if @subsection.classicDescriptionKey}}
59-
<p data-test-general-text>
60-
{{t @subsection.classicDescriptionKey htmlSafe=true}}
61-
</p>
62-
{{/if}}
63-
</div>
51+
{{#if @subsection.classicDescriptionKey}}
52+
<p data-test-general-text>
53+
{{t @subsection.classicDescriptionKey htmlSafe=true}}
54+
</p>
55+
{{/if}}
56+
</div>
6457

65-
<div
66-
data-test-ember-octane
67-
local-class="ember-octane"
68-
>
69-
<h4 local-class="subtitle">
70-
{{t "component.guide-section.subsection.octane"}}
71-
</h4>
58+
{{/if}}
59+
60+
{{#if @subsection.octaneFiles.length}}
61+
<div data-test-ember-octane local-class='ember-octane'>
62+
<h4 local-class='subtitle'>
63+
{{t 'component.guide-section.subsection.octane'}}
64+
</h4>
7265

73-
{{#each @subsection.octaneFiles as |file|}}
74-
<div local-class="code-snippet">
75-
<CodeSnippet
76-
@fileName="{{@sectionId}}/{{subsectionId}}/{{file}}"
77-
/>
78-
</div>
79-
{{/each}}
66+
{{#each @subsection.octaneFiles as |file|}}
67+
<div local-class='code-snippet'>
68+
<CodeSnippet
69+
@fileName='{{@sectionId}}/{{subsectionId}}/{{file}}'
70+
/>
71+
</div>
72+
{{/each}}
8073

81-
{{#if @subsection.octaneDescriptionKey}}
82-
<p data-test-general-text>
83-
{{t @subsection.octaneDescriptionKey htmlSafe=true}}
84-
</p>
85-
{{/if}}
86-
</div>
74+
{{#if @subsection.octaneDescriptionKey}}
75+
<p data-test-general-text>
76+
{{t @subsection.octaneDescriptionKey htmlSafe=true}}
77+
</p>
78+
{{/if}}
79+
</div>
80+
{{/if}}
8781
</ContainerQuery>
8882

89-
<div local-class="edit-link-container">
83+
<div local-class='edit-link-container'>
9084
<a
91-
data-test-link="Edit Translation"
92-
href="https://github.com/ember-learn/ember-data-request-service-cheat-sheet/edit/main/translations/{{@sectionId}}/{{subsectionId}}/{{this.intl.locale}}.yaml"
93-
local-class="edit-link"
94-
rel="noopener noreferrer"
95-
target="_blank"
85+
data-test-link='Edit Translation'
86+
href='https://github.com/ember-learn/ember-data-request-service-cheat-sheet/edit/main/translations/{{@sectionId}}/{{subsectionId}}/{{this.intl.locale}}.yaml'
87+
local-class='edit-link'
88+
rel='noopener noreferrer'
89+
target='_blank'
9690
>
97-
{{t "component.guide-section.edit-translation-text"}}
91+
{{t 'component.guide-section.edit-translation-text'}}
9892
</a>
9993
</div>
10094
</section>
101-
{{/let}}
95+
{{/let}}

app/routes/application.js

Lines changed: 39 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -4,172 +4,85 @@ export default class ApplicationRoute extends Route {
44
model() {
55
return [
66
{
7-
id: 'generating-files',
7+
id: 'fetching-data',
88
subsections: [
99
{
10-
id: 'generating-component',
11-
classicFiles: ['classic.shell'],
12-
octaneFiles: ['octane.shell'],
10+
id: 'find-record',
11+
classicFiles: ['old.js', 'old.ts'],
12+
octaneFiles: ['new.js', 'new.ts', 'own-builder.ts'],
1313
},
1414
{
15-
id: 'file-structure',
16-
classicFiles: ['classic.text'],
17-
octaneFiles: ['octane.text'],
18-
},
19-
],
20-
},
21-
{
22-
id: 'component-templates',
23-
subsections: [
24-
{
25-
id: 'angle-brackets',
26-
classicFiles: ['classic.hbs'],
27-
octaneFiles: ['octane.hbs'],
28-
},
29-
{
30-
id: 'inline-vs-block',
31-
classicFiles: ['classic.hbs'],
32-
octaneFiles: ['octane.hbs'],
33-
},
34-
{
35-
id: 'angle-brackets-nested',
36-
classicFiles: ['classic.hbs'],
37-
octaneFiles: ['octane.hbs'],
38-
},
39-
{
40-
id: 'template-named',
41-
classicFiles: ['classic.hbs'],
42-
octaneFiles: ['octane.hbs'],
43-
},
44-
{
45-
id: 'template-this',
46-
classicFiles: ['classic.hbs'],
47-
octaneFiles: ['octane.hbs'],
48-
},
49-
{
50-
id: 'template-arguments-named',
51-
classicFiles: ['classic.hbs'],
52-
octaneFiles: ['octane.hbs'],
15+
id: 'find-all',
16+
classicFiles: ['old.js'],
17+
octaneFiles: ['new.js'],
5318
},
5419
{
55-
id: 'template-arguments-this',
56-
classicFiles: ['classic.hbs'],
57-
octaneFiles: ['octane.hbs'],
20+
id: 'query',
21+
classicFiles: ['old.js'],
22+
octaneFiles: ['new.js'],
5823
},
5924
{
60-
id: 'tag-name',
61-
classicFiles: ['classic.hbs', 'classic.html'],
62-
octaneFiles: ['octane.hbs', 'octane.html'],
63-
},
64-
{
65-
id: 'element-id',
66-
classicFiles: ['classic.js', 'classic.hbs'],
67-
octaneFiles: ['octane.js', 'octane.hbs'],
25+
id: 'query-record',
26+
classicFiles: ['old.js'],
27+
octaneFiles: ['new.js'],
6828
},
6929
],
7030
},
7131
{
72-
id: 'component-properties',
32+
id: 'updating-data',
7333
subsections: [
7434
{
75-
id: 'js-boilerplate',
76-
classicFiles: ['classic.js'],
77-
octaneFiles: ['octane.js'],
78-
},
79-
{
80-
id: 'js-properties',
81-
classicFiles: ['classic.js'],
82-
octaneFiles: ['octane.js'],
83-
},
84-
{
85-
id: 'ddau',
86-
classicFiles: [
87-
'classic-parent.js',
88-
'classic-parent.hbs',
89-
'classic-child.js',
90-
'classic-child.hbs',
91-
],
92-
octaneFiles: [
93-
'octane-parent.js',
94-
'octane-parent.hbs',
95-
'octane-child.hbs',
96-
],
97-
},
98-
{
99-
id: 'args',
100-
classicFiles: ['classic.js'],
101-
octaneFiles: ['octane.js'],
35+
id: 'create-record',
36+
classicFiles: ['old.js'],
37+
octaneFiles: ['in-place-body.js', 'handler.js'],
10238
},
10339
{
104-
id: 'get-and-set',
105-
classicFiles: ['classic.js'],
106-
octaneFiles: ['octane.js'],
107-
},
108-
{
109-
id: 'tracked-vs-cp',
110-
classicFiles: ['classic.js'],
111-
octaneFiles: ['octane.js'],
112-
},
113-
{
114-
id: 'computed-decorator',
115-
classicFiles: ['classic.js'],
116-
octaneFiles: ['octane.js'],
40+
id: 'save-record',
41+
classicFiles: ['old.js'],
42+
octaneFiles: ['new.js', 'handler.js'],
11743
},
11844
],
11945
},
12046
{
121-
id: 'actions',
47+
id: 'deleting-data',
12248
subsections: [
12349
{
124-
id: 'actions',
125-
classicFiles: ['classic.js', 'classic.hbs'],
126-
octaneFiles: ['octane.js', 'octane.hbs'],
127-
},
128-
{
129-
id: 'template-arguments-default',
130-
classicFiles: ['classic.hbs', 'classic.js'],
131-
octaneFiles: ['octane.hbs', 'octane.js'],
132-
},
133-
{
134-
id: 'mixins',
135-
classicFiles: ['classic.js'],
136-
octaneDescriptionKey: 'actions.mixins.octaneDescription',
50+
id: 'delete-record',
51+
classicFiles: ['old.js', 'destroy.js'],
52+
octaneFiles: ['new.js'],
13753
},
13854
],
13955
},
14056
{
141-
id: 'component-lifecycle',
57+
id: 'adapters',
14258
subsections: [
14359
{
144-
id: 'constructors',
145-
classicFiles: ['classic.js'],
146-
octaneFiles: ['octane.js'],
60+
id: 'general',
14761
},
14862
{
149-
id: 'will-destroy',
150-
classicFiles: ['classic.js'],
151-
octaneFiles: ['octane.js'],
63+
id: 'host-and-namespace',
64+
classicFiles: ['old.js'],
65+
octaneFiles: ['new.js'],
15266
},
15367
{
154-
id: 'render-modifiers',
155-
classicDescriptionKey:
156-
'component-lifecycle.render-modifiers.classicDescription',
157-
octaneFiles: ['octane.shell'],
68+
id: 'path-for-type',
69+
classicFiles: ['old.js'],
70+
octaneFiles: ['new.js', 'utils.js'],
15871
},
15972
{
160-
id: 'did-insert',
161-
classicFiles: ['classic.hbs', 'classic.js'],
162-
octaneFiles: ['octane.hbs', 'octane.js'],
73+
id: 'cache-lifetime',
74+
classicFiles: ['old.js'],
75+
octaneFiles: ['new.js'],
16376
},
16477
],
16578
},
16679
{
167-
id: 'routes',
80+
id: 'serializers',
16881
subsections: [
16982
{
170-
id: 'model-access',
171-
classicFiles: ['classic.hbs'],
172-
octaneFiles: ['octane.hbs'],
83+
id: 'general',
84+
classicFiles: ['old.js'],
85+
octaneFiles: ['utils.js', 'app-code.js', 'handler.js'],
17386
},
17487
],
17588
},

0 commit comments

Comments
 (0)