Skip to content

Commit d4deaaf

Browse files
authored
Improve SIP pages (#3236)
Revamp the SIPs section of the documentation site - **Title rendering**: The page title now dynamically renders as "SIP-XX - Title" by combining the `number` and `title` YAML fields (supports optional `kind` field for SID variants) - **Simplified listing page**: `_sips/all.md` now only lists completed SIPs, with links to GitHub for pending/rejected/withdrawn proposals - **Automated sync**: Added GitHub Action (`.github/workflows/sync-sips.yml`) that syncs SIP content daily from [scala/improvement-proposals](https://github.com/scala/improvement-proposals) and creates a PR if there are changes ### Changes - `_layouts/root-content-layout.html`: Conditional title rendering for SIP pages - `_sips/all.md`: Simplified structure, sorted by number descending. - `.github/workflows/sync-sips.yml`: New workflow for automated content sync - `_sips/sips/`: SIP files in sync with change set of scala/improvement-proposals#120, removed files for non-completed SIPs.
1 parent 4d14fd4 commit d4deaaf

File tree

76 files changed

+513
-382
lines changed

Some content is hidden

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

76 files changed

+513
-382
lines changed

.github/workflows/sync-sips.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Sync SIPs
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *' # Daily at 6 AM UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Fetch SIPs from improvement-proposals
15+
run: |
16+
rm -rf _sips/sips
17+
mkdir -p _sips/sips
18+
git clone --depth 1 --filter=blob:none --sparse https://github.com/scala/improvement-proposals.git /tmp/improvement-proposals
19+
cd /tmp/improvement-proposals
20+
git sparse-checkout set content
21+
cp -r content/* $GITHUB_WORKSPACE/_sips/sips/
22+
23+
- name: Check for changes
24+
id: changes
25+
run: |
26+
git add _sips/sips
27+
if git diff --staged --quiet; then
28+
echo "changed=false" >> $GITHUB_OUTPUT
29+
else
30+
echo "changed=true" >> $GITHUB_OUTPUT
31+
fi
32+
33+
- name: Create Pull Request
34+
if: steps.changes.outputs.changed == 'true'
35+
uses: peter-evans/create-pull-request@v5
36+
with:
37+
commit-message: "Sync SIPs from scala/improvement-proposals"
38+
title: "Sync SIPs from scala/improvement-proposals"
39+
body: |
40+
Automated sync of SIP content from [scala/improvement-proposals](https://github.com/scala/improvement-proposals).
41+
branch: sync-sips
42+
delete-branch: true

_layouts/root-content-layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{% else %}
2121
<div class="supertitle">&nbsp;</div>
2222
{% endif %}
23-
<h1>{{ page.title }}</h1>
23+
<h1>{% if page.layout == 'sip' and page.number %}{{ page.kind | default: 'SIP' }}-{{ page.number }} - {% endif %}{{ page.title }}</h1>
2424
</div>
2525
<div class="search-container">
2626
<div class="icon-search">

_overviews/scala3-book/string-interpolation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,4 +367,4 @@ expansion, executing SQL queries, magic `$"identifier"` representations, and man
367367

368368
[java-format-docs]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#detail
369369
[value-class]: {% link _overviews/core/value-classes.md %}
370-
[sip-11]: {% link _sips/sips/string-interpolation.md %}
370+
[sip-11]: {% link _sips/sips/011-string-interpolation.md %}

_ru/scala3/book/string-interpolation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,4 @@ p"${x/5}, $x" // Point(2.4, 12.0)
410410
[java-format-docs]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#detail
411411

412412
[value-class]: {% link _overviews/core/value-classes.md %}
413-
[sip-11]: {% link _sips/sips/string-interpolation.md %}
413+
[sip-11]: {% link _sips/sips/011-string-interpolation.md %}

_sips/all.md

Lines changed: 15 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,19 @@
22
layout: sips
33
title: List of All SIPs
44

5-
redirect_from:
5+
redirect_from:
66
- "/sips/sip-list.html"
77
- "/sips/pending/index.html"
88
---
99

10-
{% assign sips = site.sips | sort: title %}
10+
{% assign sips = site.sips | sort: 'number' | reverse %}
1111
{% assign sipData = site.data.sip-data %}
1212

13-
## Pre-SIP Discussions
14-
15-
You can find so-called “pre-SIP discussions” in the Scala Contributors forum, under
16-
the category [Scala Improvement Process](https://contributors.scala-lang.org/c/sip/13).
17-
The goal of pre-SIP discussions is to gather initial community feedback and support.
18-
1913
## Pending SIPs
2014

21-
Proposals that are at the design or implementation stage, and that are actively
22-
discussed by the committee and the proposals’ authors. Click on a proposal to
23-
read its content, or the corresponding discussions on GitHub if its design has
24-
not been accepted yet.
25-
26-
<div class="sip-list">
27-
<ul>
28-
{% for sip in sips %}
29-
{% if sip.stage == "design" or sip.stage == "implementation" %}
30-
<li class="no-fragmentation">
31-
<strong>
32-
<a href="{% if sip.pull-request-number %}https://github.com/scala/improvement-proposals/pull/{{ sip.pull-request-number }}{% else %}{{ sip.url }}{% endif %}">
33-
{{ sip.title }}
34-
</a>
35-
</strong>
36-
<div class="tag" style="background-color: {{ sipData[sip.stage].color }}">Stage: {{ sipData[sip.stage].text }}</div>
37-
<div class="tag" style="background-color: {{ sipData[sip.status].color }}">Status: {{ sipData[sip.status].text }}</div>
38-
{% if sip.recommendation %}
39-
<div class="tag" style="background-color: {{ sipData[sip.recommendation].color }}">Recommendation: {{ sipData[sip.recommendation].text }}</div>
40-
{% endif %}
41-
</li>
42-
{% endif %}
43-
{% endfor %}
44-
</ul>
45-
</div>
15+
For proposals that are at the design or implementation stage, and that are actively
16+
discussed by the committee and the proposals' authors, please
17+
refer to the [GitHub PR queue](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+is%3Aopen).
4618

4719
## Completed SIPs
4820

@@ -55,44 +27,25 @@ of the compiler (accepted). Click on a proposal to read its content.
5527
{% for sip in sips %}
5628
{% if sip.stage == "completed" %}
5729
<li class="no-fragmentation">
58-
<strong><a href="{{ sip.url }}">{{ sip.title }}</a></strong>
30+
<strong><a href="{{ sip.url }}">{{ sip.kind | default: 'SIP' }}-{{ sip.number }} - {{ sip.title }}</a></strong>
5931
<div class="tag" style="background-color: {{ sipData[sip.status].color }}">{{ sipData[sip.status].text }}</div>
6032
</li>
6133
{% endif %}
62-
{% endfor %}
34+
{% endfor %}
6335
</ul>
6436
</div>
6537

6638
## Rejected SIPs
6739

68-
Proposals that have been rejected by the committee. Click on a proposal to read the
69-
corresponding discussions on GitHub.
70-
71-
<div class="sip-list">
72-
<ul>
73-
{% for sip in sips %}
74-
{% if sip.status == "rejected" %}
75-
<li>
76-
<strong><a href="https://github.com/scala/improvement-proposals/pull/{{ sip.pull-request-number }}">{{ sip.title }}</a></strong>
77-
</li>
78-
{% endif %}
79-
{% endfor %}
80-
</ul>
81-
</div>
40+
Please refer to [GitHub](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+label%3Astatus%3Arejected) for proposals that have been rejected by the committee and the corresponding discussions.
8241

8342
## Withdrawn SIPs
8443

85-
Proposals that have been withdrawn by their authors. Click on a proposal to read the
86-
corresponding discussions on GitHub.
44+
Please refer to [GitHub](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+label%3Astatus%3Awithdrawn) for proposals that have been withdrawn
45+
and the corresponding discussions.
8746

88-
<div class="sip-list">
89-
<ul>
90-
{% for sip in sips %}
91-
{% if sip.status == "withdrawn" %}
92-
<li>
93-
<strong><a href="https://github.com/scala/improvement-proposals/pull/{{ sip.pull-request-number }}">{{ sip.title }}</a></strong>
94-
</li>
95-
{% endif %}
96-
{% endfor %}
97-
</ul>
98-
</div>
47+
## Pre-SIP Discussions
48+
49+
You can find so-called “pre-SIP discussions” in the Scala Contributors forum, under
50+
the category [Scala Improvement Process](https://contributors.scala-lang.org/c/sip/13).
51+
The goal of pre-SIP discussions is to gather initial community feedback and support.

_sips/sips/named-and-default-arguments.md renamed to _sips/sips/001-named-and-default-arguments.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2+
kind: SID
23
layout: sip
3-
title: SID-1 Named and Default Arguments
4-
stage: completed
5-
status: shipped
4+
number: 1
65
permalink: /sips/:title.html
76
redirect_from: /sips/pending/named-and-default-arguments.html
7+
stage: completed
8+
status: shipped
9+
title: Named and Default Arguments
810
---
911

1012
**Lukas Rytz**
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2+
kind: SID
23
layout: sip
3-
title: SID-2 Scala Compiler Phase and Plug-In Initialization for Scala 2.8
4-
stage: completed
5-
status: shipped
4+
number: 2
65
permalink: /sips/:title.html
76
redirect_from: /sips/pending/scala-compiler-phase-plugin-in.html
7+
stage: completed
8+
status: shipped
9+
title: Scala Compiler Phase and Plug-In Initialization for Scala 2.8
810
---
911

1012
This was an older SID that can be found [here](https://www.scala-lang.org/sid/2)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2+
kind: SID
23
layout: sip
3-
title: SID-3 - New Collection classes
4-
stage: completed
5-
status: shipped
4+
number: 3
65
permalink: /sips/:title.html
76
redirect_from: /sips/pending/new-collection-classes.html
7+
stage: completed
8+
status: shipped
9+
title: New Collection classes
810
---
911

1012
This was an older SID that can be found [here](https://www.scala-lang.org/sid/3)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2+
kind: SID
23
layout: sip
3-
title: SID-4 - Early Member Definitions
4-
stage: completed
5-
status: shipped
4+
number: 4
65
permalink: /sips/:title.html
76
redirect_from: /sips/pending/early-member-definitions.html
7+
stage: completed
8+
status: shipped
9+
title: Early Member Definitions
810
---
911

1012
This was an older SID that can be found [here](https://www.scala-lang.org/sid/4)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2+
kind: SID
23
layout: sip
3-
title: SID-5 - Internals of Scala Annotations
4-
stage: completed
5-
status: shipped
4+
number: 5
65
permalink: /sips/:title.html
76
redirect_from: /sips/pending/internals-of-scala-annotations.html
7+
stage: completed
8+
status: shipped
9+
title: Internals of Scala Annotations
810
---
911

1012
This was an older SID that can be found [here](https://www.scala-lang.org/sid/5)

0 commit comments

Comments
 (0)