Skip to content

feat: add keyboard theme picker with 37 themes across 6 sections#644

Open
prince-0408 wants to merge 2 commits intoscribe-org:mainfrom
prince-0408:feat/keyboard-themes-customization
Open

feat: add keyboard theme picker with 37 themes across 6 sections#644
prince-0408 wants to merge 2 commits intoscribe-org:mainfrom
prince-0408:feat/keyboard-themes-customization

Conversation

@prince-0408
Copy link
Copy Markdown
Contributor

Summary

Adds a complete keyboard theme customization system to Scribe-iOS, allowing users to personalize the appearance of all installed language keyboards from the Settings tab.

Closes #643

Changes

New Files

File Description
Keyboards/KeyboardsBase/KeyboardTheme.swift KeyboardTheme struct, ThemeCategory enum, 37 built-in themes, and ThemeManager for persistence and application
Scribe/Themes/ThemePickerViewController.swift Sectioned theme picker with 3-column grid, mini keyboard previews, and gradient rendering

Modified Files

File Change
KeyboardViewController.swift Calls ThemeManager.shared.loadSavedTheme() on load and on trait change
SettingsTableData.swift Adds "Keyboard theme" row to App Settings section
SettingsViewController.swift Navigates to ThemePickerViewController on theme row tap
InfoChildTableViewCell.swift Shows current theme name as subtitle on the settings row
ParentTableCellModel.swift Adds .keyboardTheme to UserInteractiveState

Theme Categories

Category Themes
Classic Default, Ocean, Teal, Sepia
Dark Midnight, Violet, Slate, Crimson
Light Snow, Rose, Lavender, Mint, Peach, Sand
Gradient Aurora, Sunset, Galaxy, Ember, Cotton Candy, Citrus, Arctic
Neon Neon Cyber, Neon Pulse, Neon Lime
Nature Forest, Terracotta, Sakura, Deep Sea, Autumn
Cultural Berlin, Paris, Madrid, Stockholm (unique to Scribe)
Accessible HC Dark, HC Light, Warm AA (unique to Scribe)

How It Works

  1. User opens Settings → taps "Keyboard theme"
  2. ThemePickerViewController presents a sectioned grid of theme cards
  3. Tapping a card calls ThemeManager.shared.apply(theme), which mutates the global color vars and saves the theme ID to the shared UserDefaults app group
  4. On next load, any language keyboard calls ThemeManager.shared.loadSavedTheme() to read the saved ID and re-apply colors before rendering

Testing

  • Theme applies immediately after selection
  • Theme persists after closing and reopening the keyboard
  • Default theme correctly follows system light/dark mode
  • All 37 themes render correctly in the picker
  • Gradient themes show actual gradient in the preview card
  • Settings row subtitle updates to show current theme name
  • Works across all installed language keyboards

ScreenShot

Simulator Screenshot - iPhone 17 Pro - 2026-04-02 at 21 39 50 Simulator Screenshot - iPhone 17 Pro - 2026-04-02 at 21 40 10 Simulator Screenshot - iPhone 17 Pro - 2026-04-02 at 21 40 23

- Add KeyboardTheme struct with ThemeCategory enum (Classic, Dark, Light,
  Gradient, Neon, Nature, Cultural, Accessible)
- Add ThemeManager to persist and apply themes via shared UserDefaults
- Add 37 built-in themes including gradient, neon, cultural (Berlin, Paris,
  Madrid, Stockholm) and accessible (HC Dark, HC Light, Warm AA) themes
- Add ThemePickerViewController with Gboard-style sectioned 3-column grid,
  CAGradientLayer previews for gradient themes, and system-adaptive colors
- Wire theme picker into Settings tab with live theme name subtitle
- Hook ThemeManager.loadSavedTheme() into keyboard load and trait change
- Add keyboardTheme case to UserInteractiveState and SectionState handling
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Thank you for the pull request! 💙🩵

The Scribe-iOS team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and iOS rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the CI unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

- Add messages to all fatalError calls (fatal_error_message rule)
- Refactor drawKey to use CGRect parameter instead of x/y/w/h to
  reduce parameter count below the 5-param limit (function_parameter_count rule)
@prince-0408 prince-0408 changed the title feat: Add keyboard theme picker with 37 themes across 8 categories feat: add keyboard theme picker with 37 themes across 6 sections Apr 2, 2026
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.

Add keyboard theme customization with multi-category theme picker

1 participant