Skip to content

Commit bc6c788

Browse files
committed
Fix and improve app architecture recommendations page
1 parent 716095e commit bc6c788

File tree

3 files changed

+50
-37
lines changed

3 files changed

+50
-37
lines changed

site/lib/_sass/base/_base.scss

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -397,25 +397,22 @@ ol.steps {
397397
}
398398

399399
main {
400-
ol + img, ul + img, ol + p, ul + p, p + p + img,
401-
ul + p:last-child {
400+
ol + img, ul + img, ol + p, ul + p, p + p + img {
402401
margin-bottom: 1rem;
403402
}
404-
}
405403

406-
td ol, td ul, td dl, td p {
407-
margin-bottom: 0;
404+
td {
405+
> *:last-child {
406+
margin-bottom: 0;
407+
}
408+
}
408409
}
409410

410411
p + ul, p + ol, p + dl {
411412
margin-block-start: 0.75rem;
412413
margin-block-end: 0.75rem;
413414
}
414415

415-
td ol, td ul, td dl, td p {
416-
margin-bottom: 0;
417-
}
418-
419416
.figure-caption {
420417
font-size: .875rem;
421418
font-style: italic;

site/lib/src/style_hash.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// dart format off
33

44
/// The generated hash of the `main.css` file.
5-
const generatedStylesHash = 'DmlNoretdr0Q';
5+
const generatedStylesHash = 'MdSvtstM9vzn';

src/content/app-architecture/recommendations.md

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,54 @@ which reflects how strongly the Flutter team recommends it.
2626
fundamentally clash with your current approach.
2727
* **Recommend**: This practice will likely improve your app.
2828
* **Conditional**: This practice can improve your app in certain circumstances.
29-
<br /><br />
3029

3130
{% for section in architectureRecommendations %}
32-
<h2>{{section.category}}</h2>
33-
<p>{{section.description}}</p>
34-
<table class="table table-striped" style="border-bottom:1px #DADCE0 solid">
35-
<tr class="tr-main-head">
36-
<th style="width: 30%">Recommendation</th>
37-
<th style="width: 70%">Description</th>
38-
</tr>
39-
{% for rec in section.recommendations %}
40-
<tr>
41-
<td>
42-
<p>{{rec.recommendation}}</p>
43-
{% if rec.confidence == "strong" %}
44-
<div class="rrec-pill success">Strongly recommend</div>
45-
{% elsif rec.confidence == "recommend" %}
46-
<div class="rrec-pill info">Recommend</div>
47-
{% else %}
48-
<div class="rrec-pill">Conditional</div>
49-
{% endif %}
50-
</td>
51-
<td>
52-
{{rec.description}}
53-
<br />
54-
{{rec.confidence-description}}</td>
55-
</tr> {% endfor %}
31+
## {{section.category}}
32+
33+
{{section.description}}
34+
35+
{% if section.recommendations.size > 0 %}
36+
37+
<table class="table table-striped" style="border-bottom:1px #DADCE0 solid;">
38+
<thead>
39+
<tr>
40+
<th style="width: 30%;">Recommendation</th>
41+
<th style="width: 70%;">Description</th>
42+
</tr>
43+
</thead>
44+
<tbody>
45+
{% for rec in section.recommendations %}
46+
<tr>
47+
<td>
48+
49+
{{rec.recommendation}}
50+
51+
{% if rec.confidence == "strong" %}
52+
<div class="rrec-pill success">Strongly recommend</div>
53+
{% elsif rec.confidence == "recommend" %}
54+
<div class="rrec-pill info">Recommend</div>
55+
{% else %}
56+
<div class="rrec-pill">Conditional</div>
57+
{% endif %}
58+
59+
</td>
60+
<td>
61+
62+
{{rec.description}}
63+
{{rec.confidence-description}}
64+
65+
</td>
66+
</tr>
67+
{% endfor %}
68+
</tbody>
5669
</table>
57-
<br />
70+
71+
{% endif %}
5872
{% endfor %}
5973

60-
## Recommended resources
74+
<a id="recommended-resources" aria-hidden="true"></a>
75+
76+
## Recommended resources {:#resources}
6177

6278
* Code and templates
6379
* [Compass app source code][] -

0 commit comments

Comments
 (0)