-
Notifications
You must be signed in to change notification settings - Fork 65
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
[MM-42385] Set title to popout window #19
Conversation
webapp/src/index.tsx
Outdated
const otherID = getUserIdFromDM(channel.name, getCurrentUserId(store.getState())); | ||
const dmUser = getUser(store.getState(), otherID); | ||
if (!dmUser) { | ||
await getProfilesByIdsAction([otherID])(store.dispatch as any, store.getState); |
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.
Not a fan of using any
but I hit this issue before and my still fairly limited Typescript/React knowledge couldn't get to an easy solution.
Error was the following:
src/index.tsx:438:61 - error TS2345: Argument of type 'Dispatch<AnyAction>' is not assignable to parameter of type 'DispatchFunc'.
Types of parameters 'action' and 'action' are incompatible.
Type 'Action' is not assignable to type 'AnyAction'.
Property 'type' is missing in type 'ActionFunc' but required in type 'AnyAction'.
438 await getProfilesByIdsAction([otherID])(store.dispatch, store.getState);
~~~~~~~~~~~~~~
node_modules/redux/index.d.ts:19:3
19 type: T
~~~~
'type' is declared here.
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 you mind if I push a commit? It will add redux-thunk
to the dev dependencies and simplify this a bit?
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.
By all means 🙌
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 great!
Summary
PR sets a more descriptive title to the pop-out window to be more easily identifiable.
Title format is
Call - $channel_display_name
. In case of DM, the username of the other participant is used instead./cc @aaronrothschild
Ticket Link
https://mattermost.atlassian.net/browse/MM-42385