Revert: UX: Make full topic row clickable on mobile (#16440) (#16472)

This commit is contained in:
Kris 2022-04-13 18:35:47 -04:00 committed by GitHub
parent 0ff66b3b74
commit f2468f1093
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 39 deletions

View File

@ -258,18 +258,6 @@ export default Component.extend({
return this.navigateToTopic(topic, e.target.getAttribute("href")); return this.navigateToTopic(topic, e.target.getAttribute("href"));
} }
// make full row click target on mobile, due to size constraints
if (
this.site.mobileView &&
(e.target.classList.contains("right") ||
e.target.classList.contains("topic-item-stats"))
) {
if (wantsNewWindow(e)) {
return true;
}
return this.navigateToTopic(topic, topic.lastUnreadUrl);
}
if (e.target.closest("a.topic-status")) { if (e.target.closest("a.topic-status")) {
this.topic.togglePinnedForUser(); this.topic.togglePinnedForUser();
return false; return false;

View File

@ -38,10 +38,12 @@
</div> </div>
{{/unless}} {{/unless}}
{{discourse-tags topic mode="list"}} {{discourse-tags topic mode="list"}}
<div class='num activity last'> <div class="pull-right">
<span class="age activity" title="{{topic.bumpedAtTitle}}"><a <div class='num activity last'>
href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a> <span class="age activity" title="{{topic.bumpedAtTitle}}"><a
</span> href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
</span>
</div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>

View File

@ -117,10 +117,6 @@
max-width: 300px; max-width: 300px;
} }
.avatar {
margin-top: 0.15em;
}
.main-link { .main-link {
line-height: $line-height-medium; line-height: $line-height-medium;
position: relative; position: relative;
@ -128,10 +124,9 @@
font-size: var(--font-up-1); font-size: var(--font-up-1);
a.title { a.title {
color: var(--primary); color: var(--primary);
padding: 0; padding: 0.5em 0 1.2em 0;
} }
.topic-statuses { .topic-statuses {
padding: 0;
a { a {
line-height: 0.8; line-height: 0.8;
color: var(--primary-medium); color: var(--primary-medium);
@ -166,13 +161,9 @@
} }
.topic-item-stats { .topic-item-stats {
// disabling clicks because these targets are too small on mobile
pointer-events: none;
position: relative; position: relative;
display: flex;
align-items: baseline;
z-index: z("base");
margin-top: 0.5em; margin-top: 0.5em;
z-index: z("base");
.category, .category,
.num, .num,
.last-poster { .last-poster {
@ -186,22 +177,14 @@
a:visited { a:visited {
color: var(--primary-med-or-secondary-med); color: var(--primary-med-or-secondary-med);
} }
.activity {
margin-left: auto;
}
.discourse-tags {
display: flex;
flex-wrap: nowrap;
flex: 0 1 auto;
overflow: hidden;
}
} }
.age { .age {
white-space: nowrap; white-space: nowrap;
a { a {
color: var(--primary-600); // let's make all ages dim on mobile so we're not
font-size: var(--font-down-1); // overwhelming people with info about each topic
color: var(--primary-low-mid-or-secondary-high) !important;
} }
} }
} }
@ -458,7 +441,7 @@ td .main-link {
} }
} }
.num.activity a { .num.activity a {
padding: 0.5em 0; padding: 0;
} }
// so the topic excerpt is full width // so the topic excerpt is full width
// as the containing div is 80% // as the containing div is 80%