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

VIDCS-3321: Implement participant list toggle button, chat button, report issue button on mobile #95

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

behei-vonage
Copy link
Contributor

@behei-vonage behei-vonage commented Feb 24, 2025

What is this PR doing?

This PR implements participant list toggle button, chat button, report issue button on mobile.

iPhone SE:

Screenshot 2025-02-25 at 12 40 06 PM

iPhone 14 Pro Max:

Screenshot 2025-02-25 at 12 40 20 PM

How should this be manually tested?

Checkout this branch.
Change your developer console to be a mobile device, or use a real mobile device.
Ensure that the following are showing up as you click on the "three dots" menu in the toolbar:

  • Change Layout
  • Emojis
  • Archiving
  • Report issue - if this one does not show up, ensure that you have .env file locally in frontend/ folder with VITE_ENABLE_REPORT_ISSUE set to true
  • Participant List
  • Chat

Note that all of these buttons are clickable and open what you'd expect them to. The functionality of what it is opening might not look great, that is going to be handled in subsequent PRs.

What are the relevant tickets?

A maintainer will add this ticket number.

Resolves VIDCS-3321

Checklist

[ ] Branch is based on develop (not main).
[ ] Resolves a Known Issue.
[ ] If yes, did you remove the item from the docs/KNOWN_ISSUES.md?
[ ] Resolves an item reported in Issues.
If yes, which issue? Issue Number?

@behei-vonage behei-vonage self-assigned this Feb 24, 2025
Comment on lines 84 to 85
width: isSmallViewport ? '42px' : '48px',
height: isSmallViewport ? '42px' : '48px',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: these were needed here and in other spots to make sure that these buttons are smaller in the tiny tab ™️ devices (such as iPhone SE). I could not use isSmallViewPort directly on ToolbarButton since we have components that are dependent on it such as the toolbar overflow menu opener and the hang up button which we want to remain the same even on the tiny tab ™️ devices.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a prop to the ToolbarButton? Maybe isSmallViewport or isOverflowButton so we can apply the changes inside the component instead of adding sx props for all of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great idea, added!

Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

Looks good so far! Just have a few comments/questions. Let me know what you think!

Comment on lines 84 to 85
width: isSmallViewport ? '42px' : '48px',
height: isSmallViewport ? '42px' : '48px',
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a prop to the ToolbarButton? Maybe isSmallViewport or isOverflowButton so we can apply the changes inside the component instead of adding sx props for all of these?

@behei-vonage behei-vonage requested a review from cpettet February 25, 2025 01:52
cpettet
cpettet previously approved these changes Feb 25, 2025
Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

LGTM Great job! :shipit:

Copy link
Collaborator

@maikthomas maikthomas left a comment

Choose a reason for hiding this comment

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

Not sure why exactly but the new buttons are not aligned with the existing buttons. Will need some tweaking 🙏
image

@behei-vonage
Copy link
Contributor Author

Not sure why exactly but the new buttons are not aligned with the existing buttons. Will need some tweaking 🙏 image

oh man, good eye, @maikthomas! I didn't notice this. I'll take a look 🙏

@@ -78,6 +80,10 @@ const ArchivingToggle = (): ReactElement => {
style={{ color: `${isRecording ? 'rgb(239 68 68)' : 'white'}` }}
/>
}
sx={{
marginTop: isSmallViewport ? '0px' : '4px',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: you'll notice that we set this here instead of ToolbarButton. the reason is that we want to lower only certain buttons to make sure that they align correctly with those that are displayed only on desktop

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know why these ones are affected only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are all the ones that in the dropdown kebab menu but ToolbarButton is used across other components so it's kinda the same reason as here: #95 (comment)

@cpettet
Copy link
Contributor

cpettet commented Feb 25, 2025

Not sure why exactly but the new buttons are not aligned with the existing buttons. Will need some tweaking 🙏

Looks like the sidebar buttons are all off, with a default style for top margin of 0px.

Screenshot 2025-02-25 at 3 34 49 PM

Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

Looks good so far! Just have a few comments/questions. Let me know what you think!

@behei-vonage
Copy link
Contributor Author

Not sure why exactly but the new buttons are not aligned with the existing buttons. Will need some tweaking 🙏

Looks like the sidebar buttons are all off, with a default style for top margin of 0px.

Screenshot 2025-02-25 at 3 34 49 PM

Let's address these alignments in a different PR. reason being is that audio/video dropdowns need to be refactored to use ToolbarButoon instead of its own IconButton 🙏

@behei-vonage behei-vonage requested a review from cpettet February 25, 2025 21:56
@cpettet
Copy link
Contributor

cpettet commented Feb 25, 2025

Let's address these alignments in a different PR. reason being is that audio/video dropdowns need to be refactored to use ToolbarButoon instead of its own IconButton 🙏

Works for me!

cpettet
cpettet previously approved these changes Feb 25, 2025
Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

LGTM Great job! :shipit:

@@ -78,6 +80,10 @@ const ArchivingToggle = (): ReactElement => {
style={{ color: `${isRecording ? 'rgb(239 68 68)' : 'white'}` }}
/>
}
sx={{
marginTop: isSmallViewport ? '0px' : '4px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know why these ones are affected only?

sx={{
marginTop: '0px',
marginRight: '0px',
}}
onClick={handleClick}
icon={<ChatIcon sx={{ color: isOpen ? blue.A100 : 'white' }} />}
isSmallViewPort={isSmallViewport}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we not just access the hook value inside the ToolbarButton?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed here: #95 (comment) 🙏

return (
<div className={`hidden ${displayOnDesktop()} px-3`}>
<div className="pr-3">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm this is different from before px-3, will this change anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this doesn't seem to impact anything on desktop:

image

this is with px-3 in comparison on desktop:

image

but on mobile, switching to pr-3 helps with the gaps:

image

this is with px-3 in comparison:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove the right margin for the chat button? I think it's interfering with the flex layout. There's more padding on the right side versus the left.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ChatButton did not have any right margin but I added a little bit on the layout toggle so that it aligns a bit better.

iPhone 14 Pro Max:

image image

Comment on lines 41 to 42
width: props.isSmallViewPort ? '42px' : '48px',
height: props.isSmallViewPort ? '42px' : '48px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we just use the hook here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so it is a little tricky because if we use the hook here it'll apply it to all of the toolbar buttons and we don't want that. The reason being the kebab menu and the hand up menus are ToolbarButton components while the other ones (audio and video dropdowns) are not:
image

this way it'll get only applied to certain buttons

@maikthomas
Copy link
Collaborator

Some conflicts to deal with too 🙏

Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

Looks good so far! Just have a few comments/questions. Let me know what you think!

@@ -43,12 +45,14 @@ const ParticipantListButton = ({
overlap="circular"
>
<ToolbarButton
data-testid="participant-list-toggle"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a toggle!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm starting to suspect you don't like toggles 😂

Copy link
Contributor

@cpettet cpettet Mar 3, 2025

Choose a reason for hiding this comment

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

It might be excessive, but I'm thinking about adding a lint rule for this 😂

@behei-vonage behei-vonage requested a review from cpettet March 3, 2025 16:59
Copy link
Contributor

@cpettet cpettet left a comment

Choose a reason for hiding this comment

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

LGTM Great job! :shipit:

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.

3 participants