Skip to content

Conversation

@mather
Copy link
Owner

@mather mather commented Jun 1, 2025

「適当ポエム」フォントの追加

このPRは、手書き風フォント「適当ポエム」をタイマーアプリに追加します。

概要

新しい手書き風フォント「Tekitou-Poem-SemiBold」を統合し、ユーザーがタイマーの前景フォントとして選択できるようになります。

変更内容

フォント追加

  • フォントファイル: Tekitou-Poem-SemiBold.woff2
  • 作者: Hagi42 氏
  • ライセンス: フォント作者のURL付きでクレジット表記

技術的実装

CSS (css/main.scss)

  • @font-face 宣言でフォントを読み込み
  • .timer.tekitou-poem クラスでスタイル適用
  • font-display: swap で読み込みパフォーマンスを最適化

国際化対応 (src/I18n.elm)

  • 日本語: "適当ポエム (手書き)"
  • 英語: "Tekitou Poem (Handwriting)"

データモデル (src/Model.elm)

  • FgFont 型に TekitouPoem バリアントを追加
  • エンコード/デコード処理を更新

UI (src/View.elm)

  • フォント選択ドロップダウンに新オプションを追加

デバッグ強化 (js/common.js)

  • アナリティクスイベントのデバッグログ追加

ユーザーへの影響

  • タイマーの前景フォントとして手書き風の「適当ポエム」フォントが選択可能
  • 既存の機能には影響なし
  • 新しいスタイリングオプションの提供

テスト

Deploy Preview: https://deploy-preview-116--sync-timer.netlify.app


Summary by CodeRabbit

  • New Features

    • Introduced a new "Tekitou Poem (Handwriting)" font option for timers, available in both English and Japanese.
    • Added a selectable font option in the foreground font dropdown menu.
    • Applied a new style for timers using the "Tekitou Poem" font.
  • Style

    • Updated styles to support the new "Tekitou Poem" font for applicable timer elements.
  • Bug Fixes

    • No user-facing bug fixes included in this release.
  • Chores

    • Added debug logging for analytics event parameters (no impact on user experience).

@netlify
Copy link

netlify bot commented Jun 1, 2025

Deploy Preview for sync-timer ready!

Name Link
🔨 Latest commit 6151985
🔍 Latest deploy log https://app.netlify.com/projects/sync-timer/deploys/683d8cd6e50bf40008c83554
😎 Deploy Preview https://deploy-preview-116--sync-timer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Jun 1, 2025

Walkthrough

A new handwritten-style font, "Tekitou-Poem-SemiBold," was integrated into the project. This included updating CSS for font loading and styling, adding localization labels, extending the model to support the new font, and updating the UI to allow users to select it. Debug logging was also added to analytics event handling.

Changes

File(s) Change Summary
css/main.scss Added @font-face for "Tekitou-Poem-SemiBold" and a .timer.tekitou-poem CSS class.
js/common.js Added debug logging for analytics event parameters and data.
src/I18n.elm Added fgFontTekitouPoem label field with localized strings.
src/Model.elm Added TekitouPoem variant to FgFont type and updated encoding/decoding logic.
src/View.elm Added "Tekitou Poem" as a selectable foreground font in the font dropdown UI.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI (View.elm)
    participant Model (Model.elm)
    participant I18n (I18n.elm)
    participant CSS

    User->>UI (View.elm): Opens font dropdown
    UI (View.elm)->>I18n (I18n.elm): Fetches localized font labels
    UI (View.elm)->>Model (Model.elm): Lists available FgFont variants (including TekitouPoem)
    User->>UI (View.elm): Selects "Tekitou Poem"
    UI (View.elm)->>Model (Model.elm): Updates selected font to TekitouPoem
    UI (View.elm)->>CSS: Applies `.timer.tekitou-poem` class
    CSS-->>User: Renders timer with "Tekitou-Poem-SemiBold" font
Loading

Poem

🐰
A font with a flourish, a poem in its name,
Now graces the timer with handwritten fame.
Debug logs appear, as events take their flight,
New options for users, both day and at night.
With Tekitou Poem, your style takes the stage—
Hopping ahead, we turn the next page!
✍️✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50586f4 and 40e0fda.

