Skip to content

Commit 89a8560

Browse files
authored
Merge pull request #60 from WebView-CG/baseline
Show partial support for web-features and add notes for unsupported keys in BCD calculations
2 parents 6429b0f + bc3838d commit 89a8560

File tree

9 files changed

+522
-236
lines changed

9 files changed

+522
-236
lines changed

.github/workflows/update_version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
git config user.name github-actions
2727
git config user.email [email protected]
2828
git add bcd_version
29+
git add package-lock.json
2930
git diff --quiet && git diff --staged --quiet || git commit -m "Update bcd version"
3031
git push
3132
- name: Notify failed build

_js/compare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ permalink: "/assets/js/compare.js"
299299
let features = this.buildFeaturesBySupportObject();
300300
this.buildResultsAsTable(features.m, 'Mixed support');
301301
this.buildResultsAsTags(features.y, 'Supported', 'supported');
302-
this.buildResultsAsTags(features.a, 'Partial support', 'mitigated');
302+
this.buildResultsAsTags(features.a, 'Partial support', 'partial');
303303
this.buildResultsAsTags(features.n, 'Not supported', 'unsupported');
304304
this.buildResultsAsTags(features.u, 'Support unknown', 'unknown');
305305
}

_layouts/feature.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,20 +176,27 @@ <h4 class="data-platform-name">
176176
<div class="data-notes">
177177
{% if has-page-notes == true or page.notes_by_num.size > 0 %}
178178
<h2 class="list-title">Notes</h2>
179-
{% if has-page-notes == true %}
180-
{{ page.notes | markdownify }}
181-
{% endif %}
182179
{% if page.notes_by_num.size > 0 %}
180+
<h3 class="list-subtitle">Unsupported keys in WebViews</h3>
183181
<ul class="data-notes-list">
184182
{% for note in page.notes_by_num %}
185183
{% assign note-key = note | first %}
186184
{% assign note-value = note | last %}
187185
<li class="data-note" id="{{ page.slug }}-cite-note-{{ note-key | slugify }}">
188-
<span class="data-note-key">{{ note-key }}</span> {{ note-value | markdownify }}
186+
<b>{{ site.data.nicenames.family[note-key] }}:</b>
187+
<div class="note-tags">
188+
{% assign note-items = note-value | split: ',' %}
189+
{% for item in note-items %}
190+
<span class="tag unsupported">{{ item | strip }}</span>
191+
{% endfor %}
192+
</div>
189193
</li>
190194
{% endfor %}
191195
</ul>
192196
{% endif %}
197+
{% if has-page-notes == true %}
198+
{{ page.notes | markdownify }}
199+
{% endif %}
193200
{% endif %}
194201
{% if page.links.size > 0 %}
195202
<h2 class="list-title">Resources</h2>

_plugins/generated_features.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ def generate_baseline(site)
153153
doc.data['description'] = feature['description']
154154
doc.data['slug'] = feature['slug']
155155
doc.data['category'] = feature['category']
156-
doc.data['keywords'] = 'todo'
156+
doc.data['keywords'] = 'baseline'
157157
doc.data['last_test_date'] = feature['last_test_date']
158158
doc.data['notes'] = data_source
159159
doc.data['links'] = feature['links']
160160
doc.data['stats'] = feature['stats']
161+
doc.data['notes_by_num'] = feature['notes_by_num']
161162
doc.data['baseline'] = feature['baseline']
162163

163164
site.collections['generated_features'].docs << doc

_sass/_pages/_feature.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@
200200
background-color: #eda745 !important;
201201
}
202202

203+
.partially-header {
204+
color: #eda745 !important;
205+
}
206+
203207
.score .mitigated {
204208
background-image: repeating-linear-gradient(
205209
-45deg,
@@ -678,6 +682,17 @@
678682
}
679683
}
680684

685+
.note-tags {
686+
display: inline-flex;
687+
flex-wrap: wrap;
688+
gap: rem(4px);
689+
margin-top: rem(4px);
690+
691+
.tag {
692+
font-size: rem(14px);
693+
}
694+
}
695+
681696
.data-note-key {
682697
display: flex;
683698
justify-content: center;

0 commit comments

Comments
 (0)