Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Refactor RoomHeader, and fix topic updates #252

Merged
merged 4 commits into from
Mar 29, 2016
Merged

Refactor RoomHeader, and fix topic updates #252

merged 4 commits into from
Mar 29, 2016

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 29, 2016

This is in aid of fixing element-hq/element-web#1299,
which is actually trivial once you can see what's going on.

Suggest looking at the individual commits to review:

richvdh added 3 commits March 29, 2016 12:51
Start cleaning up RoomHeader by factoring out a separate SimpleRoomHeader.
Force an update so that we see the latest state.

Fixes element-hq/element-web#1299
richvdh added a commit to element-hq/element-web that referenced this pull request Mar 29, 2016
SimpleRoomHeader and RoomHeader are now separate things
(matrix-org/matrix-react-sdk#252), so update Vector
accordingly.

var domain = MatrixClientPeg.get().getDomain();

return (
<div className="mx_CreateRoom">
<RoomHeader simpleHeader="Create room" />
<SimpleRoomHeader>
Create room
Copy link
Member

Choose a reason for hiding this comment

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

Hm, I'm quite unconvinced by passing in the title as the contents of the tag. I'd expect simple room headers to have structure for (optional) avatar and title at the least - at which point i'd expect to be passing them in as properties. Is there a rationale i'm missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Only that it looked like the right thing to do given the structure of SimpleRoomHeader. I agree it doesn't lead to a nice api. I'll change it.

@ara4n
Copy link
Member

ara4n commented Mar 29, 2016

lgtm other than minor query over SimpleRoomHeader's API - assuming that you've checked that the editing still works; the EditableText impl (via contentEditable) has been a bit fragile, but should be okay now, in terms of correctly keeping the editable text contents in sync with the state of the parent components. But if you haven't reintroduced the bug where the EditableTexts forget their state whenever you re-render() their parent, lgtm

@ara4n ara4n assigned richvdh and unassigned ara4n Mar 29, 2016
@richvdh
Copy link
Member Author

richvdh commented Mar 29, 2016

It seems to work...

@richvdh richvdh merged commit 49e75b7 into develop Mar 29, 2016
@richvdh richvdh deleted the rav/RoomHeader branch March 29, 2016 22:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants