Skip to content

Collapse table of contents by default on 9 workshops (27 files, 5 languages)#625

Merged
ozhang22 merged 4 commits into
NuevoFoundation:masterfrom
beagandica:fix/toc-consistency
May 6, 2026
Merged

Collapse table of contents by default on 9 workshops (27 files, 5 languages)#625
ozhang22 merged 4 commits into
NuevoFoundation:masterfrom
beagandica:fix/toc-consistency

Conversation

@beagandica
Copy link
Copy Markdown
Member

Summary

Collapses the table of contents by default on 9 workshops that were showing fully expanded activity lists on their landing pages. Covers all language versions (27 files across English, Portuguese, Spanish, Korean).

Problem

Some workshops used a bare {{% children /%}} shortcode in their _index.md, which renders every activity as an expanded bullet list on the landing page. This is overwhelming for young learners who see 10-20 activity links before any content. Meanwhile, 30+ workshops already use the collapsible <details close> pattern (e.g., python-earsketch, web-basics, chatbot).

Fix

Wrap {{% children /%}} in <details close> with a "Table of Contents" summary, matching the established pattern. The TOC starts collapsed — learners see the intro content first and can expand the TOC when ready.

Workshops fixed

Workshop Languages Files
python-pixel (+2 sub-sections) EN, PT-BR 6
security EN, PT-BR, ES, KR 4
security-fundamentals EN, PT-BR, KR 3
security-phishing EN, PT-BR, KR 3
debugging EN, PT-BR 2
ml-machine-learning EN, PT-BR, KR 3
sql_workshop EN, PT-BR, ES 3
engdesign-distance EN 1
unity EN, PT-BR 2
Total 5 languages 27 files

Languages affected

  • English (11 files)
  • Brazilian Portuguese (11 files)
  • Spanish (2 files)
  • Korean (3 files)
  • All other languages verified: no workshops need this fix

Testing

  • Hugo build passes
  • Generated HTML shows <details close> wrapper around TOC
  • 30+ workshops already use this pattern successfully

@ozhang22
Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates workshop landing pages so the activities list (“children” shortcode) is collapsed by default, reducing visual overload on first load across multiple languages.

Changes:

  • Wraps {{% children /%}} in a collapsible <details> TOC block on affected workshop _index.md pages.
  • Adjusts TOC labels (<summary>...) per language (e.g., “목차”, “Tabla de contenido”, “Tabela de Conteúdos”).
  • Updates front matter date fields on many pages to 2026-04-25... (not mentioned in the PR description).

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 46 comments.

Show a summary per file
File Description
content/korean/security/_index.md Collapsible TOC wrapper added; date changed
content/korean/security-phishing/_index.md Collapsible TOC wrapper added; date changed
content/korean/security-fundamentals/_index.md Collapsible TOC wrapper added; date changed
content/korean/ml-machine-learning/_index.md Collapsible TOC wrapper added
content/espanol/sql_workshop/_index.md Collapsible TOC wrapper added; date changed
content/espanol/security/_index.md Collapsible TOC wrapper added; date changed
content/espanol/security-phishing/_index.md TOC summary updated; date changed
content/english/unity/_index.md Collapsible TOC wrapper added; date changed
content/english/sql_workshop/_index.md Collapsible TOC wrapper added; date changed
content/english/security/_index.md Collapsible TOC wrapper added; date changed
content/english/security-phishing/_index.md Collapsible TOC wrapper added; date changed
content/english/security-fundamentals/_index.md Collapsible TOC wrapper added; date changed
content/english/python-pixel/colors_and_pixels/_index.md Collapsible children list added (replaces prior heading)
content/english/python-pixel/_index.md Collapsible TOC wrapper added
content/english/python-pixel/Activities/_index.md Collapsible children list added (replaces prior heading)
content/english/ml-machine-learning/_index.md Collapsible TOC wrapper added
content/english/engdesign-distance/_index.md Collapsible TOC wrapper added
content/english/debugging/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/unity/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/sql_workshop/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/security/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/security-phishing/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/security-fundamentals/_index.md Collapsible TOC wrapper added; date changed
content/brazilian-portuguese/python-pixel/colors_and_pixels/_index.md Collapsible children list added (replaces prior heading)
content/brazilian-portuguese/python-pixel/_index.md Collapsible TOC wrapper added
content/brazilian-portuguese/python-pixel/Activities/_index.md Collapsible children list added (replaces prior heading)
content/brazilian-portuguese/ml-machine-learning/_index.md Collapsible TOC wrapper added
content/brazilian-portuguese/debugging/_index.md Collapsible TOC wrapper added; date changed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread content/english/security-phishing/_index.md
Comment thread content/english/security-fundamentals/_index.md
Comment thread content/english/python-pixel/colors_and_pixels/_index.md
Comment thread content/english/python-pixel/Activities/_index.md
Comment thread content/espanol/sql_workshop/_index.md
Comment thread content/brazilian-portuguese/sql_workshop/_index.md
Comment thread content/brazilian-portuguese/security-fundamentals/_index.md
Comment thread content/espanol/security-phishing/_index.md
Comment thread content/english/sql_workshop/_index.md Outdated
title: "SQL: Saving the Galaxy"
description: "Learning Basic SQL Commands"
date: 2019-07-25T13:24:17-07:00
date: 2026-04-25T00:00:00-07:00
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change updates the front matter date to 2026-04-25..., which is a major metadata change (sorting/“last updated” display) and isn’t described in the PR. If the goal is only to collapse the TOC, please revert date to its original value; if you need to track modifications, consider using lastmod instead (or rely on Git-based lastmod).

