Skip to content

Feature/language switcher hover#146

Closed
jjim1982 wants to merge 5 commits into
incluud:mainfrom
jjim1982:feature/language-switcher-hover
Closed

Feature/language switcher hover#146
jjim1982 wants to merge 5 commits into
incluud:mainfrom
jjim1982:feature/language-switcher-hover

Conversation

@jjim1982
Copy link
Copy Markdown

@jjim1982 jjim1982 commented Jun 8, 2025

Summary by CodeRabbit

  • New Features

    • Added full English-language site support, including homepage, blog, portfolio, accessibility statement, color contrast checker, markdown, and MDX demo pages.
    • Implemented language switcher and dynamic locale-based navigation.
  • Localization

    • Translated all existing pages and UI text from English to Japanese for the default locale.
    • Updated navigation, headers, and content to support both Japanese and English.
  • Removed Features

    • Removed dark mode support, including all related toggles, styles, and documentation.
    • Eliminated dynamic light/dark color adjustments; color schemes now use fixed values.
  • Styling

    • Simplified CSS by removing conditional color logic and dark mode classes.
    • Updated styles and variables for consistency across themes.
  • Configuration

    • Added internationalization settings to enable locale switching.
    • Removed dark mode configuration from Tailwind CSS.
  • Bug Fixes

    • Improved active menu highlighting and excluded language switcher from active state styling.
  • Documentation

    • Updated README and accessibility statement to reflect current features and localization.

jjim1982 and others added 5 commits June 7, 2025 17:24
…support-to-astro-template

Enable bilingual support
This commit applies the default text decoration hover effect (solid underline) to the language switcher link in the header.

Changes made:
- Modified `src/components/Header.astro` to include the `text-decoration` mixin for the `.locale-switch` class. This ensures the language switcher has a consistent hover underline style with other links on the site.

Note: I could not verify the project build due to an incompatible Node.js version (v18.19.1) in my environment. Astro requires Node.js version ">=18.20.8". The code changes are presumed correct based on static analysis and SCSS compilation logic.
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 8, 2025

Deploy Preview for accessible-astro-starter-incluud ready!

Name Link
🔨 Latest commit a5d08ed
🔍 Latest deploy log https://app.netlify.com/projects/accessible-astro-starter-incluud/deploys/68458a78834f420008c3f4fc
😎 Deploy Preview https://deploy-preview-146--accessible-astro-starter-incluud.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
Copy Markdown

coderabbitai Bot commented Jun 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update removes dark mode support and related components, styles, and documentation throughout the codebase. It introduces internationalization (i18n) with Japanese as the default and adds a full set of English-language pages under /en/, including localized navigation, layouts, and content. Numerous components, pages, and SCSS files are updated to reflect these changes.

Changes

File(s) or Path(s) Change Summary
astro.config.mjs Added i18n config with defaultLocale 'ja' and locales ['ja', 'en'].
tailwind.config.js Removed darkMode configuration.
src/assets/scss/base/_root.scss, _button.scss, _kbd.scss Removed all use of light-dark() function and .darkmode class; now only single color variables are used.
src/assets/scss/base/_root.scss Removed dark mode CSS class and dynamic color switching.
src/components/CallToAction.astro, Hero.astro, PageHeader.astro, Feature.astro Simplified gradients and backgrounds by removing dynamic light/dark logic.
src/components/ColorContrast.astro Removed "Dark Mode" theme from theme list.
src/components/Header.astro Rewrote for i18n: dynamic locale prefix, localized navigation, removed dark mode toggle, added language switcher.
src/components/Navigation.astro Excluded .locale-switch from active state logic and styles; removed darkmode-toggle CSS.
src/layouts/DefaultLayout.astro Made lang attribute dynamic based on locale; updated description text.
README.md Removed mention of DarkMode component from accessibility features.
src/pages/index.astro Removed dark mode feature from homepage.
src/pages/accessible-components.astro Removed DarkMode component and section; localized header text to Japanese.
src/pages/404.astro, accessibility-statement.astro, blog/[...page].astro, blog/[post].astro, color-contrast-checker.astro, markdown-page.md, mdx-page.mdx, portfolio/[...page].astro, portfolio/[project].astro Localized content to Japanese.
src/pages/en/404.astro, accessibility-statement.astro, accessible-components.astro, blog/[...page].astro, blog/[post].astro, color-contrast-checker.astro, index.astro, markdown-page.md, mdx-page.mdx, portfolio/[...page].astro, portfolio/[project].astro Added new English-language pages mirroring Japanese originals, with localized content and navigation.
(Multiple files: SCSS, Astro components, pages) Removed all references to dark mode, dynamic color switching, and the DarkMode component.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant AstroApp
    participant i18nConfig

    User->>Browser: Requests page (e.g. /, /en/)
    Browser->>AstroApp: Sends HTTP request
    AstroApp->>i18nConfig: Determines current locale (default 'ja', or 'en')
    AstroApp->>AstroApp: Renders components/pages with locale-specific content
    AstroApp->>Browser: Returns localized HTML
    Browser->>User: Displays localized page
Loading

Possibly related PRs

Poem

A bunny hops from dark to light,
No more toggles in the night.
With Japanese and English too,
The site now welcomes more of you!
Colors fixed, the code is clean—
Accessibility reigns supreme!
🐇🌏✨


📜 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 a134273 and a5d08ed.

📒 Files selected for processing (36)
  • README.md (0 hunks)
  • astro.config.mjs (1 hunks)
  • src/assets/scss/base/_button.scss (2 hunks)
  • src/assets/scss/base/_kbd.scss (1 hunks)
  • src/assets/scss/base/_root.scss (2 hunks)
  • src/components/CallToAction.astro (1 hunks)
  • src/components/ColorContrast.astro (0 hunks)
  • src/components/Feature.astro (0 hunks)
  • src/components/Header.astro (3 hunks)
  • src/components/Hero.astro (1 hunks)
  • src/components/Navigation.astro (3 hunks)
  • src/components/PageHeader.astro (1 hunks)
  • src/layouts/DefaultLayout.astro (1 hunks)
  • src/pages/404.astro (1 hunks)
  • src/pages/accessibility-statement.astro (1 hunks)
  • src/pages/accessible-components.astro (1 hunks)
  • src/pages/blog/[...page].astro (1 hunks)
  • src/pages/blog/[post].astro (4 hunks)
  • src/pages/color-contrast-checker.astro (1 hunks)
  • src/pages/en/404.astro (1 hunks)
  • src/pages/en/accessibility-statement.astro (1 hunks)
  • src/pages/en/accessible-components.astro (1 hunks)
  • src/pages/en/blog/[...page].astro (1 hunks)
  • src/pages/en/blog/[post].astro (1 hunks)
  • src/pages/en/color-contrast-checker.astro (1 hunks)
  • src/pages/en/index.astro (1 hunks)
  • src/pages/en/markdown-page.md (1 hunks)
  • src/pages/en/mdx-page.mdx (1 hunks)
  • src/pages/en/portfolio/[...page].astro (1 hunks)
  • src/pages/en/portfolio/[project].astro (1 hunks)
  • src/pages/index.astro (0 hunks)
  • src/pages/markdown-page.md (2 hunks)
  • src/pages/mdx-page.mdx (2 hunks)
  • src/pages/portfolio/[...page].astro (1 hunks)
  • src/pages/portfolio/[project].astro (1 hunks)
  • tailwind.config.js (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

@jjim1982 jjim1982 closed this Jun 8, 2025
@jjim1982 jjim1982 deleted the feature/language-switcher-hover branch June 8, 2025 13:06
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.

1 participant