aboutsummaryrefslogtreecommitdiffstats
path: root/packages/renderer/src/components/BrowserViewPlaceholder.tsx
Commit message (Collapse)AuthorAge
* chore: use node16 moduleResolution where possibleLibravatar Kristóf Marussy2022-05-26
| | | | | | | We can't do this in the renderer package, because we need to import MUI files that are not exported (MUI v6 is not ESM yet). Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: reduce service switcher tearingLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | We render the location bar and notification banners separately for each service and keep track of the BrowserView size separately for each service to reduce the tearing that appears when people switch services. The tearing cannot be eliminated completely, because it comes from the separation between the main and renderer processes. But we can at least try and reduce the IPC round-tripping and layout calculations required to accurately position the services. This approach has an overhead compared to the single BrowserViewPlaceholder approach, because the renderer process has to layout the location bar and notification for all services, not only the selected one. The number of IPC messages during windows resize is also increased. To compensate, we increase the throttle interval for resize IPC messages and let electron itself resize the BrowserView between IPC updates. (We must still keep pumping IPC messages during window resize, because, e.g., changes in notification banner size due to re-layouting will still affect the required BrowserView size). If further reduction of IPC traffic is needed, we could implement batching for resize IPC messages and more intelligent throttling via a token bucker mechanism. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(renderer): Error pagesLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | | | | Display an error page when page loading fails. Error messages should be tweaked for messaging applications (not browsers), because people won't neccessarily expect browser errors in a messenger. We still need a component to property show a certificate that failed validation so people can decide whether to trust it temporarily. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Temporary certificate acceptance backendLibravatar Kristóf Marussy2022-03-15
| | | | | | | | | | | | | We use the 'certificate-error' event of webContents to detect certificate verification errors and display a message to manually trust the certificate. Certificates are trusted per profile and only until Sophie is restarted. We still need to build the associated UI, the current one is just a rough prototype for debugging. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix: Cosmetic fixesLibravatar Kristóf Marussy2022-02-14
| | | | | | | | | * Update the browser view size more quickly (negligible CPU usage overhead) * Style the body element by default instead of the html element for better compatibility with website CSS. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix: Make sure the BrowserView has integer coordsLibravatar Kristóf Marussy2022-02-08
| | | | | | | Non-integer coordinates make electron throw the error and the reaction to synchronize the BrowserView position fail. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add eslint-plugin-unicornLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add prettierLibravatar Kristóf Marussy2022-01-09
| | | | | | | eslint will also enforce prettier rules, so there is no need to call prettier separately in CI. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Disable single-run eslint-typescriptLibravatar Kristóf Marussy2022-01-09
| | | | | | | | | See https://github.com/typescript-eslint/typescript-eslint/issues/3851 Also upgrades dependencies and simplifies eslint config (used during debugging this issue to eliminate other possible sources of errors.) Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Eslint fixes for multi-module projectLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* New configurations based on review comments (WIP)Libravatar Vijay A2022-01-09
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* Incorporate 'eslint' (fixes #3)Libravatar Vijay A2022-01-09
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* chore: Add import extensions preparing for ts 4.6 nodenextLibravatar Kristóf Marussy2021-12-31
|
* refactor: Simplify browserViewBounds handlingLibravatar Kristóf Marussy2021-12-26
|
* feat: Alternative background color workaroundLibravatar Kristóf Marussy2021-12-24
| | | | | | | Let's try injecting CSS to set the background color of html to white (instead of transparent) into the loaded pages. The CSS is injected before the website's own styles load, so they should always have the lowest priority.
* feat: Add BrowserView and synchronize its positionLibravatar Kristóf Marussy2021-12-23