mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Cleaned up improvedOnboarding
labs flag
no issue - the feature has been GA for a while now so the conditionals are no longer required
This commit is contained in:
parent
07fde0ee48
commit
ea98469e6e
@ -33,11 +33,9 @@
|
||||
<button id="publication-cover" type="button" class="gh-btn gh-btn-white" {{on "click" uploader.triggerFileDialog}} data-test-image-upload-btn="coverImage">
|
||||
<span>Upload cover</span>
|
||||
</button>
|
||||
{{#if (feature "improvedOnboarding")}}
|
||||
<button type="button" class="gh-btn gh-btn-white w10" {{on "click" this.toggleUnsplashSelector}} aria-label="Select photo from Unsplash">
|
||||
<span>{{svg-jar "unsplash" class="nudge-right--2 nudge-bottom--2"}}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button type="button" class="gh-btn gh-btn-white w10" {{on "click" this.toggleUnsplashSelector}} aria-label="Select photo from Unsplash">
|
||||
<span>{{svg-jar "unsplash" class="nudge-right--2 nudge-bottom--2"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="dn">
|
||||
|
@ -31,9 +31,7 @@ export default class PublicationCoverFormField extends Component {
|
||||
|
||||
@action
|
||||
toggleUnsplashSelector() {
|
||||
if (this.feature.improvedOnboarding) {
|
||||
this.showUnsplashSelector = !this.showUnsplashSelector;
|
||||
}
|
||||
this.showUnsplashSelector = !this.showUnsplashSelector;
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -4,15 +4,16 @@ import {inject as service} from '@ember/service';
|
||||
export default class HomeRoute extends Route {
|
||||
@service feature;
|
||||
@service modals;
|
||||
@service router;
|
||||
|
||||
beforeModel(transition) {
|
||||
super.beforeModel(...arguments);
|
||||
|
||||
if (this.feature.improvedOnboarding && transition.to?.queryParams?.firstStart === 'true') {
|
||||
return this.transitionTo('setup.done');
|
||||
if (transition.to?.queryParams?.firstStart === 'true') {
|
||||
return this.router.transitionTo('setup.done');
|
||||
}
|
||||
|
||||
this.transitionTo('dashboard');
|
||||
this.router.transitionTo('dashboard');
|
||||
}
|
||||
|
||||
resetController(controller) {
|
||||
|
@ -62,7 +62,6 @@ export default class FeatureService extends Service {
|
||||
@feature('multipleNewsletters') multipleNewsletters;
|
||||
@feature('multipleNewslettersUI') multipleNewslettersUI;
|
||||
@feature('tweetGridCard') tweetGridCard;
|
||||
@feature('improvedOnboarding') improvedOnboarding;
|
||||
@feature('membersTableStatus') membersTableStatus;
|
||||
@feature('selectablePortalLinks') selectablePortalLinks;
|
||||
|
||||
|
@ -239,19 +239,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Improved onboarding flow</h4>
|
||||
<p class="gh-expandable-description">
|
||||
Various tweaks to streamline the site creation and getting started flows.
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<GhFeatureFlag @flag="improvedOnboarding" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
|
@ -14,7 +14,6 @@ describe('Acceptance: Dashboard', function () {
|
||||
this.server.loadFixtures('configs');
|
||||
this.server.loadFixtures('settings');
|
||||
enableLabsFlag(this.server, 'membersActivity');
|
||||
enableLabsFlag(this.server, 'improvedOnboarding');
|
||||
|
||||
let role = this.server.create('role', {name: 'Administrator'});
|
||||
this.server.create('user', {roles: [role]});
|
||||
|
@ -2,7 +2,6 @@ import {Response} from 'miragejs';
|
||||
import {authenticateSession, invalidateSession} from 'ember-simple-auth/test-support';
|
||||
import {beforeEach, describe, it} from 'mocha';
|
||||
import {click, currentURL, fillIn, find, findAll} from '@ember/test-helpers';
|
||||
import {enableLabsFlag} from '../helpers/labs-flag';
|
||||
import {expect} from 'chai';
|
||||
import {setupApplicationTest} from 'ember-mocha';
|
||||
import {setupMirage} from 'ember-cli-mirage/test-support';
|
||||
@ -12,10 +11,6 @@ describe('Acceptance: Setup', function () {
|
||||
let hooks = setupApplicationTest();
|
||||
setupMirage(hooks);
|
||||
|
||||
beforeEach(function () {
|
||||
enableLabsFlag(this.server, 'improvedOnboarding');
|
||||
});
|
||||
|
||||
it('redirects if already authenticated', async function () {
|
||||
let role = this.server.create('role', {name: 'Author'});
|
||||
this.server.create('user', {roles: [role], slug: 'test-user'});
|
||||
|
Loading…
Reference in New Issue
Block a user