WIP: Split view
This is a first draft for #34 to have your opinion on what's happening so far. I believe I chose the configuration that would be the simplest and cleanest (though a bit messy for my taste)…
So I propose to introduce a nested MainStack that can show the Notes List at the left of its Screens if there's enough space. An advantage is that by default it doesn't break the actual behavior of the app. An inconvenient is that there's a lot of small file changes because of the types (otherwise most files would be untouched).
The code as it is kinda works and is not polished:
-
[ ] Notebook Selection The notebook selection is not implemented. We can't use the URL to change the notebook. This makes the navigator navigate to Home, so the screen on the right doesn't stay open. Plus it's a weird behavior to have the URL change when only the list changes. It is also difficult to send data from the Drawer to the Notes List Screen. We could use a Context but that's seems exaggerated just for this. A solution could be to have the Notebook selection as a dropdown when clicking the title in the Header Bar: we don't need to involve the URL as it's already part of the screen.
-
[ ] Selection Of course the selected (open) note should be highlighted in the Notes List.
-
[x] Header Bar The header bar style is not consistent between React Native Paper and React Navigation but it can easily be fixed.
-
[ ] Right Action The
RightActioncomponent seems to create a loop if I include it in the Header so the page never finishes to render. I didn't investigate this for now.
I mostly want to know if it's worth pursuing that direction.

I think you’re in the right direction Kévin...that POC looks great!