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

[MM-51514] Implement Calls user settings #820

Merged
merged 7 commits into from
Aug 13, 2024
Merged

[MM-51514] Implement Calls user settings #820

merged 7 commits into from
Aug 13, 2024

Conversation

streamer45
Copy link
Collaborator

@streamer45 streamer45 commented Jul 25, 2024

Summary

PR attempts to implement a dedicated Calls user setting section that can be also accessed from outside the context of a call and is part of the existing user settings modal. This will be quite useful for implementing many future features, such as custom shortcuts, experimental settings, and so on.

The existing designs (see below) were slightly out of date and incomplete, so I tried to do my best to come up with something that works and doesn't look completely inconsistent. That said, to avoid overcommitting, I focused on enabling this functionality in the first place, and now I am happy to iterate further with the help of a UX person.

This PR currently implements audio devices selection only. These are client specific so they don't use the Mattermost preference model. I am also not porting call notification settings (e.g. ringing) pending further discussion on where they should live.

Note This requires changes to Webapp to work, namely this branch.

Example Video

calls_settings.mp4

Designs (sort of)

https://www.figma.com/design/ngGHVBsmJzzeYbYkHvxVGJ/MM-51514-Calls%3A-Settings?node-id=1-7&t=VPMqAzHdUi18nMGw-0

Ticket Link

https://mattermost.atlassian.net/browse/MM-51514

@streamer45 streamer45 added 1: UX Review Requires review by ux 2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester labels Jul 25, 2024
@streamer45 streamer45 requested a review from cpoile July 25, 2024 15:27
@streamer45 streamer45 self-assigned this Jul 25, 2024
@streamer45
Copy link
Collaborator Author

@cpoile Given the above, feel free to give it a quick pass and leave thoughts, but understand that it may take a few iterations before a final review can be done.

@streamer45
Copy link
Collaborator Author

@matthewbirtch Would your team be able to help with this? It's a nice to have in my mind, but it would be great to have in v1.

@streamer45 streamer45 added this to the v1.0.0 🚀 / MM 10.0 milestone Jul 25, 2024
Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you can find a simpler way, if not non-blocking as is. Nice work!

Comment on lines +116 to +117
const audioInputsRef = useRef<AudioDevicesSelectionHandle>(null);
const audioOutputsRef = useRef<AudioDevicesSelectionHandle>(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? I wonder if there's an easier way (like passing in a setState so that the child can save the current selection)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpoile I had to choose between those two approaches and didn't really like either. Pushing state from child to parent was equally (if not more) verbose as it would have duplicated more state or worse needed to pass getters as well. In the end I think the ref approach is okaish but if you have a substantial simplification in mind please let me know.

@matthewbirtch
Copy link
Contributor

@matthewbirtch Would your team be able to help with this? It's a nice to have in my mind, but it would be great to have in v1.

@abhijit-singh could you review this (if you can get it running locally)? It looks good at first glance but may need a few style tweaks on fonts and such.

Copy link

@abhijit-singh abhijit-singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not able to get the plugin running locally with these and the related webapp changes but the screencap is helpful and makes it clear.

I did put together mockups for the ideal UI to match with what we currently have - Figma link. Probably makes sense to match the title and help text styling to maintain consistency.

image

I'll add the expanded states for other settings as well in the same file shortly.

@streamer45
Copy link
Collaborator Author

@abhijit-singh Updated to match the new designs.

@abhijit-singh
Copy link

Thanks @streamer45. Could you share a screencap or put this on a test server maybe? I still am not able to see the settings in my local env even after deploying the plugin from this PR.

@streamer45
Copy link
Collaborator Author

streamer45 commented Aug 1, 2024

Thanks @streamer45. Could you share a screencap or put this on a test server maybe? I still am not able to see the settings in my local env even after deploying the plugin from this PR.

@abhijit-singh To test locally, you'll need to deploy the corresponding monorepo branch and rebuild the client.

Also, the video above has been updated.

Copy link

@abhijit-singh abhijit-singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @streamer45

@streamer45
Copy link
Collaborator Author

@DHaussermann QA here is the same for mattermost/mattermost#27535 . Mostly want to make sure audio device selection for calls works as expected from the new Calls user settings (see video on how to access them).

@streamer45 streamer45 removed 1: UX Review Requires review by ux 2: Dev Review Requires review by a core committer labels Aug 1, 2024
Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and passed

  • Ensured no issues with setting or saving new plugin preferences
  • Ensured when setting are saved or modified these are the starting settings that are applied when a call is stared
  • As a precaution, checked that changes to the settings are reflected in other webapp clients
  • Tested using new settings on browser and desktop app
  • Tested on mobile webview
  • No applicable changes to mobile for this

LGTM!

@DHaussermann DHaussermann removed the 2: QA Review Requires review by a QA tester label Aug 13, 2024
@DHaussermann DHaussermann added the 3: Reviews Complete All reviewers have approved the pull request label Aug 13, 2024
@streamer45 streamer45 merged commit abbf794 into main Aug 13, 2024
19 checks passed
@streamer45 streamer45 deleted the MM-51514 branch August 13, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants