Improve tooltip references for dropdown options#1695
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request improves tooltip reference text for dropdown fields across the PlayCanvas Editor by adding HTML list formatting for dropdown options. The changes provide clearer descriptions for each option along with their corresponding PlayCanvas Engine API constants.
Changes:
- Added HTML list rendering support in tooltips with proper sanitization and styling
- Enhanced dropdown field descriptions across Components, Scene Settings, and Assets with formatted option lists and API constant references
- Added CSS styling for list elements and inline code blocks in tooltips
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/editor/attributes/reference/reference.ts |
Added HTML tag processing for <ul>, <li>, and <code> tags with line break cleanup logic |
src/common/tooltips.ts |
Enabled unsafe HTML rendering for tooltip descriptions to allow formatted content |
sass/editor/_editor-main.scss |
Added CSS styling for list elements and code blocks in tooltips |
src/editor/attributes/reference/settings.ts |
Enhanced tooltips for scene settings dropdowns including tone mapping, gamma correction, fog types, fill mode, and more |
src/editor/attributes/reference/components/camera.ts |
Improved camera component tooltips for projection, tone mapping, and gamma correction |
src/editor/attributes/reference/components/button.ts |
Enhanced button transition mode tooltip with formatted options |
src/editor/attributes/reference/components/collision.ts |
Added formatted list for collision primitive types |
src/editor/attributes/reference/components/element.ts |
Enhanced element type tooltip with API constants |
src/editor/attributes/reference/components/layoutgroup.ts |
Improved layout group tooltips for orientation and fitting modes |
src/editor/attributes/reference/components/light.ts |
Enhanced light component tooltips for type and falloff mode |
src/editor/attributes/reference/components/model.ts |
Added formatted list for model types |
src/editor/attributes/reference/components/particlesystem.ts |
Improved particle system tooltips for sort, blend, emitter shape, and orientation |
src/editor/attributes/reference/components/render.ts |
Enhanced render component type tooltip |
src/editor/attributes/reference/components/rigidbody.ts |
Updated rigid body type tooltip with descriptions |
src/editor/attributes/reference/components/screen.ts |
Improved screen scale mode tooltip |
src/editor/attributes/reference/components/scrollbar.ts |
Enhanced scrollbar orientation tooltip |
src/editor/attributes/reference/components/scroll-view.ts |
Improved scroll view tooltips for scroll mode and scrollbar visibility |
src/editor/attributes/reference/components/sound.ts |
Enhanced sound distance model tooltip |
src/editor/attributes/reference/components/sprite.ts |
Updated sprite type tooltip with API constants |
src/editor/attributes/reference/assets/material.ts |
Improved material asset tooltips for blend type, cull mode, and cubemap projection |
src/editor/attributes/reference/assets/texture.ts |
Enhanced texture asset tooltips for filtering, addressing, and compression options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…into tooltip-bullets
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Great addition. |
Perfect! |

Fixes #1049
Summary
Improves tooltip reference text for dropdown fields across Components, Scene Settings, and Assets by formatting options as HTML lists with clear descriptions.
Changes
Material Asset
pc.BLEND_*constants)pc.CULLFACE_*constants)pc.CUBEPROJ_*constants)Components
pc.BUTTON_TRANSITION_MODE_*constants)pc.ELEMENTTYPE_*constants)pc.ORIENTATION_*,pc.FITTING_*constants)pc.LIGHTFALLOFF_*constants)pc.PARTICLESORT_*,pc.EMITTERSHAPE_*,pc.PARTICLEORIENTATION_*constants)pc.BODYTYPE_*constants)pc.ORIENTATION_*constants)pc.SCROLL_MODE_*,pc.SCROLLBAR_VISIBILITY_*constants)pc.SPRITETYPE_*constants)Scene Settings
pc.FOG_*constants)pc.BAKE_*constants)Texture Assets
Filtering: Point, Linear (with
pc.FILTER_*constants)Address U/V: Repeat, Clamp, Mirror Repeat (with
pc.ADDRESS_*constants)Compression Mode: ETC, ASTC
Compression Quality: Lowest, Low, Default, High, Highest
I confirm I have read the contributing guidelines