gutenberg-mobile icon indicating copy to clipboard operation
gutenberg-mobile copied to clipboard

Show a notice when user taps to add a disabled block option

Open dnalves opened this issue 4 years ago • 6 comments

  • 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

  1. Add a "More" block to the Post
  2. Tap the "+" button to add a block
  3. See that the "More" button is greyed out
  4. 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.

dnalves avatar Sep 22 '21 08:09 dnalves

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.

fluiddot avatar Oct 15 '21 14:10 fluiddot

@dnalves following this comment wordpress-mobile/WordPress-iOS#17293 (comment), 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.

Thank you so much @fluiddot ! You helped me immensely today! ☺️ I just pushed the change with the bundle, your instructions were on point! :D

dnalves avatar Oct 15 '21 15:10 dnalves

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!

dcalhoun avatar Oct 27 '21 19:10 dcalhoun

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!

fluiddot avatar Nov 10 '21 17:11 fluiddot

👋 @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!

SiobhyB avatar Nov 24 '21 09:11 SiobhyB