Replace the license property sprite (green/blue/red circles) with individual icons#1324
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces the non-copyable license property sprite markers with text-based glyph markers so that the appendix license table (and other license rule lists) can be copied/pasted with meaningful indicators (Fixes #1322).
Changes:
- Replace
license-spritebackground-image markers with text glyph markers (✓ / ⓘ / ✕) styled via new.license-markerCSS. - Update appendix table and license/overview templates to emit the new marker spans instead of sprite spans.
- Remove the old sprite CSS and responsive overrides; add a small “source” arrow marker in the sidebar.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| assets/css/application.scss | Removes sprite styling and adds .license-marker / .source-marker styles and color rules. |
| _includes/css/responsive.css | Updates small-screen positioning/sizing for the new .license-marker. |
| appendix.md | Swaps sprite spans for text markers in the appendix table and legend so copied output includes markers. |
| _layouts/license.html | Updates license page rule list markers from sprite to text glyphs. |
| _includes/license-overview.html | Updates license overview rule list markers from sprite to text glyphs. |
| _includes/sidebar.html | Replaces sprite with a text arrow marker for the “Source” link. |
| assets/img/license-sprite.png | Removes obsolete sprite asset. |
| assets/img/license-sprite@2x.png | Removes obsolete sprite asset (retina). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <span class="license-marker">{% if type == "permissions" %}✓{% elsif type == "conditions" %}ⓘ{% else %}✕{% endif %}</span> | ||
| {{ rule_obj.label }} |
There was a problem hiding this comment.
The marker glyph selection conditional is duplicated inline here. To improve maintainability, consider computing the marker character once per type (or extracting to an include) and rendering a variable instead, so future symbol changes only need to be made in one place.
See below for a potential fix:
{% assign marker = "" %}
{% if type == "permissions" %}
{% assign marker = "✓" %}
{% elsif type == "conditions" %}
{% assign marker = "ⓘ" %}
{% else %}
{% assign marker = "✕" %}
{% endif %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if page[type] contains req %}
<li class="{{ req }}">
<span class="license-marker">{{ marker }}</span>
| <span class="license-marker">{% if type == "permissions" %}✓{% elsif type == "conditions" %}ⓘ{% else %}✕{% endif %}</span> | ||
| {{ rule_obj.label }} |
There was a problem hiding this comment.
The marker glyph selection conditional is duplicated inline here (and also in other license templates). Consider computing the marker character once per type (or extracting to an include) and rendering a variable instead to avoid having to keep multiple copies in sync.
See below for a potential fix:
{% assign marker = "✕" %}
{% if type == "permissions" %}
{% assign marker = "✓" %}
{% elsif type == "conditions" %}
{% assign marker = "ⓘ" %}
{% endif %}
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if license[type] contains req %}
<li class="{{ req }}">
<span class="license-marker">{{ marker }}</span>
appendix.md
Outdated
| <span class="{{ lite | strip }}" style="margin: auto;"> | ||
| <span class="license-marker {{ r }}">{% if t == "permissions" %}✓{% elsif t == "conditions" %}ⓘ{% else %}✕{% endif %}</span> | ||
| </span> |
There was a problem hiding this comment.
The marker glyph selection logic ({% if ... %}✓{% elsif ... %}ⓘ{% else %}✕{% endif %}) is embedded inline here, and the same conditional is repeated in other templates. Consider assigning a marker variable once per t/type (or extracting to a small include) and rendering {{ marker }} to reduce duplication and keep the symbols consistent across pages.
Fixes #1322