D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-20 Thread Dan Leinir Turthra Jensen
leinir created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
leinir requested review of this revision.

REVISION SUMMARY
  This is a work in progress for adding support for posting comments
  to the KNewStuffCore framework, and cleaning up voting a touch. It
  further adds UI for creating said comments to KNSQuick.
  
  - Add signals to fake a virtual function for posting a comment
  - Implement comment posting (and userCanVote check)
  - Add invokable functions for creating comments (and reviews)
  - Add voting function to the quickitemsmodel (and userCanVote role)
  - Entry details checks for voting ability
  - Don't allow voting from the list view (in the old dialog)
  
  This does not strictly require D25961 , 
but without it this will simply not allow voting and commenting with the attica 
backend

REPOSITORY
  R304 KNewStuff

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/provider.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-21 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74016.
leinir added a comment.


  - Allow clearing the Rating control when editable
  - Initial new-comment sheet (needs some layout work)

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=73944&id=74016

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/provider.h
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-21 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-22 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74113.
leinir added a subscriber: mart.
leinir added a comment.


  Progressing steadily, with some layout fixing assistance from Marco.
  Also, ensure you're using kirigami master for the best experience ;)
  
  - Forward the userCanComment information from the items model
  - Clean up the layouting of the comments sheet (thanks for the help, @mart!)
  - Add reply request functionality to the comment delegate

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74016&id=74113

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-22 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-22 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74119.
leinir added a comment.


  - Add a voting method to the Ratings component (separate to editable)
  - Use the votable prop to add voting UI to entry details
  - Hook up to the functions which do the actual vote/comment work

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74113&id=74119

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-22 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74210.
leinir added a comment.


  - Add editCredentials to the knscore provider interface
  - Implement edit credentials in the Attica provider
  - Add functionality to request a credentials editor from KNSCore::Engine
  - Add an invokable to the KNSQuick Engine for editing credentials
  - Call in and request the credentials editor if none exist

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74119&id=74210

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/engine.cpp
  src/core/engine.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickengine.cpp
  src/qtquick/quickengine.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74225.
leinir added a comment.


  - Pull out the new comments sheet into a component
  - Use NewCommentSheet to let users create comments on entries without

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74210&id=74225

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/engine.cpp
  src/core/engine.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/NewCommentSheet.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickengine.cpp
  src/qtquick/quickengine.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74227.
leinir added a comment.


  - Don't suggest making reviews if you're writing a reply comment
  - Don't pull up a comments model until we actually need it

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74225&id=74227

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/engine.cpp
  src/core/engine.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/NewCommentSheet.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickengine.cpp
  src/qtquick/quickengine.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74229.
leinir edited the summary of this revision.
leinir added a comment.


  - Clarify the "be the first" text a touch...

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74227&id=74229

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/engine.cpp
  src/core/engine.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/NewCommentSheet.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickengine.cpp
  src/qtquick/quickengine.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir updated this revision to Diff 74230.
leinir added a comment.


  - A better text for the "be the first" link (i'll try not dither too much)

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26794?vs=74229&id=74230

BRANCH
  master

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

AFFECTED FILES
  src/attica/atticaprovider.cpp
  src/attica/atticaprovider_p.h
  src/core/commentsmodel.cpp
  src/core/commentsmodel.h
  src/core/engine.cpp
  src/core/engine.h
  src/core/provider.h
  src/qtquick/qml/EntryDetails.qml
  src/qtquick/qml/private/EntryCommentDelegate.qml
  src/qtquick/qml/private/EntryCommentsPage.qml
  src/qtquick/qml/private/NewCommentSheet.qml
  src/qtquick/qml/private/Rating.qml
  src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
  src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
  src/qtquick/quickengine.cpp
  src/qtquick/quickengine.h
  src/qtquick/quickitemsmodel.cpp
  src/qtquick/quickitemsmodel.h
  src/ui/entrydetailsdialog.cpp
  src/ui/itemsviewdelegate.cpp

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-01-23 Thread Dan Leinir Turthra Jensen
leinir added a comment.


  Right, so because it is being brought up by people, i thought i should 
perhaps just do a touch of an explanation for the thought process that made me 
arrive at the current design for the NewCommentSheet component and its ability 
to chose whether or not you are writing a comment or a review. The options that 
i found can be enumerated as follows:
  
  *) This one (that is, one action shows a dialogue which lets the user switch 
between a comment being a review or just a comment by either setting a rating 
or not)
  a) A check box to explicitly indicate that you want to create a review, which 
then enables/disables the ratings stars (so much clunkiness)
  x) As above, but it hides/shows the ratings stars instead of enable/disable 
(ew, stuff moving under my cursor)
  n) Two separate actions, one for creating a review, and one for creating a 
comment, and they then show a sheet which can only do one or the other (really 
just adding this in for completion, because wow, just no - also incidentally 
not a straightforward thing to do, as there's only the one main action on a 
kirigami page, though that's an overcomeable technical limitation rather than a 
workflow dictated one)

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26794: [WIP] Implement comment posting (and reenable voting)

2020-03-19 Thread Dan Leinir Turthra Jensen
leinir edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: leinir
Cc: mart, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, 
bruns