-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
@-mention Activity for Gutenberg #11693
Conversation
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APK here. |
ecef710
to
dc61f32
Compare
dc61f32
to
85f416b
Compare
Hi there! P.S: I am still working on the messaging for these bumps, so please let me know if you have any questions/concerns/feedback. |
Updated style no longer requires fitsSystemWindow, which allows the code to be simplified.
3baf0d4
to
cb035c5
Compare
fcf39fc
to
077881e
Compare
Avoids an issue where the empty view appears when it shouldn't at times. For example if you press the background when there is a single suggestion and don't lift your finger, the suggestion disappears, but the activity doesn't close until you left your finger, so the empty view becomes visible as long as you hold your finger down.
077881e
to
4abaf71
Compare
Hi there! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the main cases from the description and they look good.
A super minor issue is that if you rotate while the @ menu is open, and then select an option, I do not see it get added. If you then try a second time it works. Since it doesn't cause any bad state, I don't see it as a blocker, maybe something to look at in future improvements.
I saw you have a PR up for enabling a space after the @ mention. I'll take a look at that next. Nice job on this, especially the nice Java 8 method reference refactor 🎉 .
(edit - minor issue that I think is not a blocker, video on gutenberg PR WordPress/gutenberg#21651 (review))
mEditorFragmentListener::onAuthHeaderRequested, | ||
mEditorFragmentListener::onPerformFetch, | ||
mEditorImagePreviewListener::onImagePreviewRequested, | ||
mEditorEditMediaListener::onMediaEditorRequested, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love how concise this is with Java 8 double colon method reference 👍
RELEASE-NOTES.txt
Outdated
@@ -16,6 +16,8 @@ | |||
* Added user Gravatar to the Me menu in My Site. | |||
* Updated site details screen title to "My site", to avoid duplicating the title of the current site which is displayed in the screen's header area. | |||
|
|||
* @-mention suggestions are now presented immediately after typing "@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change from "typing" to "entering" or "pressing" "@" since the ability to type "@" on the keyboard is a design request that is not yet implemented. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I think you're right! I actually need to remove this entirely for now though because we're going to keep this under a dev flag for the time being.
.startsWith(lowerCaseConstraint) | ||
|| suggestion.getDisplayName().toLowerCase(Locale.getDefault()) | ||
.contains(" " + lowerCaseConstraint); | ||
if (suggestionMatchesConstraint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost suggested a unit test here, but then saw it was really just three intuitive cases, and I tested to make sure they all work fine. Looks good
# Conflicts: # libs/gutenberg-mobile
Related gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#2163
Adds @-mention support in the Gutenberg editor. Also updates the @-mention support throughout WPAndroid to show the popup immediately after the @-symbol is shown instead of waiting until an "@" plus a single letter is shown. This change brings Android in line with the behavior on iOS.
Slow Initial Loading of Suggestions
The first time the suggestions are loaded for a site (which is done the first time a
SuggestionAutocompleteTextView
is displayed, the suggestions are very slow to load. In my testing, it would take 20-30 seconds before the suggestions would be available to the user.One cause of this is the slowness of the API call for sites with many users. In my tests the api call for a site with 1500+ users took 3 to 6 seconds. A site with only a single user returned in well under a second.
The larger problem, however, is that inserting those suggestions into the database is taking >15 seconds. I have a separate PR to address that delay, but that fix is not included in this PR, so expect a significant delay the first time the suggestions are loaded for a particular site.
Testing
Gutenberg
Inserting mentions:
Does not insert with keyboard done button if there is anything but a single suggestion
WPAndroid
PR submission checklist:
RELEASE-NOTES.txt
if necessary.