-
-
Notifications
You must be signed in to change notification settings - Fork 266
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(suite-native): offline header shows that app is offline #13501
Conversation
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
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.
Code looks good, I'll test it. Message-system banners should stay visible even during onboarding, I believe. At least we should discuss that separately from offline banner.
I would like to double check if reachabilityUrl is ever used. In that case we should define our own, I guess.
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/10205343182 |
bbcb365
to
9224e61
Compare
972aa8d
to
2e99f94
Compare
On Android the status bar has unmatching color (it shoud be yellow, not white). Please change it via the https://reactnative.dev/docs/statusbar API. |
|
||
// If offline header is visible, return 0 for top inset, otherwise return the top inset from safe area insets | ||
// this is beacuse the offline header is displayed on top of the screen and we don't want to add any top padding | ||
export const useOfflineHeaderAwareSafeAreaInsets = () => { |
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'm just wondering why this is needed. The MessageSystemBannerRenderer
works the same way as the OfflineHeader
component but a special "topAreInsetHook" is not required.
How is it different here? I would prefer not to override the default useSafeAreaInsets
if possible for better DX.
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 also bugs me is that now all the packages imported to the suite-native/connection-status
are now imported to all the places where are top area insets used. That could be quite troublesome in the future if this package will grow. Can imagine some nasty cyclical dependencies.
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.
this conditional inset is needed otherwise if the offlineheader is visible everything with usesafeareainset has odd big offset from the top.
Any idea how to do it differently is welcomed. 🙏
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.
note: out of the scope of this PR
new issue created: #13659
Otherwise, it looks very good. Good job ✌️. Looking forward merging this. |
|
1879ac4
to
afb5cb2
Compare
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/10265051845 |
24861cb
to
1fddfe3
Compare
@SocketSecurity ignore npm/@react-native-community/[email protected]. |
55179bd
to
deaa12f
Compare
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/10266449394 |
deaa12f
to
b6a4c39
Compare
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/10267976740 |
b6a4c39
to
6c49281
Compare
Shows offline header stripe on top of app (after onboarding).
Related Issue
Resolve #13597
Screenshots: