D23049: Add Kirigami ListSectionHeader component

2019-08-30 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R169:c67625eefebe: Add Kirigami ListSectionHeader component 
(authored by GB_2, committed by ngraham).

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=64217=64991

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, GB_2, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-26 Thread Björn Feber
GB_2 added a comment.


  Ping.

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, GB_2, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-21 Thread Björn Feber
GB_2 updated this revision to Diff 64217.
GB_2 added a comment.


  Improve look

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63662=64217

BRANCH
  arcpatch-D23049

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, GB_2, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-21 Thread Nathaniel Graham
ngraham added a comment.


  After living with this for a bit, I feel like maybe the following UI changes 
might be good to make the effect a bit more subtle:
  
  - Reduce the opacity of the gray background bit so the header doesn't feel 
like "a hole in the view"
  - Experiment with removing or reducing the strength of the horizontal line 
separators above and below the header text

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, GB_2, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-17 Thread Björn Feber
GB_2 added a comment.


  @mart is this good now?

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-13 Thread Björn Feber
GB_2 updated this revision to Diff 63662.
GB_2 added a comment.


  Improve example

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63653=63662

BRANCH
  arcpatch-D23049

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-13 Thread Björn Feber
GB_2 added a comment.


  In D23049#511210 , @ngraham wrote:
  
  > Hmm, if software making use of this needs to manually add a label, that 
seems to defeat part of the point of using a standard component.
  
  
  The label in the example was just supposed to show that any controls can be 
added. Sorry for the confusion, I'll remove it.

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-13 Thread Nathaniel Graham
ngraham added a comment.


  Hmm, if software making use of this needs to manually add a label, that seems 
to defeat part of the point of using a standard component.

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-13 Thread Björn Feber
GB_2 updated this revision to Diff 63653.
GB_2 added a comment.


  Ditch the extra property

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63444=63653

BRANCH
  arcpatch-D23049

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-13 Thread Marco Martin
mart added inline comments.

INLINE COMMENTS

> ListSectionHeader.qml:92
> +
> +Component.onCompleted: {
> +for (var i = 0; i < customItems.length; i++) {

This is a no-go hack:
those customItems shouldn't be reparented, but rather the property should be an 
alias to the data of another layout, like:

  property alias customItems: innerLayout.data
  contentItem: RowLayout {
  id: rowLayout
  RowLayout {
  id: innerLayout
  }

or, i would prefer even more, to just ditch that extra property completely:

  default property alias _contents: rowLayout.data
  contentItem: RowLayout {

​   id: rowLayout
​   Heading {

  

so one just does

  ListSectionHeader {
 Button {}
  }

and just works(tm)

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: jbbgameich, ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, 
fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Nathaniel Graham
ngraham added a comment.


  

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 updated this revision to Diff 63444.
GB_2 added a comment.


  Add example code

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63443=63444

BRANCH
  add-listsection-component (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 updated this revision to Diff 63443.
GB_2 added a comment.


  Update `customItems` description

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63442=63443

BRANCH
  add-listsection-component (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 added a comment.


  In D23049#509439 , @ngraham wrote:
  
  > Idea: add a `RowLayout` inside the `contentItem` and put the `Heading` in 
there, then expose a property called like "CustomItems" that allows the 
implementation to add additional items to that `RowLayout`. This would let us 
port Discover's sources page headers, which currently have custom controls in 
them:
  >
  > F7181822: Screenshot_20190809_113001.png 

  
  
  Done, I also updated the example :-)

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 updated this revision to Diff 63442.
GB_2 added a comment.


  Add `customItems` list

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63432=63442

BRANCH
  add-listsection-component (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Nathaniel Graham
ngraham added a comment.


  Idea: add a `RowLayout` inside the `contentItem` and put the `Heading` in 
there, then expose a property called like "CustomItems" that allows the 
implementation to add additional items to that `RowLayout`. This would let us 
port Discover's sources page headers, which currently have custom controls in 
them:
  
  F7181822: Screenshot_20190809_113001.png 


REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Nathaniel Graham
ngraham accepted this revision as: VDG, ngraham.
ngraham added a comment.
This revision is now accepted and ready to land.


  Thanks! We definitely need @mart's input on the right implementation of these 
details. But visually it looks great to me in System Settings (working on 
patches for the current users of these section headers), and but +1 on the 
concept of course.

REPOSITORY
  R169 Kirigami

BRANCH
  add-listsection-component (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart, ngraham
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 updated this revision to Diff 63432.
GB_2 added a comment.


  Use Kirigami 2.10

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23049?vs=63430=63432

BRANCH
  add-listsection-component (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D23049

AFFECTED FILES
  Mainpage.dox
  kirigami.qrc.in
  src/controls/ListSectionHeader.qml
  src/controls/plugins.qmltypes
  src/kirigamiplugin.cpp
  src/qmldir

To: GB_2, #kirigami, #vdg, mart
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Nathaniel Graham
ngraham added a comment.


  The numbers need to match. I think you want 2.10 (the current version appears 
to be 2.9, but this QML versioning stuff is pretty confusing to me).

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Carl Schwan
ognarb added a comment.


  It's a new version so probably 2.9 everywhere

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Björn Feber
GB_2 added a comment.


  In D23049#509339 , @ognarb wrote:
  
  > Something is probably wrong with the version numbers.
  
  
  Yeah, I don't know which I should choose and why, I just copied it from the 
other list items.

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein


D23049: Add Kirigami ListSectionHeader component

2019-08-09 Thread Carl Schwan
ognarb added a comment.


  Something is probably wrong with the version numbers.

INLINE COMMENTS

> kirigamiplugin.cpp:131
>  qmlRegisterType(componentUrl(QStringLiteral("BasicListItem.qml")), uri, 
> 2, 0, "BasicListItem");
> +qmlRegisterType(componentUrl(QStringLiteral("ListSectionHeader.qml")), 
> uri, 2, 0, "ListSectionHeader");
>  qmlRegisterType(componentUrl(QStringLiteral("OverlayDrawer.qml")), uri, 
> 2, 0, "OverlayDrawer");

Why 2.0?

> qmldir:19
>  BasicListItem 2.5 BasicListItem.qml
> +ListSectionHeader 2.5 ListSectionHeader.qml
>  AbstractItemViewHeader 2.1 AbstractItemViewHeader.qml

Why 2.5?

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D23049

To: GB_2, #kirigami, #vdg, mart
Cc: ognarb, davidre, ngraham, #vdg, plasma-devel, #kirigami, fbampaloukas, 
domson, dkardarakos, apol, davidedmundson, mart, hein