Added static mockup of basic publish flow

refs https://github.com/TryGhost/Team/issues/1542

- adds `<EditorLabs::PublishManagement>` component that displays the relevant button for triggering publishing flows and will eventually store publish options for the editing session duration and manage the saving flow
  - displays a "Publish" button that triggers the publish flow modal
- adds `editor-labs/publish-flow` full-screen modal containing a static mockup of the desired sentence-structure publish options design
This commit is contained in:
Kevin Ansfield 2022-04-20 18:41:29 +01:00
parent f5fef46856
commit 8ca2c6935a
6 changed files with 79 additions and 7 deletions

View File

@ -0,0 +1,8 @@
<button
type="button"
class="gh-btn gh-btn-editor green gh-publishmenu-trigger"
{{on "click" this.openPublishFlow}}
data-test-button="publish-flow"
>
<span>Publish</span>
</button>

View File

@ -0,0 +1,20 @@
import Component from '@glimmer/component';
import PublishFlowModal from '../modals/editor-labs/publish-flow';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
export default class PublishFlow extends Component {
@service modals;
publishFlowModal = null;
willDestroy() {
super.willDestroy(...arguments);
this.publishFlowModal?.close();
}
@action
openPublishFlow() {
this.publishFlowModal = this.modals.open(PublishFlowModal);
}
}

View File

@ -0,0 +1,28 @@
<div class="flex flex-column h-100 items-center">
<header class="gh-editor-header" data-test-modal="publish">
<div class="ml3">
<button class="gh-editor-back-button" title="Close" type="button" {{on "click" @close}}>
<span>{{svg-jar "arrow-left"}} Back to edit</span>
</button>
</div>
<div class="flex-grow-1"></div>
</header>
<div class="flex flex-column flex-auto justify-center items-center w-50">
<div class="mb8 f1 fw6 midgrey">
Ready?
<strong class="darkgrey">Right now</strong>
this post will be
<strong class="darkgrey">published and sent</strong>
to
<strong class="darkgrey">all subscribers</strong>
of
<strong class="darkgrey">The Weekly Roundup</strong>.
</div>
<div class="flex flex-row w-100">
<button type="button" class="gh-btn gh-btn-black" {{on "click" (noop)}}><span>Continue</span></button>
<button type="button" class="gh-btn gh-btn-link" {{on "click" @close}}><span>Cancel</span></button>
</div>
</div>
</div>

View File

@ -0,0 +1,8 @@
import Component from '@glimmer/component';
export default class PublishModalComponent extends Component {
static modalOptions = {
className: 'fullscreen-modal-total-overlay',
omitBackdrop: true
};
}

View File

@ -78,6 +78,10 @@
background: var(--white)
}
.fullscreen-modal-total-overlay .modal-content {
height: 100%;
}
.fullscreen-modal-action {
margin: 6vw 0;
}

View File

@ -43,14 +43,18 @@
@task={{this.save}}
@runningText="Saving"
@class="gh-btn gh-btn-icon gh-btn-editor contributor-save-button"
data-test-contributor-save=true />
data-test-contributor-save />
{{else}}
<GhPublishmenu
@post={{this.post}}
@postStatus={{this.post.status}}
@saveTask={{this.saveTask}}
@setSaveType={{action "setSaveType"}}
@onOpen={{action "cancelAutosave"}} />
{{#if (feature "publishingFlow")}}
<EditorLabs::PublishManagement @post={{this.post}} />
{{else}}
<GhPublishmenu
@post={{this.post}}
@postStatus={{this.post.status}}
@saveTask={{this.saveTask}}
@setSaveType={{action "setSaveType"}}
@onOpen={{action "cancelAutosave"}} />
{{/if}}
{{/if}}
{{#unless this.showSettingsMenu}}