This documents attempts to catalog the needed Electron/React interactions.
Content or Screen Grab
The following components/actions need to have columns' content replace the WebView overlay with an image (screenshot of the view) of same, embedded in the ColumnContents control from the App's index.html.
when any of these popups is active
Edit Settings Popup
Add Column Popup (the first two columns, at a minimum)
Edit Column Popup
when scrolling the index.html page (horizontally)
clicking on anchor tag to scroll horizontally
manually scrolling (horizontally)
Event Considersations
The following actions should interact with Electron's main.ts and React's index.ts as described.
onResize of host page
ensure all popups are closed
no need for screen grabs; has performed well in the prototype
stretch goal: restore active popup with same state after resizing
onScroll of host page
option #1 if possible...
ensure all popups are closed
don't use screen grab images, use live WebView controls
includes "clicking" a tag with hash to bring a column into vew
NOTE: this is the preferred option, option #2 would likely make scrolling sluggish as screen grabs are frequently made and discarded
option #2 if live WebView controls are too jittery druring scroll...
use the column screen grabs instead
no need to hide popups; z-order is preserved as expected
stretch goal: blah.
on change of column size in app settings
resize and relocate BrowserViews
stretch goal: on theme change
set background color of the WebView?
a light shade that matches theme; nearly white
place logic to hide login header for site in a setInterval?
immediate DOM tweak seems to be firing too soon some times
catch the header when navigating to another page in column
add logic to bypass if element(s) already processed
since the user can navigate away from the initial page, set the interval in Electron's main.js to scan all active WeebView instances
Persist App & Column Settings
Decide how to store preferences and column definitions.
Electron/Native?
Local/Session Storage?
Cookies?
File Sytem?
Loading & Restoring Columns
Random tech notes:
ColumnSettings.id
the ID values do not matter; they just need to be unique
repopulate the column IDs from _counter = 0
the order of the columns does matter; preserve array order
ensure the BrowserView dictionary is mapped to the new IDs
This card is related to #9, the UI thread components who need to pass events to and from the electron application.
IPC for StimDeck
This documents attempts to catalog the needed Electron/React interactions.
Content or Screen Grab
The following components/actions need to have columns' content replace the
WebView
overlay with an image (screenshot of the view) of same, embedded in theColumnContents
control from the App'sindex.html
.index.html
page (horizontally)Event Considersations
The following actions should interact with Electron's
main.ts
and React'sindex.ts
as described.WebView
controlsa
tag with hash to bring a column into vewWebView
controls are too jittery druring scroll...setInterval
?main.js
to scan all active WeebView instancesPersist App & Column Settings
Decide how to store preferences and column definitions.
Loading & Restoring Columns
Random tech notes:
ColumnSettings.id
_counter = 0