D29294: Add support for layers to PagePoolAction.
This revision was automatically updated to reflect the committed changes. Closed by commit R169:9c3c2d1a2379: Add support for layers to PagePoolAction. (authored by masonm). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D29294?vs=81640&id=81935#toc REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81640&id=81935 REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm updated this revision to Diff 81640. masonm added a comment. Fix preventing layer from pushing itself REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81619&id=81640 BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm updated this revision to Diff 81619. masonm marked an inline comment as not done. masonm added a comment. Add _private QtObject back and comment why REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81610&id=81619 BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm marked an inline comment as not done. masonm added inline comments. INLINE COMMENTS > cblack wrote in PagePoolAction.qml:161 > this isn't how you do private objects, drop `property QtObject _private` and > access by ID Actually I realized why I did this now: the Action type does not allow assignment to default property so it is required to create a property here. I will put a comment on this but I need to add that back into the code, unless there is another pattern for this. If I were to create another "default" property, it would still be exposed to the public. It will likely have to be one of those things people just don't touch unless they want to break something. REPOSITORY R169 Kirigami REVISION DETAIL https://phabricator.kde.org/D29294 To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm updated this revision to Diff 81610. masonm added a comment. Code review changes 1 REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81606&id=81610 BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
cblack added inline comments. INLINE COMMENTS > tst_layers.qml:19-25 > +function initTestCase() { > +mainWindow.show() > +} > + > +function cleanupTestCase() { > +mainWindow.close() > +} You want to use `when: windowShown` > tst_layers.qml:27 > + > +function applicationWindow() { return mainWindow; } > + Unused. > PagePoolAction.qml:63 > + * This is intended for use with PageRow layers to allow > PagePoolActions to > + * push context-specific pages onto the layers stack. > + */ @since 5.70 @since org.kde.kirigami 2.12 > PagePoolAction.qml:161 > + > +property QtObject _private: QtObject { > +id: _private this isn't how you do private objects, drop `property QtObject _private` and access by ID REPOSITORY R169 Kirigami REVISION DETAIL https://phabricator.kde.org/D29294 To: masonm, #kirigami, mart Cc: cblack, mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm updated this revision to Diff 81606. masonm added a comment. Handle checked status with exclusive groups REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81588&id=81606 BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm updated this revision to Diff 81588. masonm added a comment. Honor checkable state of Action REPOSITORY R169 Kirigami CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29294?vs=81562&id=81588 BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson
D29294: Add support for layers to PagePoolAction.
masonm created this revision. masonm added reviewers: Kirigami, mart. masonm added a project: Kirigami. masonm requested review of this revision. REVISION SUMMARY Currently PagePoolAction only supports pushing to a pageStack, but often it makes sense to use layers to push modal/contextual pages (outside of the primary pageStack flow). This change introduces support for a "useLayers" property that can be set on PagePoolAction, allowing it use the pageStack.layers StackView (if it exists). It also includes a unit test and a couple fixes uncovered by the test. TEST PLAN See the tst_layers unit test included. REPOSITORY R169 Kirigami BRANCH add-pagepool-layer-support (branched from master) REVISION DETAIL https://phabricator.kde.org/D29294 AFFECTED FILES .gitignore autotests/CMakeLists.txt autotests/pagepool/tst_layers.qml src/controls/PagePoolAction.qml src/controls/PageRow.qml src/pagepool.cpp src/pagepool.h To: masonm, #kirigami, mart Cc: mart, plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson