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

Homemade join #106

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Homemade join #106

wants to merge 9 commits into from

Conversation

manuhabitela
Copy link
Collaborator

Purpose

Have a custom join screen, that doesn't use the livekit prefab, so that we can precisely render what we want and improve UX overall.

Proposal

This adds a HomemadeJoin component, that the Room component now uses instead of the (not deleted) Join component.

Notable things:

  • a new valtio store has been added to store user choices. It replaces the one integrated in livekit because now we can store more things if needed. Like the livekit user choices, it is persisted in localstorage,
  • one commit adds audio output selection, one thing that possible in the livekit prefab, and that can't be stored in the livekit persisted user choices mentioned just above. I'll let you decide if you want to include it now or not. Since the conference screen doesn't have the button yet, maybe it's misleading to have it only in the join screen.
  • this adds a few reusable components: toggle buttons, dropdown menus.

State of this pull request

@lebaudantoine :

  • the current join screen was not deleted because maybe we'll want to wait before showing the custom one, I'll let you decide and rename the new component accordingly when we actually switch,
  • I didn't test that much cross-browsers because I can't from where I am right now, so you might want to check at least on Safari if everything renders properly,
  • dropdowns don't have any default media devices selected when opening them for the first time, I didn't quite get how livekit was doing it in their demo by checking the code… we could improve that,
  • the mic/cam toggle buttons could be put in their own components rather easily when we need to, for now everything was made inline in the join component to prevent too much premature optimization
demojoin.mp4

we don't have any language selector dropdown button anymore, we select
language in the settings
ditch the "PopoverList" component that was basically a poor Menu. Now
dropdown buttons can be made with react aria Menu+MenuItems components
via the Menu+MenuList components.

The difference now is dropdown menus behave better with keyboard (they
use up/down arrows instead of tabs), like selects.

Popovers are there if we need to show any content in a big tooltip, not
for actionable list items.
new ToggleButton component that wraps react aria ToggleButton. This will
be used to toggle cam/mic on/off.
react aria has default strings for a few UI elements (like "select an
item" on an empty select), make sure it uses currently defined language.
this will be used for toggled on/off mic and camera buttons. We want
toggled-on buttons that don't look pressed as it looks a bit weird
(we'll change icons on pressed/unpressed state). And we want red buttons
for when the buttons are not pressed, so adding the "danger" variant
too.

the whole colorpalette stuff needs a bit of work to be clean but it'll
do for now
it seems panda-css didn't like my way of sharing css code. When sharing
bare objects matching panda-css interface, panda-css didn't understand
those were styles and didn't parse them. Now using actual recipes via
the `cva` helper, panda understands correctly those styles need to be
updated on change.

ps: cleaned a few panda imports that didn't use our "@" alias
this will help making sure dialog components are not called before being
actually opened. Wrap inside a <DialogContainer> some component that
uses hooks + renders a <Dialog>: this component will be rendered only
when the dialog is opened, and its hooks will be called only on that
moment too
- do not touch current Join screen as we might need it still for now
- add a new HomemadeJoin, that is meant to be renamed simply "Join" when
ready. It contains basically the same stuff as the livekit join but with
homemade react aria buttons and a different layout. This will allow us
to precisely customize how we want this screen later
- store user device selections and name in a valtio store, synced with
localstorage. This should end up in the same UX as before with livekit,
but now we can store more things (like audio output) in the same place
new button to select audio output and pass it to the conference.

this is in its own commit because we might not want to add this directly
in the code: we can choose output in the join screen but not in the
conference screen for now. this might be a bit misleading and better to
not have it entirely for now?
@lebaudantoine
Copy link
Collaborator

I've merged the first commits of your work in a dedicated PR #113

@lebaudantoine lebaudantoine mentioned this pull request Aug 19, 2024
@lebaudantoine
Copy link
Collaborator

Related to this PR (donno if we address it here), a user suggested, for the first connection, to populate the username field with the Agent Connect First and Last name (if available), to avoid typing your name.

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.

2 participants