new mobile components
ClosedPublic

Authored by mart on Oct 14 2015, 12:19 PM.

Details

Summary

ApplicationWindow: extension of QQC ApplicationWindow, as other mobile components is based upon pageStacks, but this uses the PlasmaExtras PageRow instead as suggested in the higs (will have to be seen if pageRow will have to be copied here as well for dependency issues)

ActionGroup: extension of QQC Action, it can have children, needed for hyerarchical menus in the GlobalDrawer

GlobalDrawer: default drawer for the left, contains a title with an icon (usually app icon and title), and a menu of actions that can be a tree: opening a subcategory works "kickoff style" with the menu sliding in the subcategory and the possibility to go back by swipe)
below the menu, arbitrary custom items can be embedded

ContextDrawer: default context drawer with a title and a list of actions, nesting not allowed

Page: similar api to other component sets (plasma components has one too, will depend if we can depend from them wether have a copy here in the end i guess) it has an actions property that will create a row of round buttons at the bottom of the page, if the main item f the page is a scrollView or a Flickable, use the scrolling to hide/show the buttons.
This element is supposed to be stuffed into the ApplicationWindow internal PageRow in order to make possible back navigation with swipe

Diff Detail

Repository
R22 Plasma Mobile
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart updated this revision to Diff 974.Oct 14 2015, 12:19 PM
mart retitled this revision from to new mobile components.
mart updated this object.
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: Plasma: Mobile.
mart set the repository for this revision to R22 Plasma Mobile.
mart updated this object.Oct 14 2015, 12:58 PM
mart updated this revision to Diff 1009.Oct 16 2015, 10:38 AM
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptOct 16 2015, 10:38 AM
davidedmundson requested changes to this revision.Oct 24 2015, 6:38 PM
davidedmundson added a reviewer: davidedmundson.
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
components/mobilecomponents/ActionGroup.qml
26 ↗(On Diff #1009)

to make sure I've got this:

ActionGroup contains a list of actions; but one of those actions could be an ActionGroup with nested child entries.

Seems clever.

components/mobilecomponents/ApplicationWindow.qml
21 ↗(On Diff #1009)

not used (for most of these)

27 ↗(On Diff #1009)

docs

components/mobilecomponents/ContextDrawer.qml
2 ↗(On Diff #1009)

no it isn't.

40 ↗(On Diff #1009)

why from the QQC one rather than Plasma.Components

58 ↗(On Diff #1009)

you need to anchor right and elide or your text will overflow

79 ↗(On Diff #1009)

not needed

80 ↗(On Diff #1009)

why add "Menu Item" to the visible text?

90 ↗(On Diff #1009)

.warning()

components/mobilecomponents/GlobalDrawer.qml
101

.pop?

otherwise you're "leaking" the stack with views you can't reach.

128

why are we popping the current entry when we go down a layer?

We want this like a stack, right?

132

why go up 1 level when activating an item?

surely we'd either want to stay where we are, or go back to the top, I don't see why we'd go up one level.

140

API wise I can imagine wanting to add my own page to pageRow at the end of a menu; like if I open settings, and now I want to draw my own custom thing, how would I go about that?

components/mobilecomponents/examples/ExampleApp.qml
97 ↗(On Diff #1009)

.

This revision now requires changes to proceed.Oct 24 2015, 6:39 PM
mart updated this revision to Diff 1066.Oct 27 2015, 12:52 PM
mart edited edge metadata.
mart added inline comments.Oct 27 2015, 12:56 PM
components/mobilecomponents/ActionGroup.qml
26 ↗(On Diff #1009)

yes, to do a tree-like thing

components/mobilecomponents/ContextDrawer.qml
40 ↗(On Diff #1009)

I'm still not sure wether the dependencies should be.
I think i'll go for using qqc and wrapping the other classes that i need such as theme and units to make the plsma dependency optional

80 ↗(On Diff #1009)

mistake

components/mobilecomponents/GlobalDrawer.qml
101

it's still possible to drag back the page to the previous level, but yeah, it may be onfusing

128

that's because of the scrolltolevel used before.
it pops all the way trough the current level, in case there was some other children under it. if we are on the top of the stack, ths pop doesn't do anything.
if the other becomes a pop, this pop can be removed

132

hmm, yeah, it should go to the top, the idea is like a menubar menu, that just closes after triggering

140

hmm, i didn't think about this, i assumed any page opened with an action here would have been pushed in the central pagerow, not this little one in the sidebar, which i tought it purely as a menu.
it may make sense but then should be added someway in the api, like just a direct access for the pagerow

mart marked 5 inline comments as done.Oct 27 2015, 12:58 PM
mart updated this revision to Diff 1110.Oct 30 2015, 3:01 PM
mart edited edge metadata.
davidedmundson accepted this revision.Nov 2 2015, 4:32 PM
davidedmundson edited edge metadata.
This revision is now accepted and ready to land.Nov 2 2015, 4:32 PM
This revision was automatically updated to reflect the committed changes.
mart marked 4 inline comments as done.
andric added a subscriber: andric.Nov 20 2015, 9:57 AM