Conversation
| { | ||
| "type": "frame", | ||
| "id": "XkWUp", | ||
|
|
There was a problem hiding this comment.
Typo in variant name: Secondat should be Secondary
"Button/Medium/Secondat/Flat/Square/Loading" — the color segment is misspelled. This will break any tooling or references that look up this variant by name.
| "name": "Button/Medium/Secondary/Flat/Square/Loading", |
| { | ||
| "type": "frame", | ||
| "id": "XkWUp", | ||
|
|
There was a problem hiding this comment.
Inconsistent capitalisation in variant name: FLat should be Flat
"Button/Large/Secondary/FLat/Square/Click" — capital L in FLat is inconsistent with every other variant in this file, effectively creating a separate style token.
| "name": "Button/Large/Secondary/Flat/Square/Click", |
| { | ||
| "type": "frame", | ||
| "id": "XkWUp", | ||
|
|
There was a problem hiding this comment.
Stray space in icon name: icon/stop- filled should be icon/stop-filled
The space before filled appears in 12 button variants. This will cause lookup failures or mismatches in any tooling that resolves icons by name.
| "name": "icon/stop-filled", |
| "id": "o3zCS", | ||
| "x": 2.1828083992004395, | ||
| "y": 5.349999904632568, | ||
| "geometry": "M94.05119 8.558l0 9.492c0 0.55228-0.44772 1-1 1l-1.572 0c-0.55228 0-1-0.44772-1-1l0-11.42c0-0.55228 0.44772-1 1-1l1.43 0c0.52493-0.00027 0.96072 0.40539 0.998 0.929l0.144 1.999z m3.77101-3.089c0.166 0.033 0.27 0.188 0.26699 0.358l-0.04799 2.576c-0.00391 0.11569-0.05538 0.22463-0.14227 0.30111-0.08689 0.07648-0.20149 0.1137-0.31674 0.10289l-0.182-0.014c-0.21816-0.02434-0.43748-0.03669-0.657-0.037q-0.757 0-1.315 0.199-0.546 0.186-0.918 0.558-0.36 0.372-0.546 0.905c-0.12135 0.39402-0.18797 0.80284-0.198 1.215l-0.72-0.223q0-1.302 0.261-2.393 0.26-1.104 0.757-1.923 0.508-0.818 1.24-1.265 0.73199-0.447 1.674-0.446 0.298 0 0.60801 0.05 0.128 0.015 0.236 0.036m-14.37501 13.829q-1.563 0-2.803-0.496c-0.79188-0.31696-1.50985-0.7939-2.109-1.401-0.57166-0.59624-1.0184-1.3007-1.314-2.072-0.30825-0.80769-0.46421-1.6655-0.46-2.53l0-0.496q0-1.526 0.435-2.79c0.26846-0.80454 0.68947-1.54981 1.24-2.195 0.54507-0.61985 1.22381-1.10 |
There was a problem hiding this comment.
Icon asset committed as a top-level page frame
"settings-filled" follows the naming pattern of icon components (run-outlined, rerun-outlined) but is listed as the last top-level frame in editor.pen. It contains only a single unnamed path — this looks like an icon asset accidentally included as a page, or an unfinished stub. It should either be removed or moved to a proper icon library component.
ui/components/spx/editor/nav.lib.pen
Outdated
| "fill": { | ||
| "type": "image", | ||
| "enabled": true, | ||
| "url": "../images/navbar bg.png", |
There was a problem hiding this comment.
Image filenames with spaces and non-ASCII characters
"navbar bg.png" (space) and "用户头像.png" (Chinese characters) appear as image references across multiple component files. These filenames:
- Require URL-encoding (
%20, percent-encoded UTF-8) in any web context - Are fragile in CI pipelines and filesystems with non-UTF-8 locales
- Make the
.penJSON brittle — any rename requires coordinated edits across both the filesystem and every.penfile that references them
Consider renaming to ASCII kebab-case equivalents (e.g. navbar-bg.png, user-avatar.png).
|
Good structural cleanup moving from Naming issues in Color token fragmentation — Three systems coexist across the new files: short-scale tokens ( Duplicated binary assets —
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the editor's user interface by introducing a new, reusable navigation component and reorganizing the project's UI file structure. The changes aim to improve modularity and maintainability of the editor's components and pages, laying groundwork for future development and consistency. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the UI directory structure by renaming the 'system' folder to 'component' and moving pages. It also introduces a new navigation bar component for the editor. My review focuses on the new nav.lib.pen file. I've found several opportunities to improve the maintainability of this component definition by using design tokens (variables) consistently for colors and other values, and by ensuring consistent naming conventions. These changes will make the component easier to theme and update in the future.
Note: Security Review did not run due to the size of the PR.
ui/components/spx/editor/nav.lib.pen
Outdated
| "height": 50, | ||
| "stroke": { | ||
| "align": "inside", | ||
| "thickness": 0.1190476194024086 |
There was a problem hiding this comment.
The thickness value 0.1190476194024086 has excessive precision, which is likely an artifact from a design tool. For better readability and maintainability, it's best to round this to a more conventional value (e.g., 0.12) or define it as a variable if it's a standard stroke width in your design system.
"thickness": 0.12
ui/components/spx/editor/nav.lib.pen
Outdated
| "x": 1.2997803688049316, | ||
| "y": 5.4393696784973145, | ||
| "geometry": "M5.08422 6.98763l11.322 11.341c0.3284 0.32976 0.77462 0.51513 1.24 0.51513 0.46539 0 0.91161-0.18537 1.24-0.51513 0.68398-0.68674 0.68398-1.79725 0-2.484l-11.32-11.34-2.482 2.483z m3.079-6.963c-0.87413 0.77448-2.09171 1.03099-3.204 0.675-0.03351-0.00939-0.06949-0.00067-0.095 0.023l-4.729 4.736c-0.18029 0.18072-0.18029 0.47328 0 0.654l2.09 2.092c0.18 0.18 0.472 0.18 0.652 0l4.193-4.197-0.001-0.002 2.27-2.275c0.18029-0.18072 0.18029-0.47328 0-0.654l-1.046-1.049c-0.03554-0.03565-0.09285-0.03697-0.13-0.003", | ||
| "fill": "#fff", |
ui/components/spx/editor/nav.lib.pen
Outdated
| "clip": true, | ||
| "width": 1, | ||
| "height": 24, | ||
| "fill": "#ffffff4d", |
ui/components/spx/editor/nav.lib.pen
Outdated
| "name": "text", | ||
| "fill": { | ||
| "type": "color", | ||
| "color": "#0aa5beff", |
ui/components/spx/editor/nav.lib.pen
Outdated
| { | ||
| "type": "text", | ||
| "id": "9wufA", | ||
| "name": "输入文本", |
There was a problem hiding this comment.
The name property "输入文本" contains non-ASCII characters. It's a best practice to use English for identifiers in configuration and code files for better compatibility with tooling and easier collaboration with international developers. Consider changing this to an English equivalent like "input-text".
"name": "input-text",
| "variables": { | ||
| "grey100": { | ||
| "type": "color", | ||
| "value": "#ffffff" | ||
| }, | ||
| "--ui-color-primary-main": { | ||
| "type": "color", | ||
| "value": "#0bc0cf" | ||
| }, | ||
| "grey200": { | ||
| "type": "color", | ||
| "value": "#FBFCFD" | ||
| }, | ||
| "turquoise600": { | ||
| "type": "color", | ||
| "value": "#0AA5BE" | ||
| }, | ||
| "--ui-color-grey-100": { | ||
| "type": "color", | ||
| "value": "#ffffff" | ||
| }, | ||
| "--ui-shadow-custom-2": { | ||
| "type": "color", | ||
| "value": "#00000000" | ||
| } | ||
| } |
There was a problem hiding this comment.
The variables block has some inconsistencies that could be improved for better maintainability:
- Redundant variables:
grey100and--ui-color-grey-100both define the color white (#ffffff). It's best to use only one to avoid confusion. I'd recommend removinggrey100. - Inconsistent naming: Variable names are inconsistent. Some are simple like
grey200, while others are prefixed like--ui-color-primary-main. Adopting a consistent convention, such as the--ui-color-*pattern for all colors, would improve readability.
Consider refactoring this block to address these points. After refactoring, please ensure all references to the old variable names (e.g., $grey100, $grey200) are updated throughout the file.
-Delete the "system" folder and rename it to "component" folder.
-Add editor-related components.
-Update some editor pages by referencing these components.