-
-
Notifications
You must be signed in to change notification settings - Fork 669
Use more of the screen for @-mention typeahead suggestions #4871
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
Comments
This would be good. The one tricky thing here is that we don't want to have it run off the top of the screen, because then the top part of it can't be reached. We had that bug a long time ago, as #2997. We fixed that issue crudely, with a hard-coded max height, which is the behavior you see today. From discussion at #2919 (comment) , here's some details on what I think we'll need to do in order to solve this:
All of that still applies, except that <View style={[this.styles.autocompleteWrapper, { marginBottom: height }]}>
<TopicAutocomplete
isFocused={isTopicFocused}
narrow={narrow}
text={topic}
onAutocomplete={this.handleTopicAutocomplete}
/>
<AutocompleteView
isFocused={this.state.isMessageFocused}
selection={selection}
text={message}
onAutocomplete={this.handleMessageAutocomplete}
/>
</View> The reason it's tricky to do this as things stand is that at the place that currently lives in the React component tree, it's tucked inside the compose box and so its layout doesn't have access to things like the height of the message list. In order to give it the right layout, where it's tall when the message list is tall but short when it's short, it will need to be a sibling of That will require some refactoring, and some thinking about how to manage all the information that's in those props. As things stand, those all (except So, one way to pursue that standard React approach here might be that Or a variation on that: A possible alternative approach would be to use a React portal, which lets a component live at a different place in the layout tree than the place in the component tree that gives it its props. Here, I think that might look like: |
A related point also came up in a review the other day, at #4773 (comment) :
|
At present, the @-mention typeahead suggestions dialog is fairly small. We should make it larger, as it is already unlikely the user can get useful information from other parts of the screen.
The text was updated successfully, but these errors were encountered: