Made some adjustments to fix the feature flag for posts and pages

- There was some spillage from the feature flag
- This has some better handling of various styles

refs https://github.com/TryGhost/Team/issues/1818
This commit is contained in:
James Morris 2022-08-23 18:42:09 +01:00
parent 0596986138
commit a3d4c4b3a9
5 changed files with 28 additions and 18 deletions

View File

@ -83,10 +83,20 @@
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-opens">
{{#if (and @post.email.trackOpens (eq @post.email.status "submitted"))}}
<div class="flex">
<span class="gh-list-rate-bar">
<span class="gh-list-rate-number" data-tooltip="Opens: {{format-number @post.email.openedCount}}">{{@post.email.openRate}}%&nbsp;</span>
<span class="gh-list-rate-amount"><span style={{html-safe (concat "width: " @post.email.openRate "%;")}}/></span>
</span>
{{#if this.feature.memberAttribution}}
<span class="gh-list-rate-bar">
<span class="gh-list-rate-number" data-tooltip="Opens: {{format-number @post.email.openedCount}}">{{@post.email.openRate}}%&nbsp;</span>
<span class="gh-list-rate-amount"><span style={{html-safe (concat "width: " @post.email.openRate "%;")}}/></span>
</span>
{{else}}
<span class="darkgrey fw5 gh-content-email-stats">
{{#if this.isHovered}}
{{format-number @post.email.openedCount}}
{{else}}
{{@post.email.openRate}}%&nbsp;
{{/if}}
</span>
{{/if}}
<span class="midgrey-l2 fw4 gh-content-email-stats-mobile">{{@post.email.openRate}}% opens</span>
</div>
{{else}}

View File

@ -193,7 +193,6 @@ ul.nostyle li {
font-weight: 500;
}
.gh-list-rate-bar {
flex: 1;
display: flex;

View File

@ -170,11 +170,12 @@
.gh-posts-signups-header,
.gh-posts-conversions-header,
.gh-posts-sends-header {
.gh-posts-sends-header,
.gh-posts-opens-header {
width: 110px;
}
.gh-posts-opens-header {
.feature-memberAttribution .gh-posts-opens-header {
width: 170px;
}
@ -364,22 +365,22 @@
}
@media (max-width: 1600px) {
.gh-post-list-status,
.gh-post-list-recipients,
.gh-post-list-opens,
.gh-post-list-signups,
.gh-post-list-conversions {
.feature-memberAttribution .gh-post-list-status,
.feature-memberAttribution .gh-post-list-recipients,
.feature-memberAttribution .gh-post-list-opens,
.feature-memberAttribution .gh-post-list-signups,
.feature-memberAttribution .gh-post-list-conversions {
padding-left: 12px;
padding-right: 12px;
}
.gh-posts-signups-header,
.gh-posts-conversions-header,
.gh-posts-sends-header {
.feature-memberAttribution .gh-posts-signups-header,
.feature-memberAttribution .gh-posts-conversions-header,
.feature-memberAttribution .gh-posts-sends-header {
width: 80px;
}
.gh-posts-opens-header {
.feature-memberAttribution .gh-posts-opens-header {
width: 160px;
}
}

View File

@ -27,7 +27,7 @@
</GhCanvasHeader>
<section class="view-container content-list">
<ol class="pages-list gh-list {{unless this.postsInfinityModel "no-posts"}}">
<ol class="pages-list gh-list {{unless this.postsInfinityModel "no-posts"}} {{if this.feature.memberAttribution 'feature-memberAttribution'}}">
{{#if this.postsInfinityModel}}
<li class="gh-list-row header">
<div class="gh-list-header gh-posts-title-header">Title</div>

View File

@ -27,7 +27,7 @@
</GhCanvasHeader>
<section class="view-container content-list">
<ol class="posts-list gh-list {{unless this.postsInfinityModel "no-posts"}}">
<ol class="posts-list gh-list {{unless this.postsInfinityModel "no-posts"}} {{if this.feature.memberAttribution 'feature-memberAttribution'}}">
{{#if this.postsInfinityModel}}
<li class="gh-list-row header">
<div class="gh-list-header gh-posts-title-header">Title</div>