Skip to content

feat: Implement app-specific mode recommendations and UI enhancements#192

Open
loccun wants to merge 4 commits intoLotusInputMethod:devfrom
loccun:keymap-ui
Open

feat: Implement app-specific mode recommendations and UI enhancements#192
loccun wants to merge 4 commits intoLotusInputMethod:devfrom
loccun:keymap-ui

Conversation

@loccun
Copy link
Copy Markdown
Contributor

@loccun loccun commented Mar 30, 2026

Description

This PR introduces a recommendation system to help users select the most compatible input mode for different applications, along with several UI improvements to the Mode Manager.

Key Changes

Recommendation Engine (settings-gui/core/recommendations.py):

  • Implemented a rule-based engine using regex patterns to identify applications.
  • Returns compatibility status (good or bad) for specific app-mode combinations.
  • Includes initial rules for Firefox-based (all modes good) and Chromium-based browsers (surrounding text bad, others good).

UI Enhancements (settings-gui/ui/pages/mode_manager.py):

  • Color-Coded Borders: Injected visual cues directly into the ModeCard components. Recommended modes feature a Green border, while those with poor compatibility show a Red border.
  • Layout Stability: Optimized the stylesheet using a padding/border-width balance to prevent any layout shifting when border thickness changes.
  • Tooltips: Added informative tooltips to explain the recommendation status on hover.
  • Mode Reordering: Reorganized the input modes for a more intuitive user experience.
Screenshot_20260330_194243

@github-project-automation github-project-automation bot moved this to Backlog in Kanban Mar 30, 2026
@loccun loccun marked this pull request as draft March 30, 2026 12:52
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an application-specific recommendation engine for input modes, updates backup file extensions to JSON, and refactors the keymap and macro editors to support an 'Update' state for existing entries. Feedback focuses on removing dead code in the mode manager, pre-compiling regular expressions for performance, fixing type hints, and eliminating redundant method calls and code duplication across editor pages.

loccun and others added 3 commits March 30, 2026 22:43
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@loccun
Copy link
Copy Markdown
Contributor Author

loccun commented Mar 31, 2026

Tính năng này chủ yếu tập trung vào cải thiện phần chọn mode trong UI. Không có dự tính thay đổi pop up chuyển mode vì nó cần sự đồng nhất, không nên chèn thẳng gợi ý vào đó sẽ làm người dùng bối rối.

@loccun loccun marked this pull request as ready for review March 31, 2026 00:22
@loccun
Copy link
Copy Markdown
Contributor Author

loccun commented Mar 31, 2026

Có thể mở rộng để cho user tự submit các tên app mà họ cảm thấy là tương thích tốt/tệ để tự động mở rộng list_app sau mỗi lần cập nhật.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants