aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* build: run integration tests in CIHEADmainLibravatar Kristóf Marussy2022-05-31
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): bump dependenciesLibravatar Kristóf Marussy2022-05-31
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor(renderer): simplify sidebar appearanceLibravatar Kristóf Marussy2022-05-31
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor(main): improve config file handlingLibravatar Kristóf Marussy2022-05-30
| | | | | | | | Simplify config file watcher by debouncing events instead of throttling. Make sure to flush config changes on application exit. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test(main): ConfigFile integration testLibravatar Kristóf Marussy2022-05-29
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: use undefined constantLibravatar Kristóf Marussy2022-05-28
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test(shared): SharedStoreBase testsLibravatar Kristóf Marussy2022-05-27
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: move certificate trust to main processLibravatar Kristóf Marussy2022-05-27
| | | | | | | | There is no need to synchronize the list of trusted certificates to the renderer process, so we can get away with storing them in the transient state of the Profile store. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: fix test rootDir configurationLibravatar Kristóf Marussy2022-05-27
| | | | | | Each package should load the tests from its src directory only. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test(shared): ServiceBase testsLibravatar Kristóf Marussy2022-05-27
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: use setBackgroundColor instead of CSSLibravatar Kristóf Marussy2022-05-26
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build(renderer): use modern MUI buildLibravatar Kristóf Marussy2022-05-26
| | | | | | | It supports the latest released version of chromium, which we use in electron. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* 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>
* chore(deps): bump dependenciesLibravatar Kristóf Marussy2022-05-26
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix(main): show location bar menu item enableLibravatar Kristóf Marussy2022-05-17
| | | | | | | Synchronize enabledness of the menu item with the toggle location bar button in the sidebar. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(renderer): use system fontsLibravatar Kristóf Marussy2022-05-17
| | | | | | | | | This decreases bundle size and avoid layout shifts due to font loading. Where it is not apparent wheter people can interact with a button, icons were added to disambiguate the button from the surrounding text. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix(renderer): reduce white flash on startLibravatar Kristóf Marussy2022-05-16
| | | | | | | We inject a CSS file that applies the theme background color even before the javascript for the renderer is loaded. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor(renderer): window title settingLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor(renderer): remove StoreProviderLibravatar Kristóf Marussy2022-05-16
| | | | | | | | Use explicit prop threading to pass the MainStore to components, which makes the data dependencies more explicit and enables better testability. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): bump dependenciesLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test: tests for infrastructure/electron in mainLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test: use test instead of itLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* test: prefer jest API instead of jest-eachLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): bump dependenciesLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix: react suspense race conditionLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | The top-level Suspense might trigger before the StoreProvider sets the store, which causes an error to be thrown in the useStore hook. We pass the store explicitly as a prop into the components that should load before the Suspense, which gets rid of the error. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix: vite dev server race conditionLibravatar Kristóf Marussy2022-05-16
| | | | | | | Handle the ERR_ABORTED error emitted by chromium when it tries to load the UI before the vite dev server is fully initialized. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: fix git lab ci configurationLibravatar Kristóf Marussy2022-05-16
| | | | | | https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscoverage_report Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): bump to react 18Libravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: electron-builder configLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: use wayland when availableLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | Auto-detect wayland in the yarn watch script. We use a shell script wrapper to launch sophie with wayland-specific arguments whenever appropriate. Because of this, the electron binary that ships with sophie has been renamed to sophie-bin. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: integration testing supportLibravatar Kristóf Marussy2022-05-16
| | | | | | Run integration tests in an electron environment for the main process. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: config file saving and debuggingLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | Reduce the number of dependencies and the amount of code running in a security sensitive context. Instead of a deep comparison, we just compare the serialized versions of the config files. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: remove json5 dependencyLibravatar Kristóf Marussy2022-05-16
| | | | | | | Use a more standard config file format and reduce the amount of external code running in the security-sensitive context of the main process. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): remove ms to reduce dependency countLibravatar Kristóf Marussy2022-05-16
| | | | | | | | We can trivially do what it does, and removing it reduces the amount of external dependencies running in the security-sensitive context of the main process. 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>
* chore(deps): upgrade dependenciesLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): bump nodejs to 16.14.2Libravatar Kristóf Marussy2022-05-16
| | | | | | Make sure we use the latest LTS Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Certificate viewerLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | Show certificates with an interface modeled after firefox's certificate viewer so that they can be inspected before trusting. The current implementation assumes that each certificate has a unique fingerprint (collisions are astronomically unlikely). Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(renderer): Insecure connection warningLibravatar Kristóf Marussy2022-05-16
| | | | | | | Show a more prominent warning for insecure connections with a button to try connecting over HTTPS if possible. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Always show location bar on errorLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | | | | | The location bar should be visible on error page to let people see and change the URL if needed. Additionally, it must be visible on insecure connections to show people that the connection if not secure. In the future, the location bar should also be shown if the loaded website is uncommon in the context of the current service, i.e., it is not explcitly allowlisted by the recipe. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix(renderer): Improve appearance in small windowsLibravatar Kristóf Marussy2022-05-16
| | | | | | | Make sure we do not overflow the viewport with the location bar or the error page. 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>
* fix(renderer): Make RTL flipping more resilient to hot reloadingLibravatar Kristóf Marussy2022-05-16
| | | | | | | | | | | | It seems moving the emotion cache into a separate file makes vite less likely to try to hot-reload @emotion/cache (which would fail due to creating the default cache twice). We still have some vite hot reload problems, possibly connecte to loading versions of react components with a different number of hook calls. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): Bump yarn versionLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix(renderer): Flip all RTL stylesLibravatar Kristóf Marussy2022-05-16
| | | | | | | We need a sylis plugin for this according to https://mui.com/material-ui/guides/right-to-left/#3-install-the-rtl-plugin Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): Bump electron to 19 for setBackgroundColor fixLibravatar Kristóf Marussy2022-05-16
| | | | | | | | Since https://github.com/electron/electron/pull/33435 has landed in electron 19 alpha, but not in 18, moving to 19 lets us remove the workarounds for setBackgroundColor. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore(deps): Bump dependenciesLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(renderer): Localize window titleLibravatar Kristóf Marussy2022-05-16
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat(service-preload): Embed service-injectLibravatar Kristóf Marussy2022-05-16
| | | | | | | | Embed the service-inject script into the service-preload script to avoid having to load it manually and reduce IPC communication when a service loads. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix(main): Do not show spurious abort errorLibravatar Kristóf Marussy2022-05-16
| | | | | | | | When the user aborts loading the webpage there is no error, so we don't need to display any and can just wait for the loading finished event from chromium. Signed-off-by: Kristóf Marussy <kristof@marussy.com>