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

Better feedback in invite dialog #625

Merged
merged 9 commits into from
Jan 25, 2017
Merged

Better feedback in invite dialog #625

merged 9 commits into from
Jan 25, 2017

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jan 18, 2017

Show feedback if you enter a valid but unknown email address
or mxid

Also removes the network indicator, which in practice was always an 'R' since there was only one network.

Fixes element-hq/element-web#2933
Fixes element-hq/element-web#2934

Show feedback if you enter a valid but unknown email address
or mxid

Fixes element-hq/element-web#2933
@dbkr dbkr assigned richvdh and unassigned richvdh Jan 18, 2017
@dbkr
Copy link
Member Author

dbkr commented Jan 18, 2017

Actually, hold off on reviewing, I want to change the props of AddressSelector again

@dbkr dbkr self-assigned this Jan 18, 2017
Rather than just passing in a list of strings. This paves the way
for passing in display names & avatars of looked-up threepids.
@dbkr dbkr assigned richvdh and unassigned dbkr Jan 24, 2017
@dbkr
Copy link
Member Author

dbkr commented Jan 24, 2017

OK, ready now

@dbkr dbkr requested a review from richvdh January 24, 2017 18:57
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

looks nice, modulo a couple of questions

queryList = this._userList.filter((user) => {
return this._matches(query, user);
}).map((user) => {
return {
Copy link
Member

Choose a reason for hiding this comment

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

it'd be helpful to record the structure of the objects in queryList and inviteList somewhere (in getInitialState?)

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see you already have that in InviteAddressType. Could you point to it somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

address: addressText,
isKnown: false,
};
if (addrType == null) {
Copy link
Member

Choose a reason for hiding this comment

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

should we be bailing out here?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, done

var React = require("react");
var sdk = require("../../../index");
var classNames = require('classnames');
const React = require("react");
Copy link
Member

Choose a reason for hiding this comment

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

if you're going to rewrite these (which I applaud), can you switch to import instead of require?

const React = require("react");
const sdk = require("../../../index");
const classNames = require('classnames');
const InviteAddressType = require("./AddressTile");
Copy link
Member

Choose a reason for hiding this comment

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

this looks dodge - the default export of AddressTile is the react component, not InviteAddressType.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@richvdh richvdh assigned dbkr and unassigned richvdh Jan 24, 2017
@dbkr dbkr assigned richvdh and unassigned dbkr Jan 25, 2017
@dbkr
Copy link
Member Author

dbkr commented Jan 25, 2017

ok, ptal

@richvdh
Copy link
Member

richvdh commented Jan 25, 2017

hrm, sorry, could we specify the structure of the objects in queryList and inviteList in getInitialState? Otherwise it's hard to trace through.

LGTM otherwise

@richvdh richvdh assigned dbkr and unassigned richvdh Jan 25, 2017
@dbkr dbkr merged commit a3b9384 into develop Jan 25, 2017
@richvdh richvdh deleted the dbkr/user_search_feedback branch February 15, 2017 13:16
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