Skip to content

SWF(refactor): ヘッダーとフッターの SNS リンク定義を共通化する - #812

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145855-share-social-links
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1795145855-share-social-links

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

ヘッダーとフッターで3か所ずつ重複していた SNS リンク(URL・aria-label・アイコン名)を src/lib/social-links.ts の socialLinks にまとめました。出力される HTML は変わりません。

変更内容

// src/lib/social-links.ts
export const socialLinks: readonly SocialLink[] = [
  { href: 'https://twitter.com/thisissuree', ariaLabel: 'Twitter profile page (@thisissuree)', icon: 'fa6-brands:x-twitter' },
  // Instagram, GitHub
];
  • HeaderIcons.astro と Footer.astro は socialLinks.map(...) で描画します。
  • 見た目と属性の違いは各コンポーネントに残しました。ヘッダーは HeaderIcon(rel="noopener noreferrer" 付き)、フッターは text-gray-600 のリンク(rel なし)です。
  • RSS リンクはフッターにしかないため、フッターに残しました。

動作の証拠

ネットワークをスタブする build:e2e で、main とこのブランチの dist/ を比べました。48 個の HTML を含む全ファイルが一致します。

$ git stash -u && pnpm run build:e2e && cp -r dist /tmp/e2e-before && git stash pop && pnpm run build:e2e && diff -r /tmp/e2e-before dist; echo "diff exit $?"
diff exit 0

このブランチで出力されたヘッダーとフッターの Twitter リンクです(dist/index.html)。

<a class="rounded p-2 transition-colors hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-800 dark:active:bg-neutral-700" href="https://twitter.com/thisissuree" aria-label="Twitter profile page (@thisissuree)" target="_blank" rel="noopener noreferrer">
<a href="https://twitter.com/thisissuree" aria-label="Twitter profile page (@thisissuree)" target="_blank" class="text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white">
  • pnpm run lint: 0 errors, 0 warnings
  • pnpm run test:e2e --project=chromium: 70 passed, 2 skipped(ヘッダーのビジュアルリグレッションを含む)

通常の build:ci でも比べましたが、外部サイトから取得するリンクカード画像だけがビルドごとに変わったため、証拠には使っていません。

試し方

pnpm run build:e2e && grep -o 'aria-label="[A-Za-z]* profile page[^"]*"' dist/index.html

未確認

実際の画面の確認は QA Engineer に依頼します。


Software Factory opened this PR for Daiki
Implemented in session Share social link data across header and footer
Review with Devin · Open in Devin Desktop


Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3285e53b-4cde-4fc3-848f-6249a8f75d17

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 860d48b Commit Preview URL

Branch Preview URL
Nov 20 2026, 03:44 AM

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

PR 860d48b と merge-base e693614 をローカルのChromiumで比較しました。

  • PASS:1280px/390px、ライト/ダークのヘッダー・フッターSNSアイコン。モバイルはメニュー内を確認し、SNS領域のピクセル差分は全8組で0でした。
  • PASS:href・target・rel、aria-label、アクセシビリティツリーのリンク名、アイコン順序が比較元と一致しました。ヘッダーの rel="noopener noreferrer" と、フッターの rel 属性なしも維持されています。
  • PASS:フッター末尾のRSSリンクからフィードプレビューが開きました。
  • 注意:RSSには既存のChrome XSLT廃止予定の警告が出ます。比較元でも確認しました。画面全体の比較ではデスクトップのダークモードのロゴ外周に27ピクセルの差がありましたが、SNS領域に差はありません。
  • 未確認:実機、Firefox/Safari、スクリーンリーダーの実際の発声、遷移先SNSの表示。
SNSアイコンの比較(左:比較元、右:PR)

デスクトップ・ライト

デスクトップのヘッダーとフッター

モバイル・ライト

モバイルメニューとフッター

ダークモードの比較

デスクトップ・ダーク
モバイル・ダーク

録画(チャプター付きビューア)

録画

検証セッション

This branch has not been deployed

No deployments
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.

0 participants