-
Notifications
You must be signed in to change notification settings - Fork 4.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
Closing the block inserter decrements block type impressions #33906
Merged
dcalhoun
merged 5 commits into
trunk
from
update/closing-inserter-decrements-block-type-impressions
Aug 6, 2021
Merged
Closing the block inserter decrements block type impressions #33906
dcalhoun
merged 5 commits into
trunk
from
update/closing-inserter-decrements-block-type-impressions
Aug 6, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to avoid new block badges from remaining too long, interacting with the block inserter multiple times will cause them to eventually disappear.
A higher value makes more sense now that closing the block inserter decrements the impression count by 1.
dcalhoun
added
[Feature] Inserter
The main way to insert blocks using the + button in the editing interface
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
labels
Aug 5, 2021
Size Change: 0 B Total Size: 1.07 MB ℹ️ View Unchanged
|
This particular function is a React Native bridge method, which executes a callback to send back the requested data.
Merged
2 tasks
mchowning
reviewed
Aug 5, 2021
mchowning
reviewed
Aug 5, 2021
mchowning
approved these changes
Aug 5, 2021
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.
Code looks good and this is working well in my testing. Left a couple of comments, but no blockers. Thanks David!
Iterating over the block type impressions is unnecessary when the block inserter is opening.
Interacting with the block inserter is a more frequent task, so it makes sense to use a larger default impression count.
dcalhoun
deleted the
update/closing-inserter-decrements-block-type-impressions
branch
August 6, 2021 18:24
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Inserter
The main way to insert blocks using the + button in the editing interface
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #33907. Closing the block inserter will decrement the block type impression counts. This results in blocks that are marked as "new" to slowly lose the designation as a user utilizes the block inserter over time.
How has this been tested?
Clone this branch.
Apply the below diff.
Patch Enabling New Badge
Start the server and build the Demo app to an emulator/device.
Open the block inserter, note the new "sparkles" badge on the Search, Embed, and Audio block buttons.
Insert one of the aforementioned blocks.
Open the block inserter, note the new "sparkles" badge should only be present on two of the aforementioned blocks not inserted.
Close the block inserter.
Repeat steps 6-7 9 more times.
ℹ️ Expected: the new "sparkles" badge is no longer present on any block buttons.
Screenshots
Types of changes
New feature
Checklist:
*.native.js
files for terms that need renaming or removal).