feat(NcAppContent): add `mobileLayout` prop
☑️ Resolves
- Enables
horizontal-splitlayout for mobile devices. This can be useful if you want to still see the list and details at the same time - Defaults to
no-splitstill so no change for callers that don't pass in themobileLayoutproperty
🖼️ Screenshots
| 🏚️ Before | 🏡 After |
|---|---|
🚧 Tasks
- [x] add
mobileLayoutproperty - [x] add
horizontal-splitoption formobileLayoutproperty
🏁 Checklist
- [X] ⛑️ Tests are included or are not applicable
- [X] 📘 Component documentation has been extended, updated or is not applicable
~- [ ] 3️⃣ Backport to
nextrequested with a Vue 3 upgrade~
Any thoughts or feedback here? @ShGKme @raimund-schluessler
Codecov Report
Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
Project coverage is 42.50%. Comparing base (
0d3715f) to head (9b6f558). Report is 146 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/components/NcAppContent/NcAppContent.vue | 80.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #6364 +/- ##
==========================================
+ Coverage 42.26% 42.50% +0.23%
==========================================
Files 155 156 +1
Lines 3996 4028 +32
Branches 1001 1038 +37
==========================================
+ Hits 1689 1712 +23
- Misses 2199 2200 +1
- Partials 108 116 +8
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for taking a look! Will do!
I think it looks very nice, but i remember when we discussed this feature, it was proposed to be shown only on big screens and not on mobile. So, looping @jancborchardt @nimishavijay @marcoambrosini to decide if this should go in.
@jancborchardt @GretaD in an app like nextcloud/news it is useful to see both the list and chosen item at the same time on mobile so that you can navigate between the items and not have to do multiple clicks to select the next item to read.
accidentally messing with the split
If you test it out in the PR I linked above, it is very difficult to accidentally change the split height instead of scroll.
Since this new property defaults to no-split then it is up to the app development team to deliberately implement too and there is no behavior change unless they are interested in providing the horizontal mobile split to their users. I would think this change can be merged and just rarely implemented if you are worried about it not being very useful in other apps, but for news I think it will be very useful as right now the mobile behavior is not preferable IMO.
I think that having 2 stacked scroll containers on a phone screen is bound to lead to bad UX consequences.
See both comments with changes requested. If you think you will work on the changes needed, then please feel free to reopen, we are happy to move this forward then.