0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Tweaks to how click events are handled based on feedback

refs https://github.com/TryGhost/Team/issues/1981
This commit is contained in:
James Morris 2022-09-27 12:29:08 +01:00
parent e98dda15f9
commit ec9e61dc2f
5 changed files with 22 additions and 10 deletions

View file

@ -31,15 +31,16 @@
{{/if}} {{/if}}
{{#if event.url}} {{#if event.url}}
<span class="gh-members-activity-event-join">{{event.join}}</span> <span class="gh-members-activity-event-join">{{event.join}}</span>
{{#if (feature "emailClicks")}}<span class="gh-members-activity-event-dash"></span>{{/if}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a> <a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{/if}} {{/if}}
{{#if event.email}} {{#if event.email}}
{{#if (feature "emailClicks")}}<span class="gh-members-activity-event-dash"></span>{{/if}}
<GhEmailPreviewLink @data={{event.email}} /> <GhEmailPreviewLink @data={{event.email}} />
{{/if}} {{/if}}
</span> </span>
{{#if event.description}} {{#if event.description}}
<div class="ghost-members-activity-event-description {{if (feature "memberAttribution") 'feature-memberAttribution'}}"> <div class="ghost-members-activity-event-description {{if (feature "memberAttribution") 'feature-memberAttribution'}}">
<div class="ghost-members-activity-event-prefix">URL</div>
<div class="ghost-members-activity-event-url" {{on "mouseenter" this.enterLinkURL}} {{on "mouseleave" this.leaveLinkURL}}> <div class="ghost-members-activity-event-url" {{on "mouseenter" this.enterLinkURL}} {{on "mouseleave" this.leaveLinkURL}}>
<span>{{event.description}}</span> <span>{{event.description}}</span>
</div> </div>

View file

@ -26,15 +26,16 @@
{{/if}} {{/if}}
{{#if event.url}} {{#if event.url}}
<span class="gh-members-activity-event-join">{{event.join}}</span> <span class="gh-members-activity-event-join">{{event.join}}</span>
{{#if (feature "emailClicks")}}<span class="gh-members-activity-event-dash"></span>{{/if}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a> <a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{/if}} {{/if}}
{{#if event.email}} {{#if event.email}}
<span class="{{if (feature "memberAttribution") 'hidden'}}"><GhEmailPreviewLink @data={{event.email}} /></span> {{#if (feature "emailClicks")}}<span class="gh-members-activity-event-dash"></span>{{/if}}
<GhEmailPreviewLink @data={{event.email}} />
{{/if}} {{/if}}
</span> </span>
{{#if event.description}} {{#if event.description}}
<div class="ghost-members-activity-event-description {{if (feature "memberAttribution") 'feature-memberAttribution'}}"> <div class="ghost-members-activity-event-description {{if (feature "memberAttribution") 'feature-memberAttribution'}}">
<div class="ghost-members-activity-event-prefix">URL</div>
<div class="ghost-members-activity-event-url" {{on "mouseenter" this.enterLinkURL}} {{on "mouseleave" this.leaveLinkURL}}> <div class="ghost-members-activity-event-url" {{on "mouseenter" this.enterLinkURL}} {{on "mouseleave" this.leaveLinkURL}}>
<span>{{event.description}}</span> <span>{{event.description}}</span>
</div> </div>

View file

@ -157,7 +157,7 @@ export default class ParseMemberEventHelper extends Helper {
} }
if (event.type === 'click_event') { if (event.type === 'click_event') {
return 'clicked in email'; return 'clicked link in email';
} }
} }

View file

@ -455,6 +455,7 @@ ul.nostyle li {
background: var(--main-bg-color); background: var(--main-bg-color);
background: linear-gradient(90deg, rgba(255,255,255,1) 90%, rgba(255,255,255,0) 100%); background: linear-gradient(90deg, rgba(255,255,255,1) 90%, rgba(255,255,255,0) 100%);
padding: 0 60px 0 0; padding: 0 60px 0 0;
z-index: 99;
} }
.gh-list-scrolling thead th:first-child::before, .gh-list-scrolling thead th:first-child::before,

View file

@ -36,6 +36,14 @@
color: var(--darkgrey); color: var(--darkgrey);
} }
.gh-members-activity .gh-list-data {
height: 84px;
}
.gh-members-activity.gh-members-activity-single .gh-list-data {
height: 68px;
}
.no-posts .gh-members-placeholder { .no-posts .gh-members-placeholder {
fill: var(--lightgrey); fill: var(--lightgrey);
width: 60px; width: 60px;
@ -141,7 +149,6 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 1.25rem 0;
} }
.gh-members-activity-detail { .gh-members-activity-detail {
@ -153,6 +160,7 @@
display: block; display: block;
font-weight: 500; font-weight: 500;
font-size: 1.4rem; font-size: 1.4rem;
letter-spacing: 0;
color: var(--middarkgrey); color: var(--middarkgrey);
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@ -179,6 +187,10 @@
color: var(--darkgrey); color: var(--darkgrey);
} }
.gh-members-activity-event-dash {
color: var(--midgrey);
}
.gh-members-activity-event-join { .gh-members-activity-event-join {
font-weight: 500; font-weight: 500;
color: var(--middarkgrey); color: var(--middarkgrey);
@ -190,10 +202,7 @@
} }
.ghost-members-activity-event-description { .ghost-members-activity-event-description {
display: flex; margin-top: -1px;
flex-direction: row;
align-items: baseline;
gap: 6px;
} }
.ghost-members-activity-event-prefix { .ghost-members-activity-event-prefix {
@ -254,7 +263,7 @@
.ghost-members-activity-event-url > span { .ghost-members-activity-event-url > span {
display: inline-block; display: inline-block;
font-weight: 400; font-weight: 400;
font-size: 1.2rem; font-size: 1.3rem;
color: var(--midgrey); color: var(--midgrey);
letter-spacing: 0; letter-spacing: 0;
line-height: 1.3em; line-height: 1.3em;