Skip to content

Conversation

@justbycris
Copy link

  • Removed auto-setting of trayDetail in _mouseDown handler
  • Removed auto-switch logic in activeGizmo observer
  • Set trayDetail to 'no-active-tray' when tray is collapsed
  • Buttons now only show active when tray is open and selected

Problem

Tray buttons (content-edit, content-map, content-add) were showing as active even when the tray was collapsed. This happened because clicking on body elements automatically set trayDetail = "content-edit".

Solution

  • Removed auto-setting of trayDetail in _mouseDown handler (hax-body.js line 775)
  • Removed auto-switch logic in activeGizmo observer in updated() method
  • Changed collapsed state to use trayDetail = 'no-active-tray' instead of null
  • Buttons now only show active when user explicitly clicks them

Testing Done

  • Buttons don't auto-activate when clicking body elements
  • Buttons show correct active state when manually clicked
  • Tray collapse/expand still works correctly
  • No console errors

- Removed auto-setting of trayDetail in _mouseDown handler
- Removed auto-switch logic in activeGizmo observer
- Set trayDetail to 'no-active-tray' when tray is collapsed
- Buttons now only show active when tray is open and selected
@justbycris justbycris requested a review from btopro as a code owner January 15, 2026 21:35
@vercel
Copy link

vercel bot commented Jan 15, 2026

@justbycris is attempting to deploy a commit to the HAXTheWeb Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Jan 15, 2026

All contributors have signed the CLA. Thank you!
Posted by the CLA Assistant Lite bot.

@justbycris
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@btopro
Copy link
Member

btopro commented Jan 16, 2026

appreciate the work here. I think you are a bit beyond the scope of the original issue:

  • by default, we want to show the edit settings for the activeNode in the hax-body
  • when clicking on new items, we want to switch to the settings widget so they can modify settings / see what's active

I do think that this provides a solution to toggle off the button as far as active state color wise.

…ode in hax-body

-  Restored auto-switching to settings widget when clicking new activeNodes
-  Kept manual button toggle fix for active state control
@justbycris
Copy link
Author

Hey @btopro,
Thank you for the feedback! I've updated the PR to restore the default behavior:

  • Settings widget button now auto-sets to active state when clicking elements in hax-body
  • The edit settings for each activeNode still show in the hax-body
  • Manual button toggle still works for controlling active state

The changes now preserve the existing UX while keeping the toggle buttons on/off functionality.
Let me know what you think!

!["content-map", "content-edit", "content-add"].includes(
this.trayDetail,
)
["content-map", "content-edit", "content-add"].includes(this.trayDetail)
Copy link
Member

Choose a reason for hiding this comment

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

what happens if its set to nothing? should it then set to the none for the tray detail?

Copy link
Author

Choose a reason for hiding this comment

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

You are right! Restored the original activeGizmo logic (including the ! operator and else block) to preserve the default auto-active state behavior in the configure button when clicking elements.

} else {
HAXStore.haxTray.collapsed = false;
// Clear active state when exiting out of collapsed tray
if (HAXStore.haxTray.collapsed) {
Copy link
Member

Choose a reason for hiding this comment

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

if collapsed wont this then set the color still on the content-edit tab as opposed to nothing?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, as long as there's an activeNode while the menu is collapsed, the configure button will remain active (skyBlue color).

I didn't find a way to deselect an activeNode once it's selected. Is this the expected behavior? If activeNode should persist until another element is clicked, then the button staying active makes sense but let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

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

so it's still activeNode in hax-body, it just shouldn't highlight a button if anything is collapsed. So if we've collapsed the tray then no matter what was active is now collapsed.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, I am confused. I thought you meant here that when clicking on a new item on the hax-body, we wanted to switch to the settings widget so the user can see what's active? see comment here --> #754 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

image

When we select an element, it needs to toggle to the form. Shown here. I clicked on a heading.

The glitch we're trying to resolve, is that when I click to collapse the settings gear (by clicking on it) it is presently still showing active, even though it is not visible

image

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.

2 participants