Skip to content

feat(web-demo): add GitHub repository link - #11

Merged
shps951023 merged 2 commits into
mini-software:mainfrom
doggy8088:feat/browser-lab-github-link
Sep 13, 2026
Merged

feat(web-demo): add GitHub repository link#11
shps951023 merged 2 commits into
mini-software:mainfrom
doggy8088:feat/browser-lab-github-link

Conversation

@doggy8088

@doggy8088 doggy8088 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a GitHub repository icon to the Browser Lab header so users can open the upstream MiniExcel Rust repository directly.

Changes

  • add an accessible GitHub icon link to the top navigation
  • open the external link in a new tab with noopener noreferrer
  • style hover and keyboard focus states consistently with the Browser Lab UI
  • verify the link URL, target, and relationship attributes in desktop and mobile E2E tests

Validation

  • npm ci
  • npm run build
  • npm run test:e2e

A 320px overflow regression found during maintainer review is addressed separately in #13 because the contributor branch did not allow maintainer edits.

在 Browser Lab 頂端列最右側新增 GitHub 圖示,讓使用者能直接回到
MiniExcel.Rust 上游儲存庫,並維持桌面版與行動版的頂端列版面。

實作內容:
- 使用原生 anchor 元素連結至 https://github.com/mini-software/MiniExcel-Rust。
- 以內嵌 SVG 呈現 GitHub 標誌,並以 aria-label 提供可存取名稱。
- 使用 target="_blank" 與 rel="noopener noreferrer" 開啟外部儲存庫。
- 新增一般、滑鼠移入與鍵盤 focus 狀態的圖示按鈕樣式。
- 將 GitHub 連結加入 Browser Lab 桌面版與行動版 E2E 覆蓋範圍。

影響範圍:
- web-demo/public/index.html:新增右上角 GitHub 連結與可存取的 SVG 圖示。
- web-demo/public/styles.css:新增 GitHub 圖示連結的尺寸、色彩與互動樣式。
- web-demo/tests/browser.spec.mjs:驗證 GitHub 連結的可見名稱與目標網址。

驗證項目:
- npm ci
- npm run build
- npm run test:e2e:14 項通過、4 項依既有桌面/行動版篩選條件跳過。
- 桌面版與 Pixel 7 行動版截圖檢查:圖示位於右上角,且沒有橫向溢位。
Copilot AI lite review requested due to automatic review settings September 13, 2026 04:56
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c8e50513-f849-4fe3-9db2-8e42bf5fc262

📥 Commits

Reviewing files that changed from the base of the PR and between 9e9fde6 and 5e2d04e.

📒 Files selected for processing (1)
  • web-demo/tests/browser.spec.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The web demo adds a GitHub repository link to the top navigation, styles it as an icon button, and verifies its destination and link attributes in the browser test.

Changes

GitHub Repository Link

Layer / File(s) Summary
Navigation link and browser validation
web-demo/public/index.html, web-demo/public/styles.css, web-demo/tests/browser.spec.mjs
The navigation adds a protected external GitHub link with an accessible label and inline SVG icon. CSS adds its default and hover styles. The browser test verifies the repository URL, _blank target, and noopener noreferrer relationship.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: shps951023

Merge Risk: ⚪ Minimal · up to 5e2d0

The repository-link change is localized and its URL, accessibility, security attributes, and focus behavior are covered by the supplied evidence.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the web demo feature: adding a GitHub repository link icon. It matches the primary change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

🟡 Changes recommended

Address the narrow-width overflow risk and strengthen assertions for target and rel.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an accessible GitHub repository link icon to the Browser Lab header.

Changes:

  • Added external GitHub link with inline SVG.
  • Added styling for hover and focus states.
  • Added desktop and mobile E2E coverage.
File summaries
File Review summary
web-demo/tests/browser.spec.mjs Nit (3 votes): also assert target and rel.
web-demo/public/styles.css Moderate (1 vote): address potential 320px mobile overflow and add narrow-width E2E coverage.
web-demo/public/index.html Adds the GitHub link and SVG icon.
Review details

Suppressed comments (1)

web-demo/public/styles.css:198

  • The mobile .topbar remains a single non-wrapping flex row, while this adds another fixed 34px item to the badge, implementation switch, gaps, and brand. At the declared 320px minimum viewport, those intrinsic widths exceed the 296px content width and can introduce horizontal overflow; the current check only covers Pixel 7 (412px). Add a narrow-width fallback (such as allowing the actions to shrink/wrap or collapsing the badge) and cover that width in E2E.
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread web-demo/tests/browser.spec.mjs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@shps951023
shps951023 merged commit 2e527ba into mini-software:main Sep 13, 2026
27 checks passed
@shps951023

Copy link
Copy Markdown
Member

感謝貢獻!我已完成程式碼 review,GitHub 連結的可存取名稱、外部連結安全屬性與既有桌面/行動版測試都沒有問題。另在 320px 最窄視口確認到頂端列會產生水平捲動;由於此 PR 未開放 maintainer edits,我會在合併後立即以獨立上游 PR 補上窄螢幕樣式與回歸測試。最終 squash commit 會使用英文標題與內容。

@shps951023 shps951023 changed the title feat(web-demo): 新增 GitHub 儲存庫連結圖示 feat(web-demo): add GitHub repository link Sep 13, 2026
@shps951023

Copy link
Copy Markdown
Member

後續修正已透過 #13 完成並合併:320px 視口不再產生水平捲動,且新增最窄行動版 Playwright 回歸測試。完整 Browser Lab E2E 結果為 23 passed、10 skipped,所有 CI checks 皆通過。再次感謝貢獻!

@doggy8088
doggy8088 deleted the feat/browser-lab-github-link branch September 13, 2026 15:16
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