📒 Files selected for processing (1)
  • src/Model.elm (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Model.elm

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
js/common.js (1)

68-69: Guard debug logging in production
These console.debug statements may clutter logs or expose user settings; consider wrapping them in a debug-mode flag (e.g., checking an environment variable) or removing them prior to release.

src/Model.elm (1)

1-1: Format with elm-format
The pipeline reports this file isn’t formatted with elm-format --elm-version=0.19. Please run elm-format to satisfy the CI check.

🧰 Tools
🪛 GitHub Actions: Check

[error] 1-1: File is not formatted with elm-format-0.8.7 --elm-version=0.19. Run 'elm-format' to fix formatting issues.

css/main.scss (2)

43-51: Verify @font-face asset path and properties
Ensure Tekitou-Poem-SemiBold.woff2 is correctly included in your build output, and consider specifying font-weight or adding fallback fonts for robustness.


113-115: Add fallback fonts for handwriting style
To guard against load failures, extend the rule, e.g.:

.timer.tekitou-poem {
  font-family: "Tekitou-Poem-SemiBold", cursive, sans-serif;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7cb90f and 50586f4.

⛔ Files ignored due to path filters (1)
  • css/Tekitou-Poem-SemiBold.woff2 is excluded by !**/*.woff2
📒 Files selected for processing (5)
  • css/main.scss (2 hunks)
  • js/common.js (1 hunks)
  • src/I18n.elm (3 hunks)
  • src/Model.elm (3 hunks)
  • src/View.elm (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check
src/Model.elm

[error] 1-1: File is not formatted with elm-format-0.8.7 --elm-version=0.19. Run 'elm-format' to fix formatting issues.

🔇 Additional comments (7)
src/View.elm (1)

386-386: Add new font option to dropdown
The TekitouPoem option is correctly encoded and uses the localized i18n.fgFontTekitouPoem label, matching the Elm model and CSS class.

src/Model.elm (3)

52-52: Add TekitouPoem variant
Introducing the new font variant in the FgFont type. Downstream encode/decode functions are updated accordingly.


67-69: Map TekitouPoem to "tekitou-poem"
The encodeFgFont case now correctly returns "tekitou-poem", aligning with the CSS class and view logic.


79-79: Include TekitouPoem in decoding dictionary
Updating dictFgFont ensures decodeFgFont "tekitou-poem" yields TekitouPoem.

src/I18n.elm (3)

21-21: Add new localization field
The Label record now includes fgFontTekitouPoem, matching the new font variant.


47-47: Japanese label for TekitouPoem
The string "適当ポエム (手書き)" accurately conveys the handwriting style in Japanese.


73-73: English label for TekitouPoem
The string "Tekitou Poem (Handwriting)" is clear and consistent with other font labels.

@mather
Copy link
Owner Author

mather commented Jun 2, 2025

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jun 2, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mather
Copy link
Owner Author

mather commented Jun 2, 2025

@coderabbitai Update description.

@coderabbitai
Copy link

coderabbitai bot commented Jun 2, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@mather I'll update the PR description with a comprehensive summary of the changes. Let me first check the current description and then update it.


🏁 Script executed:

#!/bin/bash
# Check the current PR description
gh pr view 116 --json title,body

Length of output: 815


🏁 Script executed:

#!/bin/bash
# Update the PR description with comprehensive details
gh pr edit 116 --body "# 「適当ポエム」フォントの追加

このPRは、手書き風フォント「適当ポエム」をタイマーアプリに追加します。

## 概要

新しい手書き風フォント「Tekitou-Poem-SemiBold」を統合し、ユーザーがタイマーの前景フォントとして選択できるようになります。

## 変更内容

### フォント追加
- **フォントファイル**: \`Tekitou-Poem-SemiBold.woff2\`
- **作者**: Hagi42 氏
- **ライセンス**: フォント作者のURL付きでクレジット表記

### 技術的実装

#### CSS (\`css/main.scss\`)
- \`@font-face\` 宣言でフォントを読み込み
- \`.timer.tekitou-poem\` クラスでスタイル適用
- \`font-display: swap\` で読み込みパフォーマンスを最適化

#### 国際化対応 (\`src/I18n.elm\`)
- 日本語: \"適当ポエム (手書き)\"
- 英語: \"Tekitou Poem (Handwriting)\"

#### データモデル (\`src/Model.elm\`)
- \`FgFont\` 型に \`TekitouPoem\` バリアントを追加
- エンコード/デコード処理を更新

#### UI (\`src/View.elm\`)
- フォント選択ドロップダウンに新オプションを追加

#### デバッグ強化 (\`js/common.js\`)
- アナリティクスイベントのデバッグログ追加

## ユーザーへの影響

- タイマーの前景フォントとして手書き風の「適当ポエム」フォントが選択可能
- 既存の機能には影響なし
- 新しいスタイリングオプションの提供

## テスト

Deploy Preview: https://deploy-preview-116--sync-timer.netlify.app

---

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new \"Tekitou Poem (Handwriting)\" font option for timers, available in both English and Japanese.
  - Added a selectable font option in the foreground font dropdown menu.
  - Applied a new style for timers using the \"Tekitou Poem\" font.

- **Style**
  - Updated styles to support the new \"Tekitou Poem\" font for applicable timer elements.

- **Bug Fixes**
  - No user-facing bug fixes included in this release.

- **Chores**
  - Added debug logging for analytics event parameters (no impact on user experience).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->"

Length of output: 1631


@mather ✅ I've successfully updated the PR description with comprehensive details about the 「適当ポエム」font addition.

The new description includes:

  • 概要: Clear explanation of what the PR accomplishes
  • 変更内容: Detailed breakdown of all technical changes across files
  • フォント追加: Information about the font file, creator (Hagi42), and licensing
  • 技術的実装: File-by-file explanation of changes in CSS, Elm modules, and JavaScript
  • ユーザーへの影響: User-facing benefits and impact assessment
  • テスト: Link to the deploy preview for testing

The description is now much more comprehensive and provides both technical details for developers and clear context about the feature addition. The original CodeRabbit summary has been preserved at the bottom for reference.

🐰✨

@mather mather merged commit 51addf0 into main Jun 2, 2025
6 checks passed
@mather mather deleted the feature/font-tekitou-poem branch June 3, 2025 02:22
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