-
Notifications
You must be signed in to change notification settings - Fork 333
feat(element-call url params): split url params into configuration and properties #5560
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
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #5560 will not alter performanceComparing Summary
|
e1c1764
to
ef6890a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5560 +/- ##
==========================================
- Coverage 88.96% 88.95% -0.01%
==========================================
Files 335 335
Lines 93261 93257 -4
Branches 93261 93257 -4
==========================================
- Hits 82966 82956 -10
- Misses 6438 6443 +5
- Partials 3857 3858 +1 ☔ View full report in Codecov by Sentry. |
4d9cb43
to
2f5911f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patches.
Can you amend your patches to provide a description please? Your first patch's description is “d”, and the second is “fix tests”. I don't think “d” is enough information to help the reviewer to understand it.
Use two structs one for configuration and one for required properties instead of mixing them. Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
2f5911f
to
f007b20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. I am approving the changes. Can you answer my questions though :-)?
@@ -44,13 +44,13 @@ struct ElementCallParams { | |||
/// compatibility. Set to `true` if intent is `Intent::StartCall`. | |||
skip_lobby: Option<bool>, | |||
confine_to_room: bool, | |||
app_prompt: bool, | |||
app_prompt: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What Option<bool>
means here? Specifically, how Some(false)
is different from None
?
@@ -59,7 +59,7 @@ struct ElementCallParams { | |||
font_scale: Option<f64>, | |||
font: Option<String>, | |||
#[serde(rename = "perParticipantE2EE")] | |||
per_participant_e2ee: bool, | |||
per_participant_e2ee: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
/// Deprecated since Element Call v0.13.0. Included for backwards | ||
/// compatibility. Use header: "standard"|"none" instead. | ||
hide_header: Option<bool>, | ||
preload: bool, | ||
preload: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
hide_screensharing: bool, | ||
controlled_media_devices: bool, | ||
/// Supported since Element Call v0.9.0. | ||
hide_screensharing: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above.
@@ -195,6 +191,53 @@ pub struct VirtualElementCallWidgetOptions { | |||
/// Default: `true` | |||
pub confine_to_room: Option<bool>, | |||
|
|||
/// Do not show the screenshare button. | |||
pub hide_screensharing: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above :-).
|
||
/// Make the audio devices be controlled by the os instead of the | ||
/// element-call webview. | ||
pub controlled_audio_devices: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess what ^^?
/// The font scale which will be used inside element call. | ||
/// | ||
/// Default: `1` | ||
pub font_scale: Option<f64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if it's 0? Is it allowed?
This PR is part of an onging effort to move responsiblity to the EC app and out of the EX apps.
4 intends (f.ex
join_existing
start_new_dm
... ) (as url paramters) are introduced in recent element call versions. Those intends behave like defaults. If an intend is set a set of url parameters are predefined.Not all params can be covered by the intend (for insteance the
widget_id
or thehost_url
).This PR splits the url parameters into configuration (things that can be configured by the intent) and properties (things that still need to be passed one by one)
The goal with this change is that EX only needs to configre the intent once and the EC codebase can update the behavior in those 4 specific scenarios in case new features come along (auto hangup when other participants leave, send call ring notification...)
Signed-off-by: Timo K toger5@hotmail.de
Signed-off-by: