-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add decline button to call notification toast (use new notification event) #30729
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: develop
Are you sure you want to change the base?
Conversation
…vent) - This make EW incompatible with the old style notify events. Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
dd09d3d
to
38ef88e
Compare
Signed-off-by: Timo K <[email protected]>
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.
Looks like there are quite a lot of visual changes here - any chance of a screenshot or two?
Also, you have some failing lint jobs.
you are right screenshots would be great. (I even prepared some yesterday...) |
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
7e8c5db
to
5824840
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.
@florianduros |
@toger5 The shared components are not in compound but in |
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
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.
Looking pretty good, mostly some FYIs from me and a couple of missing tests?
}); | ||
|
||
it("should not show toast when calling with non-group call event", () => { |
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.
Hard to tell with this diff, but are we still testing "should not show toast when calling with non-group call event"?
expect(ToastStore.sharedInstance().addOrReplaceToast).not.toHaveBeenCalled(); | ||
spyCallMemberships.mockRestore(); | ||
}); | ||
|
||
it("dismisses call notification when another device answers the call", () => { |
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.
Do we still have a test for "dismisses call notification when another device answers the call"?
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.
Yes all the tests are still there (I hope) but you are right this diff makes it hard to see.
To double check i will try to look for the exact tests myself as a little exercise:
- this:
should not show toast when calling with non-group call event
-> has become thisshould not show toast when calling with a different event type to org.matrix.msc4075.rtc.notification
- this:
dismisses call notification when another device answers the call
-> is now part of the toast itself (dismissing is done in the toast)Dismiss toast if user joins with a remote device
@@ -132,7 +210,10 @@ export function IncomingCallToast({ notifyEvent }: Props): JSX.Element { | |||
), | |||
); | |||
|
|||
const [skipLobbyToggle, setSkipLobbyToggle] = useState(true); |
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.
N.B. For the sake of a few lines this could be extended with a Setting that stores the last value. Not going to block and can be followup PR.
src/toasts/IncomingCallToast.tsx
Outdated
@@ -31,8 +35,22 @@ import { type Call, CallEvent } from "../models/Call"; | |||
import LegacyCallHandler, { AudioID } from "../LegacyCallHandler"; | |||
import { useEventEmitter } from "../hooks/useEventEmitter"; | |||
import { CallStore, CallStoreEvent } from "../stores/CallStore"; | |||
import LabelledToggleSwitch from "../components/views/elements/LabelledToggleSwitch"; |
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.
Prefer https://compound.element.io/?path=/docs/compound-web_form-controls-toggle--docs if you can, to reduce our footprint on legacy components :)
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.
The labelled one is very convinient... but should be possible to do with the cmpound one as well.
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Timo K <[email protected]>
src/shared-components/avatar/AvatarWithDetails/AvatarWithDetails.module.css
Outdated
Show resolved
Hide resolved
src/shared-components/avatar/AvatarWithDetails/AvatarWithDetails.module.css
Outdated
Show resolved
Hide resolved
src/shared-components/avatar/AvatarWithDetails/AvatarWithDetails.module.css
Outdated
Show resolved
Hide resolved
src/shared-components/avatar/AvatarWithDetails/AvatarWithDetails.module.css
Outdated
Show resolved
Hide resolved
src/shared-components/avatar/AvatarWithDetails/AvatarWithDetails.module.css
Outdated
Show resolved
Hide resolved
Signed-off-by: Timo K <[email protected]>
ae608d5
to
77a4c1e
Compare
Fixes: #30727
This PR adds a couple of new conditions to the IncomingCallToast so that it gets dismissed in the right cases and provides an option to send decline events by pressing a decline button.
Additionally it now is possible to jumpt to the lobby by pressing the toast and joining and skipping the lobby by pressing the join button.
Signed-off-by: Timo K [email protected]
Checklist
public
/exported
symbols have accurate TSDoc documentation.