gutenberg-mobile
gutenberg-mobile copied to clipboard
Show a notice when user taps to add a disabled block option
- Gutenberg PR: https://github.com/WordPress/gutenberg/pull/35021
- WPAndroid PR: https://github.com/wordpress-mobile/WordPress-Android/pull/15435
- WPiOS PR: https://github.com/wordpress-mobile/WordPress-iOS/pull/17293
Fixes #3055
Description
Whenever a block doesn't support multiple instances and is already added to the post, its icon is greyed out and it can't be added. With this commit, when the user taps on it, it shows a Notice with the information on why that block can't be added.
To test
- Add a "More" block to the Post
- Tap the "+" button to add a block
- See that the "More" button is greyed out
- Tap on the "More" button and see that a Notice is displayed on top
PR submission checklist:
- [x] I have considered adding unit tests where possible.
- [x] I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!
@dnalves following this comment https://github.com/wordpress-mobile/WordPress-iOS/pull/17293#issuecomment-944334508, I'd recommend running the command npm run bundle to generate the JS bundle which is required when we introduce changes in the main apps, specifically in WPiOS.
Heads up that you'll probably notice modifications in the strings localization files (bundle/android/strings.xml and bundle/ios/GutenbergNativeTranslations.swift), due to a known issue, the bundle generation command is removing some strings that are required, so we need to verify the actual string modifications and only commit the required changes in those files. In case it helps, you can see in this commit how I solved it when I generated the JS bundle for testing these changes.
@dnalves following this comment wordpress-mobile/WordPress-iOS#17293 (comment), I'd recommend running the command
npm run bundleto generate the JS bundle which is required when we introduce changes in the main apps, specifically in WPiOS.Heads up that you'll probably notice modifications in the strings localization files (
bundle/android/strings.xmlandbundle/ios/GutenbergNativeTranslations.swift), due to a known issue, the bundle generation command is removing some strings that are required, so we need to verify the actual string modifications and only commit the required changes in those files. In case it helps, you can see in this commit how I solved it when I generated the JS bundle for testing these changes.
Thank you so much @fluiddot ! You helped me immensely today! ☺️ I just pushed the change with the bundle, your instructions were on point! :D
Hey @jd-alexander and @dnalves. We will cut the 1.65.0 release on 28 Oct. I plan to circle back and bump this PR to the next milestone then, but please let me know if you’d rather us work to include this PR in 1.65.0. Thanks!
Hey @jd-alexander and @dnalves ! We will cut the 1.66.0 release on 2021-11-11. I plan to circle back and bump this PR to the next milestone then, but please let me know if you’d rather us work to include this PR in 1.66.0. Thanks!
👋 @dnalves, we plan to cut the 1.67.0 release around 10:00 UTC tomorrow, on Thursday 25th November. I plan to circle back and bump this PR to the next milestone then, but please let me know if you'd rather us work to include this PR in 1.67.0.
As a reminder, changes in the next (1.68.0) release won't be shipped to users until the 10th January.
Thanks!