mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
🐛 Fixed dashboard appearing blank if members disabled before completing onboarding
closes https://linear.app/tryghost/issue/ONC-106 - moved onboarding display outside of the `isMembersEnabled` conditional block
This commit is contained in:
parent
be79f385f2
commit
643b80ad4c
2 changed files with 37 additions and 28 deletions
|
@ -85,38 +85,34 @@
|
||||||
{{#if this.isLoading }}
|
{{#if this.isLoading }}
|
||||||
<GhLoadingSpinner />
|
<GhLoadingSpinner />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if this.areMembersEnabled}}
|
{{#if this.onboarding.isChecklistShown}}
|
||||||
|
<Dashboard::OnboardingChecklist />
|
||||||
{{#if this.onboarding.isChecklistShown}}
|
{{/if}}
|
||||||
<Dashboard::OnboardingChecklist />
|
{{#if (and this.areMembersEnabled (not this.onboarding.isChecklistShown))}}
|
||||||
|
{{#if this.hasPaidTiers}}
|
||||||
|
<Dashboard::Charts::Overview />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<div class="gh-dashboard-group {{if this.isTotalMembersZero 'is-zero'}}" data-test-dashboard="attribution">
|
||||||
{{#unless this.onboarding.isChecklistShown}}
|
<Dashboard::Charts::AnchorAttribution />
|
||||||
{{#if this.hasPaidTiers}}
|
{{#if this.hasPaidTiers}}
|
||||||
<Dashboard::Charts::Overview />
|
<section class="gh-dashboard-section">
|
||||||
|
<article class="gh-dashboard-box gh-dashboard-minicharts-attribution">
|
||||||
|
<Dashboard::Charts::PaidBreakdown />
|
||||||
|
<Dashboard::Charts::PaidMix />
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#unless this.membersUtils.isMembersInviteOnly}}
|
||||||
|
<Dashboard::Charts::Attribution />
|
||||||
|
{{/unless}}
|
||||||
|
{{#if this.areNewslettersEnabled}}
|
||||||
|
<Dashboard::Charts::Engagement />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="gh-dashboard-group {{if this.isTotalMembersZero 'is-zero'}}" data-test-dashboard="attribution">
|
|
||||||
<Dashboard::Charts::AnchorAttribution />
|
|
||||||
{{#if this.hasPaidTiers}}
|
|
||||||
<section class="gh-dashboard-section">
|
|
||||||
<article class="gh-dashboard-box gh-dashboard-minicharts-attribution">
|
|
||||||
<Dashboard::Charts::PaidBreakdown />
|
|
||||||
<Dashboard::Charts::PaidMix />
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
{{/if}}
|
|
||||||
{{#unless this.membersUtils.isMembersInviteOnly}}
|
|
||||||
<Dashboard::Charts::Attribution />
|
|
||||||
{{/unless}}
|
|
||||||
{{#if this.areNewslettersEnabled}}
|
|
||||||
<Dashboard::Charts::Engagement />
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if this.isTotalMembersZero}}
|
{{#if this.isTotalMembersZero}}
|
||||||
<Dashboard::Parts::Zero />
|
<Dashboard::Parts::Zero />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#unless this.onboarding.isChecklistShown}}
|
{{#unless this.onboarding.isChecklistShown}}
|
||||||
|
|
|
@ -50,6 +50,19 @@ describe('Acceptance: Onboarding', function () {
|
||||||
expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist;
|
expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist;
|
||||||
expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist;
|
expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('checklist is shown when members disabled', async function () {
|
||||||
|
this.server.db.settings.update({membersSignupAccess: 'none'});
|
||||||
|
await visit('/setup/done');
|
||||||
|
await visit('/dashboard');
|
||||||
|
|
||||||
|
// onboarding is't shown
|
||||||
|
expect(find('[data-test-dashboard="onboarding-checklist"]'), 'checklist').to.exist;
|
||||||
|
|
||||||
|
// other default dashboard elements are not visible
|
||||||
|
expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist;
|
||||||
|
expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('checklist (non-owner)', function () {
|
describe('checklist (non-owner)', function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue