-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[IS-2151] fixed FAB issue #2305
[IS-2151] fixed FAB issue #2305
Conversation
Hey @aliabbasmalik8, looks like our linter is pointing out some changes that need to be made. I'll get pinged once you fix those, and then I'll take a look |
Hi @Luke9389 lint issues fixed, please have a look
|
Hello again @aliabbasmalik8, thanks for that fast turn-around. Something just came up on my end, so I'll have to review this tomorrow. |
Hello again @aliabbasmalik8, would you please add screenshots for web and mobile web? I see that you've checked the boxes that you tested on those platforms, but screenshots are also required. |
src/components/Fab/index.ios.js
Outdated
|
||
function Fab({onPress, isActive}) { | ||
return ( | ||
<KeyboardAvoidingView behavior="position"> |
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.
In our documentation, in the Cross Platform 99.999% section, we strongly discourage platform specific code. I understand that the problem is only happening on iOS but this does not mean our solution needs to be iOS specific. Does KeyboardAvoidingView
only work on iOS? If not, then we don't need this ios specific file.
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.
@Luke9389 for android we have no need for KeyboardAvoidingView
and we need another configuration for KeyboardAvoidingView
if we want to add so that's the reason I moved to platform-specific code.
@@ -3,7 +3,7 @@ import {View} from 'react-native'; | |||
import styles from '../../../styles/styles'; | |||
import SidebarLinks from './SidebarLinks'; | |||
import CreateMenu from '../../../components/CreateMenu'; | |||
import FAB from '../../../components/FAB'; | |||
import FAB from '../../../components/Fab'; |
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 think our preference is to keep FAB as an all caps name to indicate that it's an acronym (Floating Action Button)
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.
Updated accordingly.
bfa9c30
to
7ce5f8f
Compare
Added screenshots |
src/components/FAB/index.js
Outdated
|
||
function Fab({onPress, isActive}) { | ||
return <FAB onPress={onPress} isActive={isActive} />; | ||
} |
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 not following why we can't use the KeyboardAvoidingView
everywhere? What is the problem exactly?
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.
- For android we have no need to use
KeyboardAvoidingView
- If we want to add
KeyboardAvoidingView
for android then we need to make many style changes(for both big and small screen) on theSidebarScreen
becauseFAB
onPress not working withKeyboardAvoidingView
in android. (can fix by making style changes but it's no need so that's the reason not did, will do on demand)
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.
Alright, I'll take your word for it. Although I'm not sure which style changes you mean in this case.
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 should add some kind of comment so that we will understand what purpose splitting these files in two serves?
7ce5f8f
to
9b673df
Compare
src/components/FAB/index.js
Outdated
|
||
function Fab({onPress, isActive}) { | ||
return <FAB onPress={onPress} isActive={isActive} />; | ||
} |
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.
Alright, I'll take your word for it. Although I'm not sure which style changes you mean in this case.
src/components/FAB/index.js
Outdated
|
||
function Fab({onPress, isActive}) { | ||
return <FAB onPress={onPress} isActive={isActive} />; | ||
} |
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 should add some kind of comment so that we will understand what purpose splitting these files in two serves?
@aliabbasmalik8 please do not force push. |
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.
LGTM
Thanks @aliabbasmalik8! |
🚀 [Deployed](https://github.com/Expensify/Expensify.cash
|
Details
To fix FAB position on iPad I used
keyboardavoidingview
for IOS Platform.Fixed Issues
Fixes https://github.com//issues/2151Tests
Test on all platform and FAB Icon is shown on the appropriate position and tested with click on FAB ICON and it's working on all platform
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iPad
Android