Skip to content

Commit 2bde52d

Browse files
committed
GC Subway: removed transition code as it broke certain implementations
1 parent b607374 commit 2bde52d

3 files changed

Lines changed: 44 additions & 24 deletions

File tree

_data/components.json

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,9 +2797,6 @@
27972797
"@context": {
27982798
"@version": 1.1,
27992799
"dct": "http://purl.org/dc/terms/",
2800-
"title": {
2801-
"@id": "dct:title", "@container": "@language"
2802-
},
28032800
"title": { "@id": "dct:title", "@container": "@language" },
28042801
"description": { "@id": "dct:description", "@container": "@language" },
28052802
"modified": "dct:modified"
@@ -2812,10 +2809,10 @@
28122809
"en": "Break up long and complex content into pages that each focus on a step or specific answer people need before moving to the next step or section.",
28132810
"fr": "Diviser du contenu long et complexe en pages qui se concentrent chacune sur une étape ou une réponse spécifique dont les gens ont besoin avant de passer à l'étape ou à la section suivante."
28142811
},
2815-
"modified": "2025-11-20",
2812+
"modified": "2026-02-27",
28162813
"componentName": "gc-subway",
28172814
"status": "stable",
2818-
"version": "1.0",
2815+
"version": "1.0.1",
28192816
"pages": {
28202817
"examples": [
28212818
{
@@ -2918,7 +2915,7 @@
29182915
"en": "https://design.canada.ca/common-design-patterns/subway-navigation.html",
29192916
"fr": "https://conception.canada.ca/configurations-conception-communes/navigation-metro.html"
29202917
},
2921-
"iteration": "_:iteration_subway_2",
2918+
"iteration": "_:iteration_subway_3",
29222919
"example": [
29232920
{
29242921
"en": { "href": "index-en.html", "text": "Index page" },
@@ -2953,6 +2950,10 @@
29532950
"_:implement_subway_1"
29542951
],
29552952
"history": [
2953+
{
2954+
"en": "February 2026 - Removed code to adjust previous implementations of the pattern as it was breaking some pages that had a bad implementation.",
2955+
"fr": "Février 2026 - Supprimé le code pour ajuster les implémentations précédentes du modèle car cela cassait certaines pages qui avaient une mauvaise implémentation."
2956+
},
29562957
{
29572958
"en": "November 2025 - Stabilized the component",
29582959
"fr": "Novembre 2025 - Stabilisé le composant"
@@ -2967,7 +2968,7 @@
29672968
"implementation": [
29682969
{
29692970
"@id": "_:implement_subway_1",
2970-
"iteration": "_:iteration_subway_2",
2971+
"iteration": "_:iteration_subway_3",
29712972
"name": {
29722973
"en": "Standard",
29732974
"fr": "Standard"
@@ -3021,11 +3022,23 @@
30213022
}
30223023
],
30233024
"iteration": [
3025+
{
3026+
"@id": "_:iteration_subway_3",
3027+
"name": "Subway - Iteration 3",
3028+
"date": "2026-02",
3029+
"detectableBy": ".gc-subway",
3030+
"predecessor": "_:iteration_subway_2",
3031+
"fixes": [
3032+
"Removed code to adjust previous implementations of the pattern as it was breaking some pages that had a bad implementation."
3033+
]
3034+
},
30243035
{
30253036
"@id": "_:iteration_subway_2",
30263037
"name": "Subway - Iteration 2",
30273038
"date": "2025-11",
30283039
"detectableBy": ".gc-subway",
3040+
"predecessor": "_:iteration_subway_1",
3041+
"successor": "_:iteration_subway_3",
30293042
"assets": [
30303043
{
30313044
"@type": "source-code",
@@ -3045,6 +3058,7 @@
30453058
"name": "Subway - Iteration 1",
30463059
"date": "2021-03",
30473060
"detectableBy": ".gc-subway.provisional",
3061+
"successor": "_:iteration_subway_2",
30483062
"assets": [
30493063
{
30503064
"@type": "source-code",
@@ -3065,7 +3079,7 @@
30653079
"@id": "_:cs_subway",
30663080
"name": "Subway navigation",
30673081
"status": "stable",
3068-
"baseOnIteration": "_:iteration_subway_2",
3082+
"baseOnIteration": "_:iteration_subway_3",
30693083
"detectableBy": ".gc-subway",
30703084
"layout": "The layout for the index page is different from the sections pages. The Subway navigation code snippet for the <strong>index</strong> page can be placed anywhere within the content of the page (<code>&lt;main&gt;</code>). However, make sure the heading level is appropriate. Also, the sub-section items must not be included in the index page.",
30713085
"style": "The active class is mandatory and is to be added to the active page's link (<a>) in the Subway navigation. Additionally, an optional class of no-line can be applied to a sub-section list (<ul>). It will remove the vertical line connecting all sub-sections. It will also add a horizontal line connecting the active sub-section with the main subway line.",

components/gc-subway/gc-subway.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ var $document = wb.doc,
7878
elm.classList.add( "no-blink" );
7979
}
8080

81-
//To support previous implementations
82-
var pager = document.querySelector( ".pager" ),
83-
nav = pager.closest( "nav" );
84-
85-
if ( !nav.classList.contains( navigationClass ) ) {
86-
nav.classList.add( navigationClass );
87-
}
88-
8981
$subwayLinks = $( selector + " a, ." + mainClass + " .gc-subway-pagination a" );
9082

9183
// Duplicating GC-Subway links for single-page application feel on mobile

components/gc-subway/index.json-ld

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"@context": {
33
"@version": 1.1,
44
"dct": "http://purl.org/dc/terms/",
5-
"title": {
6-
"@id": "dct:title", "@container": "@language"
7-
},
85
"title": { "@id": "dct:title", "@container": "@language" },
96
"description": { "@id": "dct:description", "@container": "@language" },
107
"modified": "dct:modified"
@@ -17,10 +14,10 @@
1714
"en": "Break up long and complex content into pages that each focus on a step or specific answer people need before moving to the next step or section.",
1815
"fr": "Diviser du contenu long et complexe en pages qui se concentrent chacune sur une étape ou une réponse spécifique dont les gens ont besoin avant de passer à l'étape ou à la section suivante."
1916
},
20-
"modified": "2025-11-20",
17+
"modified": "2026-02-27",
2118
"componentName": "gc-subway",
2219
"status": "stable",
23-
"version": "1.0",
20+
"version": "1.0.1",
2421
"pages": {
2522
"examples": [
2623
{
@@ -123,7 +120,7 @@
123120
"en": "https://design.canada.ca/common-design-patterns/subway-navigation.html",
124121
"fr": "https://conception.canada.ca/configurations-conception-communes/navigation-metro.html"
125122
},
126-
"iteration": "_:iteration_subway_2",
123+
"iteration": "_:iteration_subway_3",
127124
"example": [
128125
{
129126
"en": { "href": "index-en.html", "text": "Index page" },
@@ -158,6 +155,10 @@
158155
"_:implement_subway_1"
159156
],
160157
"history": [
158+
{
159+
"en": "February 2026 - Removed code to adjust previous implementations of the pattern as it was breaking some pages that had a bad implementation.",
160+
"fr": "Février 2026 - Supprimé le code pour ajuster les implémentations précédentes du modèle car cela cassait certaines pages qui avaient une mauvaise implémentation."
161+
},
161162
{
162163
"en": "November 2025 - Stabilized the component",
163164
"fr": "Novembre 2025 - Stabilisé le composant"
@@ -172,7 +173,7 @@
172173
"implementation": [
173174
{
174175
"@id": "_:implement_subway_1",
175-
"iteration": "_:iteration_subway_2",
176+
"iteration": "_:iteration_subway_3",
176177
"name": {
177178
"en": "Standard",
178179
"fr": "Standard"
@@ -226,11 +227,23 @@
226227
}
227228
],
228229
"iteration": [
230+
{
231+
"@id": "_:iteration_subway_3",
232+
"name": "Subway - Iteration 3",
233+
"date": "2026-02",
234+
"detectableBy": ".gc-subway",
235+
"predecessor": "_:iteration_subway_2",
236+
"fixes": [
237+
"Removed code to adjust previous implementations of the pattern as it was breaking some pages that had a bad implementation."
238+
]
239+
},
229240
{
230241
"@id": "_:iteration_subway_2",
231242
"name": "Subway - Iteration 2",
232243
"date": "2025-11",
233244
"detectableBy": ".gc-subway",
245+
"predecessor": "_:iteration_subway_1",
246+
"successor": "_:iteration_subway_3",
234247
"assets": [
235248
{
236249
"@type": "source-code",
@@ -250,6 +263,7 @@
250263
"name": "Subway - Iteration 1",
251264
"date": "2021-03",
252265
"detectableBy": ".gc-subway.provisional",
266+
"successor": "_:iteration_subway_2",
253267
"assets": [
254268
{
255269
"@type": "source-code",
@@ -270,7 +284,7 @@
270284
"@id": "_:cs_subway",
271285
"name": "Subway navigation",
272286
"status": "stable",
273-
"baseOnIteration": "_:iteration_subway_2",
287+
"baseOnIteration": "_:iteration_subway_3",
274288
"detectableBy": ".gc-subway",
275289
"layout": "The layout for the index page is different from the sections pages. The Subway navigation code snippet for the <strong>index</strong> page can be placed anywhere within the content of the page (<code>&lt;main&gt;</code>). However, make sure the heading level is appropriate. Also, the sub-section items must not be included in the index page.",
276290
"style": "The active class is mandatory and is to be added to the active page's link (<a>) in the Subway navigation. Additionally, an optional class of no-line can be applied to a sub-section list (<ul>). It will remove the vertical line connecting all sub-sections. It will also add a horizontal line connecting the active sub-section with the main subway line.",

0 commit comments

Comments
 (0)