-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: support for edge to edge screen in android #6040
Draft
Rohit3523
wants to merge
4
commits into
RocketChat:develop
Choose a base branch
from
Rohit3523:edge-to-edge
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−60
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2722074
Added react-native-edge-to-edge and react-native-keyboard-controller …
Rohit3523 ad5ab84
Added Theme.EdgeToEdge for edge-to-edge ui support in android
Rohit3523 045874a
Refactor StatusBar component; integrate SafeAreaView and KeyboardProv…
Rohit3523 511b1bf
Add keyboard visibility handling and state management
Rohit3523 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
import React from 'react'; | ||
import { StatusBar as StatusBarRN } from 'react-native'; | ||
import { SystemBars } from "react-native-edge-to-edge"; | ||
|
||
import { useTheme } from '../theme'; | ||
|
||
const supportedStyles = { | ||
'light-content': 'light-content', | ||
'dark-content': 'dark-content' | ||
}; | ||
|
||
interface IStatusBar { | ||
barStyle?: keyof typeof supportedStyles; | ||
backgroundColor?: string; | ||
} | ||
|
||
const StatusBar = ({ barStyle, backgroundColor }: IStatusBar) => { | ||
const { theme, colors } = useTheme(); | ||
if (!barStyle) { | ||
barStyle = 'light-content'; | ||
if (theme === 'light') { | ||
barStyle = 'dark-content'; | ||
} | ||
} | ||
return <StatusBarRN backgroundColor={backgroundColor ?? colors.surfaceNeutral} barStyle={barStyle} animated />; | ||
const StatusBar = () => { | ||
const { theme } = useTheme(); | ||
|
||
return <SystemBars style={theme === 'light' ? 'dark' : 'light'} /> | ||
}; | ||
|
||
export default StatusBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11950,6 +11950,11 @@ [email protected]: | |
deprecated-react-native-prop-types "^2.3.0" | ||
prop-types "^15.6.0" | ||
|
||
react-native-edge-to-edge@^1.1.3: | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/react-native-edge-to-edge/-/react-native-edge-to-edge-1.1.3.tgz#bcfc5142da5556766de7ac8371fba94d0bc72e07" | ||
integrity sha512-+as8PmGZCvZtHbHT2xXH0YFH1qqBpFVH14Pzk0+6fI53zWMa56m5HY9S1mhIBgPjdqLBM8Y6KresI1/MUI86pw== | ||
|
||
react-native-fast-image@RocketChat/react-native-fast-image.git#bump-version: | ||
version "8.5.12" | ||
resolved "https://codeload.github.com/RocketChat/react-native-fast-image/tar.gz/8bdb187a4500e23ad1c95324a669c25361bbf685" | ||
|
@@ -11991,13 +11996,25 @@ react-native-iphone-x-helper@^1.0.3: | |
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010" | ||
integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg== | ||
|
||
react-native-is-edge-to-edge@^1.1.6: | ||
version "1.1.6" | ||
resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.6.tgz#69ec13f70d76e9245e275eed4140d0873a78f902" | ||
integrity sha512-1pHnFTlBahins6UAajXUqeCOHew9l9C2C8tErnpGC3IyLJzvxD+TpYAixnCbrVS52f7+NvMttbiSI290XfwN0w== | ||
|
||
[email protected]: | ||
version "0.5.1" | ||
resolved "https://registry.yarnpkg.com/react-native-katex/-/react-native-katex-0.5.1.tgz#516428ddc10b71e2f219869880222b1d3a1fc5eb" | ||
integrity sha512-71Hi66DsTsCHnxKcT0BtmylJvl8q285qbmSPJRzLM05Lu4qtgNwx2htb+k+nNaFv0KJl67n/irdd3uktpkXPsg== | ||
dependencies: | ||
react-native-webview "^11.18.2" | ||
|
||
react-native-keyboard-controller@^1.14.5: | ||
version "1.14.5" | ||
resolved "https://registry.yarnpkg.com/react-native-keyboard-controller/-/react-native-keyboard-controller-1.14.5.tgz#ec1e7d1fb8ee18b69ced4d8ddd6fd99bdaaf14bb" | ||
integrity sha512-Cx7+SWI/P50i4PKJZN4T43RqoFkJ3GBoxjQ5ysrzZGoImHTF4j3atSwcBQGMmunKCem1yGOOQ84or+Vbcor6wQ== | ||
dependencies: | ||
react-native-is-edge-to-edge "^1.1.6" | ||
|
||
react-native-keychain@^8.2.0: | ||
version "8.2.0" | ||
resolved "https://registry.yarnpkg.com/react-native-keychain/-/react-native-keychain-8.2.0.tgz#aea82df37aacbb04f8b567a8e0e6d7292025610a" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here i am going to use keyboard hook, temporary using state because hooks are hard to use in class component