[Consumer UI Refresh] Add CreateMenu. Bottom Drawer Modal Pattern + Hook up FAB
See original GitHub issueIf you haven’t already, check out our contributing guidelines for onboarding!
For this issue we will create a new type of Modal called bottomDocked
and then display a menu CreateMenu
component with two options “New Group” and “New Chat”. For now, touching both of these options will open the ChatSwitcher
which we can do by calling ChatSwitcher.show()
and closing the modal after a selection is made.
We are using the react-native-modal
library which has good documentation.
- Create a new component called
CreateMenu
which will render abottomDrawer
typeModal
. It should look like this: CreateMenu
should have the following props:isVisible
-Boolean
Used to display or hide the menumenuItemData
- array of objects with the following additional props:icon
- icon component to show in the optiontext
- text to display to the right of the icononPress
- function fired when menu option selected
- The
CreateMenu
should render thebottomDrawer
Modal
and then render the rows for each option passed in themenuItemData
array. - Remove the ability to hide the
FAB.js
isHidden
- When the FAB is active we will set the
isVisible
property of the menu totrue
and when it is not active we will hide the modal. - When the menu is closed (either via the
x
or by making a selection) the FAB should be set back to it’s original state. - All menu selections should call
ChatSwitcher.show()
.
So, after one of the selections in the menu is made we should see this view open:
The chat bubble and person icon assets to use are here: MenuAssets (1).zip
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[Consumer UI Refresh] Add CreateMenu. Bottom Drawer ...
[Consumer UI Refresh] Add CreateMenu. Bottom Drawer Modal Pattern + Hook up FAB #1240 ... There is a future plan for the alternate...
Read more >Diff - 2e0945b687..baaa9eae93 - chromium/src - Git at Google
SuggestionsNavigationDelegate; import org.chromium.ui.text. ... be shown before the sheet is opened // to ensure the toolbar ends up in the correct state.
Read more >Untitled
Breaking news us govt shutdown, Audi b8 s4 for sale, Syarikat awam berhad dapat modal dari, Home movies cartoon coach, Feed2all nhl.
Read more >HvC - ALBA.Net
Transition g1 s cycle cellulaire, Russian consonants pronunciation, R6 siege funny moments, Mapper pattern php, Ek3 technologies toronto?
Read more >sitemap-questions-196.xml - Stack Overflow
... https://stackoverflow.com/questions/915170/how-to-connect-mysql-database- ... .com/questions/1550458/how-to-add-san-storage-support-to-your-application ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@parasharrajat Thanks, we have assigned to Lucas already, but will have some more project work soon for you!
Correct. It should just be hidden by the modal in this case. There is a future plan for the alternate state of the FAB. But no need to worry about this for now.
Interesting idea, but we have something else in mind 😃
Exactly! Clicking outside the modal should close it. Selecting one of the options will also close it.
Proposal sounds perfect!
And yes, I agree with you about the name change. Perhaps instead of having a state value with
isFloatingActionButtonActive
we can change this toisCreateMenuVisible
and then pass this to both the modal and the fab?As for the questions…
For now, it’s ok to do exactly as you have there. Our plan for this is to have another style of modal that is more like a popover for the wide screen views. In that case, the menu will be closed by pressing on the FAB and the menu will sit above like so:
Yep you are correct and that sounds like a good plan. We can do 300 for the wide view and 100% for the small view.
Ah hmm I see. It seems like the “ChatSwitcher” is not showing. I can help debug when you create a PR if you haven’t solved it yet.