Skip to content

feat: add HiliteContainer sysObject type with hover border and right-click context menu - #202

Draft
clauspruefer with Copilot wants to merge 1 commit into
mainfrom
copilot/add-sysobject-hilite-functionality
Draft

feat: add HiliteContainer sysObject type with hover border and right-click context menu#202
clauspruefer with Copilot wants to merge 1 commit into
mainfrom
copilot/add-sysobject-hilite-functionality

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds a new HiliteContainer sysObject that visually wraps one (singular) or multiple hierarchical (plural) child objects — drawing a border on hover and exposing a right-click context menu for actions like edit, move hierarchy, or any user-defined operation.

New file: www/sysObjHiliteContainer.js

  • Inherits sysBaseObject; registered as "HiliteContainer" in sysFactory.SetupClasses
  • mouseenter/mouseleave toggle sysHiliteContainerBorder CSS class for hover highlight
  • mousedown (button 2) opens sysContextMenu using the same pattern as sysObjList
  • Wraps sysContextMenu.close() to reset ContextMenuOpen state and clean up the border correctly after menu dismissal
  • Optional label child rendered when TextID is set
  • RuntimeGetDataFunc/RuntimeSetDataFunc stubs so all standard context-menu internal functions resolve without errors

CSS (www/static/globalstyles.css)

  • .sysHiliteContainerRoot — base wrapper with transparent border for smooth CSS transition
  • .sysHiliteContainerBorder — blue border + glow applied on hover
  • .sysHiliteContainerLabel — compact header label style

Docs

  • appdev-objects.rst: new section 10.13 with attribute table, features, and singular/plural JSON examples; old 10.13 renumbered to 10.14
  • appdev-context-menu.rst: note updated to include HiliteContainer as a supported type

Usage example

"HiliteGroup1": {
    "Type": "HiliteContainer",
    "Attributes": {
        "Mode": "plural",
        "TextID": "TXT.MY.GROUP.LABEL",
        "ContextMenuItems": [
            {
                "ID": "edit",
                "TextID": "TXT.EDIT",
                "IconStyle": "fa-solid fa-pen",
                "InternalFunction": "openOverlay",
                "ScreenOverlayID": "EditOverlay",
                "ScreenOverlaySetDataObjects": []
            }
        ]
    },
    "Objects": {
        "ChildA": { "Type": "Div", "Attributes": { "Style": "p-1" } },
        "ChildB": { "Type": "SQLText", "Attributes": { "TextID": "TXT.CHILD.B" } }
    }
}

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