Copilot uses AI. Check for mistakes.
@ozhang22
Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Beatris Mendez Gandica and others added 3 commits April 28, 2026 18:55
Workshops using bare {{% children /%}} shortcode displayed a fully
expanded table of contents on their landing page, showing every
activity as a bullet list. This is overwhelming for young learners.

Fix: wrap {{% children /%}} in <details close> elements so the TOC
starts collapsed. Users can click to expand when they want the full
list. This matches the pattern already used by 30+ other workshops
(e.g. python-earsketch, chatbot, web-basics).

English workshops fixed (9):
- python-pixel (+ 2 sub-section _index files)
- security, security-fundamentals, security-phishing
- debugging, ml-machine-learning, sql_workshop
- engdesign-distance, unity

Translations fixed (16 files across 4 languages):
- Brazilian Portuguese: all 9 workshops + 2 sub-sections
- Spanish: security, sql_workshop
- Korean: security, security-fundamentals, security-phishing,
  ml-machine-learning

Co-authored-by: Copilot <[email protected]>
…eadings

- Remove invalid 'close' attribute from <details> (not a valid HTML attr)
- Remove duplicate H2 headings that duplicated the <summary> text
- Localize <summary> per language (PT-BR, ES, KO) instead of hardcoded English
- Fix PT-BR security-fundamentals: English 'Table of Contents' -> 'Tabela de Conteudos'
- Fix ES security-phishing: 'Sections' -> 'Tabla de contenido' + remove dup H2
- Add ES security-phishing to the consistency fix (was missing from original set)

28 files across 5 languages, Hugo build passes.

Co-authored-by: Copilot <[email protected]>
@beagandica beagandica force-pushed the fix/toc-consistency branch from 5dc3d91 to b63f8d8 Compare April 29, 2026 02:11
beagandica pushed a commit to beagandica/workshops that referenced this pull request Apr 29, 2026
Tier 1 quality guardrails for NuevoFoundation workshops:

- PR template: checklist for Hugo build, images, alt text, YAML, translations
- Content quality CI: checks for uppercase extensions, unquoted HTML attrs,
  duplicate YAML keys, missing alt text on all content PRs
- Translation parity CI: flags when English changes have untouched translations
- CONTRIBUTING.md: complete contributor guide covering folder structure,
  frontmatter templates, image guidelines, translation rules, testing steps
- .editorconfig: standardize UTF-8, LF endings, final newline, 2-space indent

Prevents recurrence of issues fixed in PRs NuevoFoundation#609, NuevoFoundation#622, NuevoFoundation#623, NuevoFoundation#624, NuevoFoundation#625.

Co-authored-by: Copilot <[email protected]>
title: "C: O Processo de Depuração"
description: "Uma introdução à depuração de programas"
date: 2021-10-13T00:00:00Z
title: "C: O Processo de Depuração"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beagandica seems like Agency messed up the portuguese text

Restores files from master and re-applies only the intended structural changes (date update, alwaysopen: false, and details wrapper for the two PT-BR files that needed it). The agency's tooling had decoded UTF-8 bytes as CP437/CP1252, mangling characters across:

- 4 Korean files: ml-machine-learning, security, security-fundamentals, security-phishing
- 2 Portuguese files: debugging, unity
- 2 English files: debugging (smart quotes + emoji), sql_workshop (smart quote)

Verified byte-for-byte that all non-ASCII text matches master. Line endings normalized to LF.

Co-authored-by: Copilot <[email protected]>
@ozhang22 ozhang22 merged commit 49763a2 into NuevoFoundation:master May 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants