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

typescript src/room #437

Merged
merged 36 commits into from
Aug 1, 2022
Merged

typescript src/room #437

merged 36 commits into from
Aug 1, 2022

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Jul 4, 2022

For reviewers:

Copy link
Contributor Author

@toger5 toger5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments on things that I am not too confident:

src/@types/global.d.ts Show resolved Hide resolved
src/room/GroupCallInspector.tsx Outdated Show resolved Hide resolved
src/room/GroupCallInspector.tsx Outdated Show resolved Hide resolved

useEffect(() => {
setState({ json: state });
setState(state);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was it done with the {json: ...} before? Should the useState be changed to:
useState({json: {}} as {json: State});

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure - would have to ask @robertlong, although I'd probably just remove the json

@toger5 toger5 changed the title ts_conversion for src/room typescript src/room Jul 4, 2022
@toger5 toger5 marked this pull request as ready for review July 7, 2022 21:36
@toger5 toger5 requested a review from a team as a code owner July 7, 2022 21:36
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good on a first pass! On adding deps, just yarn add & commit package.json & yarn.lock as normal.

src/room/CallEndedView.tsx Outdated Show resolved Hide resolved
src/room/GroupCallInspector.tsx Outdated Show resolved Hide resolved
src/room/GroupCallInspector.tsx Outdated Show resolved Hide resolved
src/room/GroupCallInspector.tsx Show resolved Hide resolved

useEffect(() => {
setState({ json: state });
setState(state);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure - would have to ask @robertlong, although I'd probably just remove the json

src/room/LobbyView.tsx Outdated Show resolved Hide resolved
@toger5 toger5 requested a review from dbkr July 14, 2022 19:54
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels very nearly there - this will be most of the app done once its merged!

src/room/FeedbackModal.tsx Show resolved Hide resolved
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [context, _] = useState<
[State, React.Dispatch<React.SetStateAction<State>>]
>([{}, () => {}]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you work out what was going on here? How does the context get set, and what's the weird value provided to the initialiser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment where the context gets set. I also fixed the initial value.

src/room/RoomAuthView.tsx Outdated Show resolved Hide resolved
@toger5 toger5 requested a review from dbkr July 27, 2022 21:47
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for adding the comment.

@toger5 toger5 merged commit 2d99aca into element-hq:main Aug 1, 2022
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