Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix activities #345

Closed
wants to merge 49 commits into from
Closed

Fix activities #345

wants to merge 49 commits into from

Conversation

camilasan
Copy link
Member

@camilasan camilasan commented May 25, 2018

https://github.com/nextcloud-gmbh/client/issues/3

Please, test it too.

Description

  • This PR merges the Protocol widget, the Issues widget and the Notifications widget into one: the Activity Widget. Errors will always be on top, then Notifications comes next and then Activities for last.

  • I have added 2 new types of Activity at src/gui/activitydata.h: NotificationType and ErrorType, also a new property _object_type to be able to check for remote_share.

  • The biggest chunk of new code is at src/gui/activityitemdelegate.cpp for drawing the buttons/options/icons for the different types of activities/notifications.

  • In src/gui/activityitemdelegate.cpp I am filtering mouse events (ActivityItemDelegate::editorEvent) to check if the users clicked on a button in the list of activities/notifications. Then a signal is emitted to ActivityWidget, that does the rest... open browser, open file manager, send request to server.

  • In the src/gui/settingsdialog.cpp is the code for creating an activity widget for each user.

  • ActivityListModel and ActivityWidget have now an AccountState connecting user and widget.

Output on Linux

  • Multiple users: each one has a activity list
    linux_users

  • Buttons: the primary action (accept/more information) is in a button. Secondary action (open file manager/open browser/decline/dismiss) is with an icon.
    linux_menus_buttons

  • Errors
    linux_errors

  • Small window
    linux_small_window

  • Other notifications
    linux_small_section

Output on Mac

  • Multiple users:
    macos_users

  • Buttons
    macos_more_buttons

macos_buttons

Output on Windows

  • Multiple users
    windows_multiple_users

  • Buttons
    windows_menus_buttons

  • Errors
    windows_errors

  • More buttons
    windows_menus_buttons2

  • More errors
    windows_errors2

Known issues

  • The clickable are on the buttons are not super. I can increase it.
  • @jancborchardt comments... since we talked about it and he draw some mockups. I might have missed something.
  • ...

@camilasan camilasan added this to In Review in Desktop Client 2.5 Series Jun 25, 2018
@camilasan camilasan moved this from In Review | Testing to In progress in Desktop Client 2.5 Series Jul 2, 2018
@camilasan camilasan force-pushed the fix-activities branch 7 times, most recently from 03076b2 to 5517dc1 Compare July 8, 2018 21:25
@camilasan camilasan moved this from In progress to In Review | Testing in Desktop Client 2.5 Series Jul 10, 2018
@rullzer
Copy link
Member

rullzer commented Jul 10, 2018

I like it.

@camilasan could you rebase and squash a bit?

ivaradi and others added 10 commits July 11, 2018 11:32
This reverts commit dcceec25c89e935b59c921ae22c66199f8642531.
Use QByteArray for the query so we don't have to convert twice.
Automatically finish the query when the DB close, so we don't
have to call reset
This avoid haivng to modify 4 places when we want to add a query
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Camila San added 26 commits July 11, 2018 11:32
- Displays the notification icon when available.
- Adds dismiss button with an icon.
- Handles buttons actions in the list view.
- Changes what is painted first (activityitemdelegate) for each row in
the activity list.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
- Activities from the server don't have buttons to interact with so
their content can use the full lenght of the row.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
- Align progress indicator to the center.
- Moves unused code.
- Removes unused labels.

Signed-off-by: Camila San <hello@camila.codes>
- Errors will always be on top, then Notifications comes next and then Activities for last.
- Adds 2 new types of Activity: NotificationType and ErrorType.
- ActivityListModel and ActivityWidget stores AccountState to connect user and widget.

Signed-off-by: Camila San <hello@camila.codes>
- It was too light when the row was selected.

Signed-off-by: Camila San <hello@camila.codes>
- The url for the browser was not full path to the file.

Signed-off-by: Camila San <hello@camila.codes>
- The icons used before were not really clear on what their function
was.

Signed-off-by: Camila San <hello@camila.codes>
- The path to the file wa being stored in the wrong activity property.
It was in the action link when it should be in the file.
- Minor: comments out the display of issues and protocol widget.

Signed-off-by: Camila San <hello@camila.codes>
- Removes commented out code.
- adds TODO's.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
- Fixes adding/removing accounts with separator in the toolbar -
accounts were not added in the right order and removing was not
including the separator.
- Fixes button sizes in the activities list - the buttons were too small
for the text.

Signed-off-by: Camila San <hello@camila.codes>
- Stores object_type form the api response to check if notification is
remote_share, so the primary button text is 'accept' instead of 'more
information'.

Signed-off-by: Camila San <hello@camila.codes>
- Stores object_type from the api response to check if notification is a
call so the primary button text and action is 'Join'.
- Puts strings into consts.
- Minor change: Improves comments on ActivityListModel.

Signed-off-by: Camila San <hello@camila.codes>
- With the merging of activities and notifications the copy to clipboard
function got broken. Had to put it back as it was before.
- The output text from the clipboard was almost unreadeable. Ajusted the
space between texts and used separator '-' instead of ','.
- Minor: cleans up comments.

Signed-off-by: Camila San <hello@camila.codes>
- ActivityListModel and ActivityWidget stores an AccountState to connect user and widget.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
- Minor: cleans up code used for debug.

Signed-off-by: Camila San <hello@camila.codes>
- The list of possible actions (server requests( was not being used in
the activityitemdelegate. This is needed to be able to draw the primary
action buttons and other options for each notification in the view.)
- Minor changes:
  - Uses different icons for activities and notifications in the list view.
  - Align elements in the list view of notifications/activities properly.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
- Do not display buttons for activities.
- Adds correctly text and button in the space left depending on the widget size.

Signed-off-by: Camila San <hello@camila.codes>
Signed-off-by: Camila San <hello@camila.codes>
@camilasan
Copy link
Member Author

I messed up with the history here. Fixed at #491.

@camilasan camilasan closed this Jul 11, 2018
Desktop Client 2.5 Series automation moved this from In Review | Testing to Merged | Done | Release! Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Desktop Client 2.5 Series
  
Merged | Done | Release!
Development

Successfully merging this pull request may close these issues.

None yet

7 participants