These TODO comments are expected to be fixed ASAP, but until that happens let's minimize the errors in the console for development.
For https://github.com/vector-im/riot-web/issues/12877
These all aren't using componentDidMount because they do something which causes application instability if componentDidMount were used. Much of these calls are expected to move into constructors once they are converted to real classes.
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
This reverts a fix to EditableText introduced in
https://github.com/matrix-org/matrix-react-sdk/pull/1445
which introduced a bug that causes room name and topic to
reset when UserSettings is rerendered because
`initialValue != this.value`
This also fixes the same bug originally fixed by #1445:
>fix entering the same thing twice (which had the bug of not
>emptying the "new" field)
which, in other words meant that clicking "+" when adding a room
alias would not reset the contents of the bottom-most alias in the
list.
The fix is to increment the `key` of the element, causing a new
instance to be mounted instead of passing new props to the existing
one.
- fix entering the same thing twice (which had the bug of not emptying the "new" field)
- fix editing items in the list (which would stack overflow because of typo)
- Make onBlur reset the EditText to show that it hasn't submitted it.
- Add the user ID of the logged in user to Advanced.
- Remove remnants of the Save/Cancel buttons.