Commit Graph

3 Commits

Author SHA1 Message Date
Joshua T Flowers 7aeb0a19d2 Migrate header items to slot fills (https://github.com/woocommerce/woocommerce-admin/pull/7805)
* Add SlotFill area to header

* Add activity panel fill

* Move activity panel to root client folder

* Move activity panel registration to its own folder

* Add navigation fill

* Add page title slotfill

* Slot fill the back button

* Move mobile banner to slot fill

* Fix navigation fill on embed pages

* Add changelog entry

* Allow order prop to header item fill

* Split header into before and after

* Fix header title gaps

* Fix nav and mobile app banner placement

* Fix display options import

* Only use last item for page header title fill

* Use function to pass fill props instead of bind

* Rename header slots

* Fix mobile banner dismissal check

* Fix up inbox panel rename

* Update task title in tests

* Fix up task status retrieval
2021-12-14 11:56:42 -05:00
Jeff Stieler 7ca9e691d4 Migrate Enzyme tests to React Testing Library (https://github.com/woocommerce/woocommerce-admin/pull/5299)
* Migrate leaderboard tests to RTL.

* Remove test of default prop value.

* Migrate ReportSummary tests to RTL.

* Migrate ActivityCard tests to RTL.

* Migrate ActivityCardPlaceholder tests to RTL.

* Migrate remaining ProductType tests to RTL.

* Migrate Card tests to RTL.

* Update RTL and user event packages.

* Migrate Date tests to RTL.

* Migrate D3Legend tests to RTL.

* Migrate D3Base tests to RTL.

* Migrate Gravatar tests to RTL.

* Migrate ImageUpload tests to RTL.

* Migrate ProductImage tests to RTL.

* Migrate Rating tests to RTL.

* Migrate Search tests to RTL.

* Migrate Plugins tests to RTL.

* Migrate SelectControl tests to RTL.

* Migrate Timeline tests to RTL.

Remove tests that inspect DOM since there are snapshots.

* Migrate DismissModal tests to RTL.

* Migrate SetupNotice tests to RTL.

* Migrate WelcomeCard tests to RTL.

* Fix setup error reason retrieval in ShippingBanner.

* Migrate ShippingBanner tests to RTL.

* Migrate RecommendedExtensions tests to RTL.

* Migrate KnowledgeBase tests to RTL.

* Rename enzyme setup file, modify to setup RTL.

* No need to import jest-dom in test files.

* Remove enzyme dependency.

* Use snapshot for testing Leaderboard markup.

* Switch from "not to be empty" to "be in the document".

* No need to waitFor() recordEvent mock.

* Be specific about clicking the "hide" button.

* Use toBeVisible() instead of checking style property.
2020-10-15 08:41:39 -04:00
Sam Seay c884f96bf9 Add WooCommerce Mobile App Banner Ad for Android and iOS (https://github.com/woocommerce/woocommerce-admin/pull/5037)
Fixes woocommerce/woocommerce-admin#4654 

The feature calls for a mobile app ad banner to be displayed to users on mobile devices.

Based on the discussion in woocommerce/woocommerce-admin#4654 this implements the following:

1. [an iOS Smart App Banner](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html). This banner is a meta tag that is generated in PHP. It will only display on iOS devices. One note about this: **This tag is not directly trackable like the implemented Android banner. If we would like to track its success then I believe [these instructions are relevant](https://stackoverflow.com/questions/12906502/is-it-possible-to-track-click-throughs-from-iphone-smart-banner/20422334woocommerce/woocommerce-admin#20422334)**. 

2. A mobile app banner ad that **only displays on Android** and only displays at the `738px` breakpoint specified in the issue. To only display this banner ad on Android, we use basic checking of the user agent string. I weighed this up against other approaches and for this kind of niche use case a simple UA string check is (imho) still the best way to do this.

3. The banner ad makes use of user preferences to retain a per user setting that determines if that user has dismissed the Android banner. We don't/can't do anything like this for the iOS Smart App Banner (but in theory we shouldn't need to).
2020-08-27 13:46:53 +12:00