Skip to content

fix(settings): add hover effect to GUI/JSON settings switch#70

Open
HuiNeng6 wants to merge 2 commits intoCortexLM:mainfrom
HuiNeng6:fix-settings-gui-json-hover
Open

fix(settings): add hover effect to GUI/JSON settings switch#70
HuiNeng6 wants to merge 2 commits intoCortexLM:mainfrom
HuiNeng6:fix-settings-gui-json-hover

Conversation

@HuiNeng6
Copy link

Summary

  • Remove inline style that was overriding hover effects on the GUI/JSON toggle button
  • Add CSS class \settings-json-toggle-active\ for active state with proper hover styling
  • Fixes issue where switch between GUI Settings and JSON editor had no visual feedback on hover

Problem

In Settings, the control that switches between the GUI Settings Editor and the JSON Settings Editor did not show a hover state. When moving the mouse over the switch/toggle, there was no visual feedback, making it unclear which segment was under the cursor.

Root Cause

The button's hover effect was being overridden by an inline \style\ prop that set background, color, and border directly on the element. This prevented the button's built-in hover handlers from changing the background.

Solution

  1. Removed the inline \style\ prop that was overriding hover effects
  2. Added a CSS class \settings-json-toggle-active\ to define the active state styling
  3. Added corresponding hover styles in \settings.css\ that properly show visual feedback

Testing

  1. Open Settings in Cortex IDE
  2. Locate the GUI/JSON switch button (shows \JSON\ when in GUI mode, \GUI Settings\ when in JSON mode)
  3. Hover over the button - verify background changes to indicate interactivity
  4. Click to switch modes - verify active state styling is applied
  5. Hover in active state - verify hover effect still works

Fixes #37583 (reported in PlatformNetwork/bounty-challenge)

- Add guard in handleCopyStack to return early if frames array is empty
- Disable copy button when there are no stack frames to prevent empty clipboard overwrite
- Fixes issue where copy action could silently wipe user's clipboard with empty string

Fixes #37588
- Remove inline style that was overriding hover effects
- Add CSS class for active state with proper hover styling
- Fixes issue where switch between GUI Settings and JSON editor had no visual feedback on hover

Fixes #37583 (reported in PlatformNetwork/bounty-challenge)
@HuiNeng6
Copy link
Author

📢 跟进 — Settings hover fix

Maintainers

✅ PR状态

  • 完整实现: Settings switch hover effect

请review。

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.

1 participant