0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Removed remaining uses of tour item components

no issue

- tour items in general are being removed
- preparation for full removal of all tour-related code (to be done in following commit to allow future revert without merge errors through template divergence)
This commit is contained in:
Kevin Ansfield 2021-03-02 14:19:52 +00:00
parent d8e5764d17
commit 10b48b1d6d
4 changed files with 2 additions and 57 deletions

View file

@ -122,10 +122,3 @@
<GhNavMenu::Footer /> <GhNavMenu::Footer />
</section> </section>
<GhTourItem @throbberId="getting-started"
@target=".gh-nav-main"
@throbberAttachment="middle right"
@popoverTriangleClass="left-top"
@throbberOffset="0px 0px"
/>

View file

@ -5,11 +5,7 @@ import formatMarkdown from 'ghost-admin/utils/format-markdown';
import moment from 'moment'; import moment from 'moment';
import {alias, or} from '@ember/object/computed'; import {alias, or} from '@ember/object/computed';
import {computed} from '@ember/object'; import {computed} from '@ember/object';
import {run} from '@ember/runloop';
import {inject as service} from '@ember/service'; import {inject as service} from '@ember/service';
import {task, timeout} from 'ember-concurrency';
const PSM_ANIMATION_LENGTH = 400;
export default Component.extend(SettingsMenuMixin, { export default Component.extend(SettingsMenuMixin, {
feature: service(), feature: service(),
@ -26,7 +22,6 @@ export default Component.extend(SettingsMenuMixin, {
post: null, post: null,
_showSettingsMenu: false, _showSettingsMenu: false,
_showThrobbers: false,
canonicalUrlScratch: alias('post.canonicalUrlScratch'), canonicalUrlScratch: alias('post.canonicalUrlScratch'),
customExcerptScratch: alias('post.customExcerptScratch'), customExcerptScratch: alias('post.customExcerptScratch'),
@ -102,14 +97,6 @@ export default Component.extend(SettingsMenuMixin, {
didReceiveAttrs() { didReceiveAttrs() {
this._super(...arguments); this._super(...arguments);
// HACK: ugly method of working around the CSS animations so that we
// can add throbbers only when the animation has finished
// TODO: use liquid-fire to handle PSM slide-in and replace tabs manager
// with something more ember-like
if (this.showSettingsMenu && !this._showSettingsMenu) {
this.showThrobbers.perform();
}
// fired when menu is closed // fired when menu is closed
if (!this.showSettingsMenu && this._showSettingsMenu) { if (!this.showSettingsMenu && this._showSettingsMenu) {
let post = this.post; let post = this.post;
@ -120,9 +107,6 @@ export default Component.extend(SettingsMenuMixin, {
post.set('publishedAtBlogTZ', post.get('publishedAtUTC')); post.set('publishedAtBlogTZ', post.get('publishedAtUTC'));
post.validate({attribute: 'publishedAtBlog'}); post.validate({attribute: 'publishedAtBlog'});
} }
// remove throbbers
this.set('_showThrobbers', false);
} }
this._showSettingsMenu = this.showSettingsMenu; this._showSettingsMenu = this.showSettingsMenu;
@ -131,22 +115,12 @@ export default Component.extend(SettingsMenuMixin, {
actions: { actions: {
showSubview(subview) { showSubview(subview) {
this._super(...arguments); this._super(...arguments);
this.set('subview', subview); this.set('subview', subview);
// Chrome appears to have an animation bug that cancels the slide
// transition unless there's a delay between the animation starting
// and the throbbers being removed
run.later(this, function () {
this.set('_showThrobbers', false);
}, 50);
}, },
closeSubview() { closeSubview() {
this._super(...arguments); this._super(...arguments);
this.set('subview', null); this.set('subview', null);
this.showThrobbers.perform();
}, },
discardEnter() { discardEnter() {
@ -514,11 +488,6 @@ export default Component.extend(SettingsMenuMixin, {
} }
}, },
showThrobbers: task(function* () {
yield timeout(PSM_ANIMATION_LENGTH);
this.set('_showThrobbers', true);
}).restartable(),
showError(error) { showError(error) {
// TODO: remove null check once ValidationEngine has been removed // TODO: remove null check once ValidationEngine has been removed
if (error) { if (error) {

View file

@ -3,17 +3,6 @@ import {inject as service} from '@ember/service';
export default class LaunchRoute extends AuthenticatedRoute { export default class LaunchRoute extends AuthenticatedRoute {
@service session; @service session;
@service ui;
activate() {
// disable before rendering template to avoid issues with liquid-wormhole
// attempting to destroy elements mid-render if disabled via component hooks
this.ui.set('showTour', false);
}
deactivate() {
this.ui.set('showTour', true);
}
beforeModel() { beforeModel() {
super.beforeModel(...arguments); super.beforeModel(...arguments);

View file

@ -103,9 +103,3 @@
</section> </section>
{{outlet}} {{outlet}}
<GhTourItem @throbberId="upload-a-theme"
@target="#upload-theme"
@throbberAttachment="top middle"
@popoverTriangleClass="bottom"
/>