-
Notifications
You must be signed in to change notification settings - Fork 479
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
feat: update to Electron 12 #2220
Conversation
9268434
to
80f7241
Compare
80f7241
to
94619ee
Compare
client/src/remote/index.js
Outdated
@@ -22,14 +22,10 @@ const { | |||
flags, | |||
platform, | |||
plugins: appPlugins, | |||
ipcRenderer | |||
api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is api here? Can we give it a more sensible name? Alternative: Construct the Backend directly in appPreload. Not sure what's the benefit to construct it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benefits:
- We don't expose the
ipcRenderer
methods directly. - We can filter events for which
send
can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So yeah, I could rename it to ipcRenderer
again. However, how does the client benefit from knowing about ipcRenderer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the client benefit from knowing something that is called API?
A solution could be to return the instantiated backend from the pre-load function. This way we do not need to pass around these names at all. Let us try to avoid generics like "api" and "descriptor" in our code. We got a lot of these in there already 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented via 0a84217
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments inlined.
We should fix the wrong focus outline style. |
app/lib/preload.js
Outdated
// expose api only once | ||
// related to https://github.com/camunda/camunda-modeler/issues/2143 | ||
if (executed) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be helpful to blow up here, so we do not silently discard miss-use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return; | |
throw new Error('🚔'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error('this is recorded! We\'ll track you down!!!!11^^10815')
.
Regarding the deployment button, I'll remove the outline as it is not present in 4.7. |
Some insights about why they changed the outline: https://blog.chromium.org/2020/03/updates-to-form-controls-and-focus.html#Blog1:~:text=A%20More%20Visible%20Focus%20Ring |
3246dcc
to
22db281
Compare
CI fails due to unrelated error 🤪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed the issue and decided on the following:
|
c7c6f5e
to
84674b4
Compare
It was because of missing |
84674b4
to
0a84217
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. Also smoke tested it on Linux 👍
Needs approval by @andreasgeier. |
This introduces context isolation to the app. Because of that, the remote APIs have changed. Backend does not expose `off` method anymore. Use the return value of `on` and `once` instead. Example: ```javascript const subscription = backend.on('client:window-focused', listener); subscription.cancel(); ``` Closes #1926
* Use custom color for default outline. * Replace outline with box-shadow for custom elements.
0a84217
to
2a1705f
Compare
Found one more event thanks to codecov ;) It should be OK now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick exploratory test through the user interface and found no more outline problems.
This introduces context isolation to the app. Because of that,
the remote APIs have changed. Backend does not expose
off
method anymore. Use the return value of
on
andonce
instead.Example:
Closes #1926