mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Larger clickable area for mobile topic list (#16473)
This commit is contained in:
parent
07f975848d
commit
8dd3d6cb97
@ -258,6 +258,19 @@ export default Component.extend({
|
||||
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") ||
|
||||
e.target.classList.contains("main-link"))
|
||||
) {
|
||||
if (wantsNewWindow(e)) {
|
||||
return true;
|
||||
}
|
||||
return this.navigateToTopic(topic, topic.lastUnreadUrl);
|
||||
}
|
||||
|
||||
if (e.target.closest("a.topic-status")) {
|
||||
this.topic.togglePinnedForUser();
|
||||
return false;
|
||||
|
@ -38,14 +38,10 @@
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{discourse-tags topic mode="list"}}
|
||||
<div class="pull-right">
|
||||
<div class='num activity last'>
|
||||
<span class="age activity" title="{{topic.bumpedAtTitle}}"><a
|
||||
href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class='num activity last'>
|
||||
<span class="age activity" title="{{topic.bumpedAtTitle}}"><a
|
||||
href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -124,7 +124,7 @@
|
||||
font-size: var(--font-up-1);
|
||||
a.title {
|
||||
color: var(--primary);
|
||||
padding: 0.5em 0 1.2em 0;
|
||||
padding: 0;
|
||||
}
|
||||
.topic-statuses {
|
||||
a {
|
||||
@ -161,18 +161,21 @@
|
||||
}
|
||||
|
||||
.topic-item-stats {
|
||||
// disabling clicks because these targets are too small on mobile
|
||||
pointer-events: none;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
margin-top: 0.5em;
|
||||
z-index: z("base");
|
||||
.category,
|
||||
.num,
|
||||
.last-poster {
|
||||
float: left;
|
||||
.num.activity {
|
||||
margin-left: auto;
|
||||
font-size: var(--font-down-1);
|
||||
}
|
||||
.category a {
|
||||
max-width: 160px;
|
||||
}
|
||||
.num .fa,
|
||||
.num .d-icon,
|
||||
a,
|
||||
a:visited {
|
||||
color: var(--primary-med-or-secondary-med);
|
||||
@ -182,9 +185,7 @@
|
||||
.age {
|
||||
white-space: nowrap;
|
||||
a {
|
||||
// let's make all ages dim on mobile so we're not
|
||||
// overwhelming people with info about each topic
|
||||
color: var(--primary-low-mid-or-secondary-high) !important;
|
||||
color: var(--primary-medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user