Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tech improvement: stop using kiosk-browser APIs #4531

Closed
12 of 17 tasks
adghayes opened this issue Jan 22, 2024 · 0 comments · Fixed by #5637
Closed
12 of 17 tasks

tech improvement: stop using kiosk-browser APIs #4531

adghayes opened this issue Jan 22, 2024 · 0 comments · Fixed by #5637
Assignees

Comments

@adghayes
Copy link
Collaborator

adghayes commented Jan 22, 2024

Overview

Originally, kiosk-browser (i.e. our electron wrapper) was our only way of accessing many system APIs. Now we have backends for every app that do that for us. We want to stop using any kiosk-browser APIs because we want the option of using a more lightweight alternative to electron that simply renders web content. Even if we, for some reason, can't replace kiosk-browser, moving things from kiosk-browser to the backend aligns better with our architectural model.

Apps vary in how much they're using kiosk-browser. Separately, the dev dock uses a few kiosk-browser APIs. The removals, by app, are:

Dev Dock

  • Screenshots - uses screenshot and writeFile endpoints. We could simply disable this or provide an alternative.
  • Fixture Selection - uses showOpenDialog to pick a file. Most browser replacements would offer this

VxScan

No usage.

VxCentralScan

  • Scanner Connection Status - needs to use polling through the backend

VxMarkScan

VxMark

VxAdmin

Miscellaneous

A drop-in replacement for kiosk-browser would also have to handle:

  • logging to console, unless all logging is moved to backend
  • quit? A shortcut to close the frontend in VxDev

We will gradually move away from these endpoints as our work touches them. In the meantime, the path is cleared on VxScan (and pretty much on VxCentralScan too) to begin experimenting with a replacement. The replacement would have to meet other production image and security requirements that are not listed here, but it's likely that overall a slimmer replacement would be easier to work with than Electron.

@eventualbuddha eventualbuddha self-assigned this Nov 26, 2024
eventualbuddha added a commit that referenced this issue Nov 26, 2024
Closes #4531

Removes all uses of the following `kiosk-browser` APIs:
- `captureScreenshot` + `saveAs` (replaced with `dev-dock/backend` API + `gnome-screenshot`)
- `showOpenDialog` (selecting election package to load in dev is removed)
- `showSaveDialog` ("Save As" in a few places is removed)

We still use `kiosk.quit` and `kiosk.log`, but these can be trivially reimplemented.
eventualbuddha added a commit that referenced this issue Nov 26, 2024
Closes #4531

Removes all uses of the following `kiosk-browser` APIs:
- `captureScreenshot` + `saveAs` (replaced with `dev-dock/backend` API + `gnome-screenshot`)
- `showOpenDialog` (selecting election package to load in dev is removed)
- `showSaveDialog` ("Save As" in a few places is removed)

We still use `kiosk.quit` and `kiosk.log`, but these can be trivially reimplemented.
@eventualbuddha eventualbuddha linked a pull request Nov 26, 2024 that will close this issue
eventualbuddha added a commit that referenced this issue Nov 26, 2024
Closes #4531

Removes all uses of the following `kiosk-browser` APIs:
- `captureScreenshot` + `saveAs` (replaced with `dev-dock/backend` API + `gnome-screenshot`)
- `showOpenDialog` (selecting election package to load in dev is removed)
- `showSaveDialog` ("Save As" in a few places is removed)

We still use `kiosk.quit` and `kiosk.log`, but these can be trivially reimplemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants