Skip to content

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Aug 20, 2025

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 the host_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

  • Public API changes documented in changelogs (optional)

Signed-off-by:

Copy link

codspeed-hq bot commented Aug 20, 2025

CodSpeed Performance Report

Merging #5560 will not alter performance

Comparing toger5/intent-system-call-url (f007b20) with main (33c11d0)

Summary

✅ 49 untouched benchmarks

@toger5 toger5 force-pushed the toger5/intent-system-call-url branch 3 times, most recently from e1c1764 to ef6890a Compare August 20, 2025 13:52
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 98.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.95%. Comparing base (b585963) to head (f007b20).
⚠️ Report is 198 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...tes/matrix-sdk/src/widget/settings/element_call.rs 98.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Hywan Hywan left a 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.

toger5 added 2 commits August 27, 2025 10:08
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>
@toger5 toger5 force-pushed the toger5/intent-system-call-url branch from 2f5911f to f007b20 Compare August 27, 2025 08:16
@fkwp fkwp requested a review from Hywan September 1, 2025 14:08
Copy link
Member

@Hywan Hywan left a 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>,
Copy link
Member

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>,
Copy link
Member

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>,
Copy link
Member

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>,
Copy link
Member

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>,
Copy link
Member

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>,
Copy link
Member

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>,
Copy link
Member

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?

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