Closed raissanorth closed 6 years ago
Note that this is dependant on https://github.com/silverstripe/silverstripe-admin/pull/560
@robbieaverill make sure to bump the version dependency in the package.json as well
also, I'm not sure why tests are failing for react-apollo
also, I'm not sure why tests are failing for react-apollo
@flamerohr FYI this was because the admin module npm dependencies weren't installed. I reproduced this on the latest 1 branch for campaign-admin in Travis, we've pushed a fix for it which is stolen from asset-admin
Merge on green (except behat)
oh I see cringe lol
Allows users to toggle between edit, preview, and split mode in the CMS.
Introduces dependencies on
react-resize-aware
library andEnzyme
testing utility. The former is used to retrieve the screen width and determine if split mode should be enabled based on it. The latter is used to shallow renderCampaignAdminList
in the unit tests, as we don't want to test the child componentsViewModeToggle
andPreview
. These components are now provided via Injector.Removed media queries in favour of rendering preview and/or edit based on the state stored in
ViewModeToggle
's store.Refactored
CampaignAdminList
's render method, to make it more readable. Moved the logic to render the detail/edit view into its own method -renderCampaignAdminListDetail