Revert "First iteration of adding in post and page columns to event tables"

This reverts commit 26150ca769.
This commit is contained in:
Simon Backx 2022-08-18 17:29:40 +02:00
parent 02d66ee30a
commit 59851fc1ab
8 changed files with 68 additions and 293 deletions

View File

@ -70,7 +70,6 @@
<div class="gh-dashboard-list-header">
<div class="gh-dashboard-list-title">Member</div>
<div class="gh-dashboard-list-title">Event</div>
<div class="gh-dashboard-list-title">Page / Post</div>
<div class="gh-dashboard-list-title">Time</div>
</div>
<div class="gh-dashboard-list-body">
@ -94,33 +93,23 @@
{{#let (parse-member-event event eventsFetcher.hasMultipleNewsletters) as |parsedEvent|}}
<div class="gh-dashboard-list-item member-details">
<div class="gh-dashboard-list-item-sub">
<LinkTo class="gh-dashboard-list-member" @route="member" @model="{{parsedEvent.memberId}}" data-test-dashboard-member-activity-item>
<GhMemberAvatar @member={{parsedEvent.member}} @containerClass="w8 h8 mr3 flex-shrink-0" />
<span class="gh-dashboard-list-text">{{parsedEvent.subject}}</span>
</LinkTo>
<GhMemberAvatar @member={{parsedEvent.member}} @containerClass="w8 h8 mr3 flex-shrink-0" />
<LinkTo class="gh-dashboard-list-text" @route="member" @model="{{parsedEvent.memberId}}" data-test-dashboard-member-activity-item>{{parsedEvent.subject}}</LinkTo>
</div>
<div class="gh-dashboard-list-item-sub">
{{svg-jar parsedEvent.icon}}
<span class="gh-dashboard-list-subtext">
{{capitalize-first-letter parsedEvent.action}}
</span>
{{#if parsedEvent.object}}
{{parsedEvent.object}}
{{/if}}
{{#if parsedEvent.info}}
{{#if parsedEvent.url}}
"<a class="ghost-members-activity-object-link" href="{{parsedEvent.url}}" target="_blank" rel="noopener noreferrer">{{parsedEvent.object}}</a>"
{{else}}
{{parsedEvent.object}}
{{/if}}
{{parsedEvent.info}}
{{/if}}
</span>
</div>
{{!-- TODO: Wire up the new event page/post links in this column --}}
<div class="gh-dashboard-list-item-sub">
{{#if parsedEvent.url}}
<a class="ghost-members-activity-object-link" href="{{parsedEvent.url}}" target="_blank" rel="noopener noreferrer">{{parsedEvent.object}}</a>
{{else}}
<span class="gh-list-nodata">&mdash;</span>
{{/if}}
</div>
<div class="gh-dashboard-list-item-sub gh-dashboard-list-date">
<span class="gh-dashboard-list-subtext">{{moment-from-now parsedEvent.timestamp}}</span>
<span class="gh-dashboard-list-subtext">{{moment-format parsedEvent.timestamp "DD MMM YYYY HH:mm"}}</span>
</div>
</div>
{{/let}}

View File

@ -9,61 +9,52 @@
{{#let (members-event-fetcher filter=(members-event-filter member=@member.id) pageSize=5) as |eventsFetcher|}}
<div class="gh-main-section-content grey {{if eventsFetcher.data "" "mt8"}}">
<div class="gh-member-feed {{if eventsFetcher.data "" "gh-member-feed-no-data"}}" ...attributes>
<div class="gh-list-mini-header">
<div class="gh-list-mini-title">Event</div>
<div class="gh-list-mini-title">Page / Post</div>
<div class="gh-list-mini-title">Time</div>
</div>
<div class="gh-list-mini-body">
{{#if eventsFetcher.isLoading}}
<div class="relative h17"><GhLoadingSpinner class="h30" /></div>
{{else if eventsFetcher.data}}
{{#each eventsFetcher.data as |rawEvent|}}
{{#let (parse-member-event rawEvent eventsFetcher.hasMultipleNewsletters) as |event|}}
<div class="gh-list-mini-item">
<div class="gh-list-mini-item-sub">
<div class="gh-member-feed-icon">
{{svg-jar event.icon class=event.iconClass}}
</div>
<div class="gh-member-feed-detail">
<div class="gh-member-feed-event">
<span class="gh-member-feed-event-inner">
<span class="gh-members-activity-description">
{{capitalize-first-letter event.action}}
{{#if event.object}}
{{event.object}}
{{/if}}
{{#if event.info}}
<span class="highlight">{{event.info}}</span>
<div class="flex-auto flex flex-column items-stretch {{if eventsFetcher.data "justify-between" "h-100 justify-center"}}">
<div>
{{#if eventsFetcher.isLoading}}
<div class="relative h17"><GhLoadingSpinner class="h30" /></div>
{{else if eventsFetcher.data}}
{{#each eventsFetcher.data as |rawEvent|}}
{{#let (parse-member-event rawEvent eventsFetcher.hasMultipleNewsletters) as |event|}}
<div class="gh-member-feed-row">
<div class="gh-member-feed-container">
<div class="gh-member-feed-icon">
{{svg-jar event.icon class=event.iconClass}}
</div>
<div class="gh-member-feed-detail">
<div class="gh-member-feed-event">
<span class="gh-member-feed-event-inner">
<span class="gh-members-activity-description">
{{capitalize-first-letter event.action}}
{{#if event.url}}
"<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>"
{{else}}
{{event.object}}
{{/if}}
</span>
{{#if event.email}}
"<GhEmailPreviewLink @data={{event.email}} />"
{{/if}}
{{event.info}}
</span>
</span>
</div>
<div class="gh-member-feed-time">
{{moment-from-now event.timestamp}}
</div>
</div>
</div>
</div>
{{!-- TODO: Wire up the new event page/post links in this column --}}
<div class="gh-list-mini-item-sub">
{{#if event.url}}
<a href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{else if event.email}}
<GhEmailPreviewLink @data={{event.email}} />
{{else}}
<span class="gh-list-nodata">&mdash;</span>
{{/if}}
</div>
<div class="gh-list-mini-item-sub">
{{moment-from-now event.timestamp}}
</div>
</div>
{{/let}}
{{/each}}
{{/let}}
{{/each}}
<div class="gh-list-mini-footer">
<LinkTo @route="members-activity" @query={{hash excludedEvents=null member=@member.id}}>See all activity →</LinkTo>
</div>
{{else}}
<Member::ActivityFeedEmpty />
{{/if}}
<div class="gh-member-feed-footer">
<LinkTo @route="members-activity" @query={{hash excludedEvents=null member=@member.id}}>See all activity →</LinkTo>
</div>
{{else}}
<Member::ActivityFeedEmpty />
{{/if}}
</div>
</div>
</div>
</div>

View File

@ -21,26 +21,19 @@
<div class="gh-members-activity-event">
<span class="gh-members-activity-description">
{{capitalize-first-letter event.action}}
{{#if event.object}}
{{#if event.url}}
"<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>"
{{else}}
{{event.object}}
{{/if}}
{{#if event.info}}
<span class="highlight">{{event.info}}</span>
{{/if}}
</span>
{{#if event.email}}
"<GhEmailPreviewLink @data={{event.email}} />"
{{/if}}
<span class="highlight">{{event.info}}</span>
</div>
</div>
</div>
{{!-- TODO: Wire up the new event page/post links in this column --}}
<div class="gh-list-data">
{{#if event.url}}
<a class="ghost-members-activity-object-link" href="{{event.url}}" target="_blank" rel="noopener noreferrer">{{event.object}}</a>
{{else if event.email}}
<GhEmailPreviewLink @data={{event.email}} />
{{else}}
<span class="gh-list-nodata">&mdash;</span>
{{/if}}
</div>
<div class="gh-list-data">{{moment-format event.timestamp "DD MMM YYYY HH:mm"}}</div>
</tr>
{{/let}}

View File

@ -5,7 +5,6 @@
<th>Member</th>
{{/unless}}
<th>Event</th>
<th>Page / Post</th>
<th>Time</th>
</tr>
</thead>

View File

@ -152,26 +152,6 @@ ul.nostyle li {
width: 32px;
}
.gh-list-nodata {
font-size: 1.5rem;
letter-spacing: 0;
text-decoration: none;
min-width: 54px;
color: var(--lightgrey);
font-weight: 500;
}
.gh-list-separator {
font-size: 1.5rem;
letter-spacing: 0;
text-decoration: none;
color: var(--lightgrey);
font-weight: 700;
padding-left: 0.375em;
padding-right: 0.375em;
}
/* Typography
/* --------------------------------------------------- */
.gh-list h3 {
@ -448,147 +428,3 @@ ul.nostyle li {
height: calc(100vh - 96px);
}
}
/* ---------------------------------
Mini List */
.gh-list-mini {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.gh-list-mini-header,
.gh-list-mini-item {
display: grid;
grid-template-columns: 35% 45% 20%;
}
.gh-list-mini-header {
padding: 16px 0 8px;
border-bottom: 1px solid var(--whitegrey);
margin: 0 0 8px;
}
.gh-list-mini-title {
align-items: center;
line-height: 1em;
white-space: nowrap;
font-size: 1.1rem;
font-weight: 500;
letter-spacing: 0.03em;
color: var(--midgrey);
padding: 0 20px 8px 0;
text-transform: uppercase;
white-space: nowrap;
}
.gh-list-mini-body {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.gh-list-mini-item {
padding: 14px 0;
padding: 4px 0;
}
.gh-list-mini-item:nth-child(3) {
border-bottom: 0 none;
}
.gh-list-mini-item:last-child {
border-bottom: 0;
}
.gh-list-mini-member {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
min-width: 0;
}
.gh-list-mini-text {
font-weight: 600;
font-size: 1.5rem;
letter-spacing: 0;
color: var(--darkgrey);
padding: 0 32px 0 0;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.gh-list-mini-subtext {
font-weight: 500;
font-size: 1.4rem;
color: var(--middarkgrey);
text-decoration: none;
padding: 0 12px 0 0;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.gh-list-mini-subtext > a {
color: var(--black);
font-weight: 600;
}
.gh-list-mini-item svg {
width: 20px;
min-width: 20px;
height: 20px;
margin: 0 0.5rem 0 -4px;
}
.gh-list-mini-item-sub {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
min-height: 32px;
min-width: 0;
}
.gh-list-mini-item-sub > a {
color: var(--black);
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0 24px 0 0;
}
.gh-list-mini-footer {
border-top: 1px solid var(--whitegrey);
padding: 16px 0 4px;
margin: 8px 0 0;
}
.gh-list-mini-date {
font-size: 1.3rem;
color: var(--midlightgrey);
text-align: right;
padding: 3px 0 0 0;
white-space: nowrap;
}
.gh-list-mini-author {
font-size: 1.3rem;
color: var(--midlightgrey);
text-align: right;
padding: 1px 0 0 0;
white-space: nowrap;
}
.gh-list-mini-empty {
flex: 1;
}

View File

@ -689,14 +689,6 @@ Dashboard List */
background: linear-gradient(315deg,rgba(249, 249, 250, 0.5) 60%,rgba(255, 255, 255, 0.5));
}
.gh-dashboard-list-member {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
min-width: 0;
}
.gh-dashboard-list-text {
font-weight: 600;
font-size: 1.5rem;
@ -714,7 +706,7 @@ Dashboard List */
font-size: 1.4rem;
color: var(--middarkgrey);
text-decoration: none;
padding: 0 12px 0 0;
padding: 0 32px 0 0;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
@ -742,15 +734,6 @@ Dashboard List */
min-width: 0;
}
.gh-dashboard-list-item-sub > a {
color: var(--black);
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0 32px 0 0;
}
.gh-dashboard-list-footer {
border-top: 1px solid var(--whitegrey);
padding: 20px 0 0;
@ -1154,6 +1137,14 @@ Dashboard Recents */
width: 80%;
overflow: hidden;
color: var(--darkgrey);
display: flex;
justify-content: flex-start;
align-items: center;
}
.gh-dashboard-recents .gh-dashboard-list-item a > span {
display: inline-block;
height: 57px;
}
.gh-dashboard-recents .gh-dashboard-list-title:last-child,
@ -1198,7 +1189,7 @@ Dashboard Recents */
.gh-dashboard-recents-activity .gh-dashboard-list-header,
.gh-dashboard-recents-activity .gh-dashboard-list-item {
grid-template-columns: 30% 25% 30% minmax(0, 15%);
grid-template-columns: 30% 40% 30%;
}
.gh-dashboard-recents-activity .gh-dashboard-list-title:nth-child(2),

View File

@ -88,23 +88,8 @@
color: var(--midgrey);
}
.gh-members-activity .gh-list-scrolling thead th:nth-child(2) {
width: 25%;
min-width: 200px;
}
.gh-members-activity.gh-members-activity-single .gh-list-scrolling thead th:nth-child(2) {
width: 50%;
min-width: 200px;
}
.gh-members-activity:not(.gh-members-activity-single) .gh-list-scrolling thead th:nth-child(3) {
width: 30%;
min-width: 200px;
}
.gh-members-activity .gh-list-scrolling thead th:last-child {
width: 15%;
width: 18%;
}
.gh-members-activity .gh-list-scrolling tbody .gh-list-data:last-child {
@ -120,11 +105,6 @@
margin-bottom: 4px;
}
.gh-members-activity .gh-list .gh-list-data a {
font-weight: 500;
color: var(--black);
}
.gh-list-data-event {
display: flex;
justify-content: flex-start;

View File

@ -1166,7 +1166,7 @@ textarea.gh-member-details-textarea {
flex-shrink: 0;
width: 24px;
height: 24px;
margin-right: 0.25rem;
margin-right: 1rem;
}
.gh-member-feed-icon svg {
@ -1190,10 +1190,6 @@ textarea.gh-member-details-textarea {
padding-top: 16px;
}
.gh-member-feed-footer a {
font-weight: 600;
}
/* Import modal
/* ---------------------------------------------------------- */