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

Status overview #20931

Closed
8 tasks done
rullzer opened this issue May 11, 2020 · 19 comments · Fixed by #21186
Closed
8 tasks done

Status overview #20931

rullzer opened this issue May 11, 2020 · 19 comments · Fixed by #21186

Comments

@rullzer
Copy link
Member

rullzer commented May 11, 2020

Summary

It would be nice if in your Nextcloud you could relay your own status to other users. So they know what you are doing.

Details

A lot of modern communication platforms have statuses. Something like that would be useful for Nextcloud as well. That way you can signal that you are busy, on holiday, on site somewhere etc.

To be extended

API

DB:

  1. New table: user_status
  • id (unsigned int, not null, autoincrement)
  • user_id (string, not null)
  • status_type (string, not null) => available, busy, unavailable
  • status_icon (string) => 1 unicode character
  • message (string) => custom message
  • created_at (unsigned int, not null) => unixtime
  • clear_at (unsigned int) => unixtime

API spec (OCS):

  1. Expose user_status capability
    Req: GET /ocs/v1.php/cloud/capabilities
    Res:
{
  "ocs": {
    ...
    "data": {
      ...
      "capabilities": {
        ...
        "user_status": {
          "enabled": true
        }
      }
    }
  }
}
  1. Read all user-statuses
    Req: GET /ocs/v1.php/apps/user_status/api/v1/statuses
    Res:
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": null
    },
    "data": [
      {
        "userId": "admin",
        "statusType": "busy",
        "createdAt": 1589795903
      },
      {
        "userId": "user",
        "statusType": "holiday",
        "statusIcon": "🏝",
        "message": "On Vacation",
        "createdAt": 1589795903,
        "clearAt": 1589795904,
      }
    ]
  }
}

Allowed parameters:

  • limit
  • offset
  1. Read status of specific user:
    Req: GET /ocs/v1.php/apps/user_status/api/v1/statuses/admin
    Res:
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": null
    },
    "data": {
      "userId": "admin",
      "statusType": "busy",
      "createdAt": 1589795903
    }
  }
}
  1. Read status of authenticated user:
    Req: GET /ocs/v1.php/apps/user_status/api/v1/status
    Res:
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": null
    },
    "data": {
      "userId": "admin",
      "statusType": "busy",
      "createdAt": 1589795903
    }
  }
}
  1. Set a new status:
    Req: PUT /ocs/v1.php/apps/user_status/api/v1/status

  2. Clear status:
    Req: DELETE /ocs/v1.php/apps/user_status/api/v1/status

Notes on privacy:

The APIs should respect the sharing privacy settings. (e.g. only allow to fetch status within own groups, etc.)

Acceptance criteria

To be extended.

  • I want to be able to see my own status overlayed on my avatar in the top right
  • I want to be able to set my status
  • I want to have at least the available statuses
    • Available
    • Busy
    • Holiday
  • In places where appropiat (specify @georgehrke @jancborchardt) I want to see the status of other users on the system
  • I want to have an API that can be used by our mobile apps as well
@rullzer rullzer added enhancement 1. to develop Accepted and waiting to be taken care of labels May 11, 2020
@rullzer rullzer added this to the Nextcloud 20 milestone May 11, 2020
@go2sh
Copy link
Contributor

go2sh commented May 12, 2020

It would be nice to set a certain time span or end date for a status, e.g. "Holiday until 17.05.2020".

@georgehrke
Copy link
Member

@go2s Yes, the plan is to have a "Clear status in 1 hour / 1 day / 1 week" feature.

@ChristophWurst
Copy link
Member

Holiday

Nitpick: this is a bit specific. How about unavailable, which covers vacation, out of office and being sick

@go2sh
Copy link
Contributor

go2sh commented May 19, 2020

I think the reason, why someone is unavailable, provides a good value for communication, because you can express a grading. If someone is sick or on vaction, you might get no answere, but if someone is out of office, or doing homeoffice, you might get answer.

@ChristophWurst
Copy link
Member

Fair enough, out of office does not mean unavailable. But being sick, public holiday and vacation can be seen as unavailable IMO :)

@georgehrke
Copy link
Member

@go2sh You will have the ability to set a custom icon and custom message like 🌴 On Vacation or 🤒 On sick leave.

The status should really be on a lower level:

  • 🟢 Available
  • 🟠 Busy (e.g. in a meeting right now, but i will be available after)
  • 🔴 Unavailable.

@go2sh
Copy link
Contributor

go2sh commented May 19, 2020

Ah nice, that wasn't clear to me. :-)

@tobiasKaminsky
Copy link
Member

So for mobile it would be great to have it in:

  • propfind "nc:sharees" of files/folders, so that we can directly show it in file list
  • search for users when sharing (should be "ocs/v2.php/apps/files_sharing/api/v1/sharees")

@georgehrke
Copy link
Member

@rullzer @jancborchardt Should the user-status be visible on public pages as well or should it only be visible to other users?

@georgehrke georgehrke mentioned this issue Jun 2, 2020
3 tasks
@rullzer
Copy link
Member Author

rullzer commented Jun 2, 2020

@rullzer @jancborchardt Should the user-status be visible on public pages as well or should it only be visible to other users?

O that is a good question.
For now I guess not. we already have privacy controls for the avatar. So we don't always (or by default not even) show it. So I guess for now status should not be shown on public pages. Since it can leak even more sensitive info.

@georgehrke
Copy link
Member

Let's keep this open to track further improvements and client parity.

@georgehrke
Copy link
Member

georgehrke commented Aug 5, 2020

ToDo for a follow-up PR:

  • inject user-status into share search endpoint
  • The invisible icon is black on dark background when dark theme is used.
  • Add Max length to input field

Notes from @jancborchardt:

  • Status indicator icon overlaid on your own avatar in the top right
  • In the avatar menu which opens when you click on another person's avatar
  • In Talk in the Participants list as a subline
  • In sharing as a subline
  • In the sharing suggestion dropdown as a subline
  • In the Dashboard below the title

@georgehrke
Copy link
Member

PHP API: #22106

@georgehrke
Copy link
Member

Followup PR: #22109

@georgehrke
Copy link
Member

Pull-Request in Nc/Vue:nextcloud-libraries/nextcloud-vue#1259

@azul

This comment has been minimized.

@georgehrke
Copy link
Member

georgehrke commented Aug 15, 2020

@azul That is an issue in the devtools, see vuejs/devtools-v6#430.

Vuex itself will work correctly though.

Edit: you can just disable User Status in the apps management, if it's causing too many issues for you

@azul
Copy link
Contributor

azul commented Aug 16, 2020

@georgehrke You're right - it's just in the dev tools. The issue in my code was a different one. Thanks for the hints. 😄

@georgehrke
Copy link
Member

Follow-up Issues:
Indicator on Top Right Avatar: #22451
Client Implementation Tracking: #22452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants