Skip to content

Refactor: 社團活動、競賽得獎獨立為json檔。Chore: ESLint設定檔修正、Actions升級。 - #174

Merged
Pencil126 merged 12 commits into
FCU-iOSClub:masterfrom
Pencil126:master
Apr 2, 2026
Merged

Refactor: 社團活動、競賽得獎獨立為json檔。Chore: ESLint設定檔修正、Actions升級。#174
Pencil126 merged 12 commits into
FCU-iOSClub:masterfrom
Pencil126:master

Conversation

@Pencil126

Copy link
Copy Markdown
Member

No description provided.

@Pencil126 Pencil126 changed the title Refactor: 社團活動、競賽得獎獨立為json檔。 Refactor: 社團活動、競賽得獎獨立為json檔。Chore: ESLint設定檔修正、Actions升級。 Apr 2, 2026
@Pencil126
Pencil126 requested a review from Copilot April 2, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the site’s “社團活動” and “競賽得獎” content to be sourced from JSON under src/data/ (queried via Gatsby GraphQL) and includes maintenance updates such as ESLint flat-config migration, CI workflow updates, and dependency bumps.

Changes:

  • Move club activities and contest award lists into JSON files under src/data/activities/ and src/data/contest/, and update pages to query allActivitiesJson / allContestJson.
  • Centralize external navigation links via src/constants/navigation.js and reuse it from index.js / navbar.js.
  • Migrate ESLint to eslint.config.mjs, update GitHub Actions Node setup, and refresh dependencies/lockfile.

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Dependency/lockfile updates (ESLint/Tailwind/PostCSS/etc).
src/templates/member_page.js Switch statement cleanup for icon rendering.
src/templates/gallery.js Add React key to mapped anchor elements.
src/pages/index.js Use EXTERNAL_LINKS.joinUs and add rel for external links.
src/pages/course.js Replace non-link <a> elements with <span> for semantics.
src/pages/contest.js Load contest data from allContestJson via GraphQL and render dynamically.
src/pages/companion.js Replace custom button markup with shared SliderButton.
src/pages/club_activities.js Load activities from allActivitiesJson via GraphQL; minor URL change.
src/data/contest/2026.json Add 2026 contest awards dataset.
src/data/contest/2025.json Add 2025 contest awards dataset.
src/data/contest/2024.json Add 2024 contest awards dataset.
src/data/contest/2023.json Add 2023 contest awards dataset.
src/data/contest/2022.json Add 2022 contest awards dataset.
src/data/contest/2021.json Add 2021 contest awards dataset.
src/data/contest/2020.json Add 2020 contest awards dataset.
src/data/contest/2019.json Add 2019 contest awards dataset.
src/data/contest/2018.json Add 2018 contest awards dataset.
src/data/contest/2017.json Add 2017 contest awards dataset.
src/data/activities/114.json Add activities for academic year 114.
src/data/activities/113.json Add activities for academic year 113.
src/data/activities/112.json Add activities for academic year 112.
src/data/activities/111.json Add activities for academic year 111.
src/constants/navigation.js Introduce EXTERNAL_LINKS constant for external URLs.
src/components/navbar.js Use EXTERNAL_LINKS.joinUs for Join Us button.
src/components/image-with-placeholder.js Fix React attribute casing (fetchPriority).
README.md Document how to add activities/contest JSON data.
package.json Add Node/Yarn engines, add/update lint/build tool dependencies.
eslint.config.mjs Add ESLint flat config (replacing legacy .eslintrc.js).
AGENTS.md Update repo structure docs for new activities/ and contest/ data dirs.
.github/workflows/prettier_check.yml Update checkout/setup-node actions and Node version usage.
.github/workflows/build.yml Update checkout/setup-node actions and Node version usage.
.eslintrc.js Remove legacy ESLint config file.

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

Comment thread src/pages/index.js
Comment thread src/data/activities/113.json Outdated
Comment thread src/pages/contest.js Outdated
Comment thread src/pages/contest.js Outdated
Pencil126 and others added 2 commits April 2, 2026 15:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/prettier_check.yml:21

  • This job runs npx prettier without installing project dependencies, so CI will use whatever Prettier version npx resolves at runtime (which may differ from the repo’s pinned Prettier) and can cause formatting drift over time. Consider installing deps (e.g., yarn --frozen-lockfile) and running the project’s Prettier, or pinning the Prettier version explicitly in the npx command.
      - name: Checkout Code
        uses: actions/checkout@v6
      - name: Setup Node
        uses: actions/setup-node@v6
        with:
          node-version: "22"
      - name: Prettier Check
        run: npx prettier --check .

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

Comment thread eslint.config.mjs
@Pencil126
Pencil126 merged commit 93a232e into FCU-iOSClub:master Apr 2, 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.

2 participants