Skip to content

Refactor XR Keyboard layout and UI rendering#156

Merged
ruofeidu merged 11 commits into
google:mainfrom
jolicaD:math_keyboard
Jun 2, 2026
Merged

Refactor XR Keyboard layout and UI rendering#156
ruofeidu merged 11 commits into
google:mainfrom
jolicaD:math_keyboard

Conversation

@jolicaD
Copy link
Copy Markdown

@jolicaD jolicaD commented Feb 9, 2026

Refactor: Keyboard Layout & Rendering Engine

This PR modernizes the virtual keyboard by refactoring the layout logic and improving render stability in XR.

Key Changes

  • Unified Layout Engine: Replaced manual weight calculations with a consolidated addKey method and constant-driven spacing (COL_SPACER, ROW_SPACER).

  • Improved Depth Management: Added a recursive applyZOrder function to ensure all keyboard sub-elements render correctly on top of other world objects.

  • Visual Polish: Switched to a borderless shader and updated the color palette for better legibility.

Screenshot 2026-02-09 at 3 13 19 PM

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Feb 9, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ruofeidu
Copy link
Copy Markdown
Collaborator

ruofeidu commented Feb 9, 2026

Thank you Jolica! Would you Gemini solutions to update branch, sign CLA, and pass all prechecks?

Thanks!

@ruofeidu ruofeidu requested review from dli7319 and ruofeidu February 9, 2026 23:35
Comment thread .vscode/launch.json Outdated
Comment thread demos/math3d/Math3D.js Outdated
Comment thread demos/math3d/Math3D.js Outdated
@ruofeidu
Copy link
Copy Markdown
Collaborator

Jolica: Please remove .vscode/launch.json and fix the GitHub checks before sending it out to reviews -- this is the journey to learn : )

@ruofeidu ruofeidu added the bug Something isn't working label May 9, 2026
@ruofeidu ruofeidu assigned ruofeidu and jolicaD and unassigned ruofeidu May 9, 2026
@ruofeidu ruofeidu marked this pull request as draft May 11, 2026 22:34
@ruofeidu
Copy link
Copy Markdown
Collaborator

ruofeidu commented Jun 1, 2026

Lint and Format Check is broken, please run:

npm run lint # ESLint check
npm run format # Prettier format

@jolicaD jolicaD marked this pull request as ready for review June 2, 2026 22:30
@jolicaD
Copy link
Copy Markdown
Author

jolicaD commented Jun 2, 2026

Thanks so much, Ruofei!

Comment thread src/addons/virtualkeyboard/README.md Outdated
Comment thread src/addons/virtualkeyboard/README.md Outdated
@ruofeidu ruofeidu merged commit 5416b3f into google:main Jun 2, 2026
8 checks passed
@jolicaD jolicaD deleted the math_keyboard branch June 2, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants