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

Add avatar plugin. #287

Draft
wants to merge 7 commits into
base: default
Choose a base branch
from
Draft

Add avatar plugin. #287

wants to merge 7 commits into from

Conversation

goto-bus-stop
Copy link
Member

@goto-bus-stop goto-bus-stop commented Aug 20, 2018

Adds a uw.avatars API. The public API is:

  • uw.avatars.getAvailableAvatars(user) - List available avatar descriptors.
  • uw.avatars.setAvatar(user, descriptor) - Set the user's avatar to one of the getAvailableAvatars() descriptors
  • uw.avatars.supportsCustomAvatars() - Check if custom avatar uploads are possible (requires configuring a file storage path)
  • uw.avatars.setCustomAvatar(user, stream) - Store the avatar from the readable stream and set it as the user's avatar

The default implementation has these features:

  • "Magic" avatars, like the default 'sigil'. These are generated based on user data (or randomly). A plugin could use this to add gravatar support for example
  • "Social" avatars, which uses the profile picture URLs of each social auth method that a user has used

A client is expected to show a list of available avatars to choose from, and an image upload form if uploads are enabled.

TODOs

  • Probably add a "gallery" type to the default implementation so we can use yoongi and panda's solid af designs
  • Add size and dimension restrictions to uploaded avatars—dynamically resize and compress
  • Have an assets plugin of some sort to store and serve the uploaded avatars Asset store for uploaded files #397

After this is done, the pending social account stuff should use the avatar selection screen on the client end. That way we don't show user's faces in chat immediately if they signed up with their google account for example. (This is why google signup is not enabled on wlk.yt fwiw 🤣 )

@goto-bus-stop goto-bus-stop marked this pull request as draft April 19, 2020 12:47
@goto-bus-stop goto-bus-stop changed the title [WIP] Add avatar plugin. Add avatar plugin. Apr 19, 2020
@goto-bus-stop goto-bus-stop changed the base branch from master to default June 16, 2020 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant