[
https://issues.apache.org/jira/browse/CAMEL-23831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adriano Machado updated CAMEL-23831:
------------------------------------
Description:
h3. Add mouse support to the Camel TUI JBang plugin.
The TUI already enables mouse capture via TamboUI's {{mouseCapture(true)}}, but
only the ShellPanel handles mouse events (scroll only). This ticket covers
adding mouse interactions to the main TUI:
_Initial scope (this ticket):_
* Click on tab labels to switch tabs (instead of pressing number keys 1-9, 0)
* Scroll wheel in content area to navigate table rows (tabs using
{{TableState}})
* Scroll wheel in log view ({{LogTab}} has custom scroll logic)
_Deferred to follow-up tickets:_
* Click on table rows to select them
* Click on popup items (More popup, Switch popup)
* Drag support
_Implementation approach:_
* Add a default {{handleMouseEvent(MouseEvent, Rect)}} method to the
{{MonitorTab}} interface, with {{getTableState()}}/{{getTableRowCount()}}
accessors so table-bearing tabs get scroll support with minimal overrides
* Store rendered {{Rect}} areas in {{CamelMonitor}} during {{render()}} for
hit-testing during {{handleEvent()}}
* Add {{handleTabBarClick()}} in {{CamelMonitor}} to map click x-coordinates to
tab labels
* Override {{handleMouseEvent}} in {{LogTab}} for its custom scroll field
* Add {{getTableState()}}/{{getTableRowCount()}} overrides to all ~20
table-bearing tabs
No new dependencies required. Uses existing TamboUI {{MouseEvent}} API.
was:
Add mouse support to the Camel TUI JBang plugin.
The TUI already enables mouse capture via TamboUI's mouseCapture\(true\), but
only the ShellPanel handles mouse events \(scroll only\). This ticket covers
adding mouse interactions to the main TUI:\n\n_Initial scope \(this
ticket\):_\n\- Click on tab labels to switch tabs \(instead of pressing number
keys 1\-9, 0\)\n\- Scroll wheel in content area to navigate table rows \(tabs
using TableState\)\n\- Scroll wheel in log view \(LogTab has custom scroll
logic\)\n\n_Deferred to follow\-up tickets:_\n\- Click on table rows to select
them\n\- Click on popup items \(More popup, Switch popup\)\n\- Drag
support\n\n_Implementation approach:_\n\- Add a default
handleMouseEvent\(MouseEvent, Rect\) method to the MonitorTab interface, with
getTableState\(\)/getTableRowCount\(\) accessors so table\-bearing tabs get
scroll support with minimal overrides\n\- Store rendered Rect areas in
CamelMonitor during render\(\) for hit\-testing during handleEvent\(\)\n\- Add
handleTabBarClick\(\) in CamelMonitor to map click x\-coordinates to tab
labels\n\- Override handleMouseEvent in LogTab for its custom scroll field\n\-
Add getTableState\(\)/getTableRowCount\(\) overrides to all \~20 table\-bearing
tabs\n\nNo new dependencies required. Uses existing TamboUI MouseEvent API.
> camel-tui: add mouse support (tab clicks and scroll)
> ----------------------------------------------------
>
> Key: CAMEL-23831
> URL: https://issues.apache.org/jira/browse/CAMEL-23831
> Project: Camel
> Issue Type: New Feature
> Components: camel-jbang
> Reporter: Adriano Machado
> Priority: Minor
>
> h3. Add mouse support to the Camel TUI JBang plugin.
> The TUI already enables mouse capture via TamboUI's {{mouseCapture(true)}},
> but only the ShellPanel handles mouse events (scroll only). This ticket
> covers adding mouse interactions to the main TUI:
> _Initial scope (this ticket):_
> * Click on tab labels to switch tabs (instead of pressing number keys 1-9, 0)
> * Scroll wheel in content area to navigate table rows (tabs using
> {{TableState}})
> * Scroll wheel in log view ({{LogTab}} has custom scroll logic)
> _Deferred to follow-up tickets:_
> * Click on table rows to select them
> * Click on popup items (More popup, Switch popup)
> * Drag support
> _Implementation approach:_
> * Add a default {{handleMouseEvent(MouseEvent, Rect)}} method to the
> {{MonitorTab}} interface, with {{getTableState()}}/{{getTableRowCount()}}
> accessors so table-bearing tabs get scroll support with minimal overrides
> * Store rendered {{Rect}} areas in {{CamelMonitor}} during {{render()}} for
> hit-testing during {{handleEvent()}}
> * Add {{handleTabBarClick()}} in {{CamelMonitor}} to map click x-coordinates
> to tab labels
> * Override {{handleMouseEvent}} in {{LogTab}} for its custom scroll field
> * Add {{getTableState()}}/{{getTableRowCount()}} overrides to all ~20
> table-bearing tabs
> No new dependencies required. Uses existing TamboUI {{MouseEvent}} API.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)