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"));
|
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")) {
|
if (e.target.closest("a.topic-status")) {
|
||||||
this.topic.togglePinnedForUser();
|
this.topic.togglePinnedForUser();
|
||||||
return false;
|
return false;
|
||||||
|
@ -38,14 +38,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{discourse-tags topic mode="list"}}
|
{{discourse-tags topic mode="list"}}
|
||||||
<div class="pull-right">
|
|
||||||
<div class='num activity last'>
|
<div class='num activity last'>
|
||||||
<span class="age activity" title="{{topic.bumpedAtTitle}}"><a
|
<span class="age activity" title="{{topic.bumpedAtTitle}}"><a
|
||||||
href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
|
href="{{topic.lastPostUrl}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
font-size: var(--font-up-1);
|
font-size: var(--font-up-1);
|
||||||
a.title {
|
a.title {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
padding: 0.5em 0 1.2em 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.topic-statuses {
|
.topic-statuses {
|
||||||
a {
|
a {
|
||||||
@ -161,18 +161,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
z-index: z("base");
|
z-index: z("base");
|
||||||
.category,
|
.num.activity {
|
||||||
.num,
|
margin-left: auto;
|
||||||
.last-poster {
|
font-size: var(--font-down-1);
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
.category a {
|
.category a {
|
||||||
max-width: 160px;
|
max-width: 160px;
|
||||||
}
|
}
|
||||||
.num .fa,
|
.num .d-icon,
|
||||||
a,
|
a,
|
||||||
a:visited {
|
a:visited {
|
||||||
color: var(--primary-med-or-secondary-med);
|
color: var(--primary-med-or-secondary-med);
|
||||||
@ -182,9 +185,7 @@
|
|||||||
.age {
|
.age {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
a {
|
a {
|
||||||
// let's make all ages dim on mobile so we're not
|
color: var(--primary-medium);
|
||||||
// overwhelming people with info about each topic
|
|
||||||
color: var(--primary-low-mid-or-secondary-high) !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user