alpha
Login
or
Join now
danabra.mov
/
sidetrail
Star
1
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
an app to share curated trails
sidetrail.app
Star
1
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
add insert stop before button
author
Dan Abramov
date
6 months ago
(Dec 7, 2025, 2:32 AM +0900)
commit
a129c96f
a129c96f350463f2fa02991b514263e51ea996f8
parent
cc738969
cc738969feee1d705cb0a83f752ae6b6f687d0e7
+30
-2
2 changed files
Expand all
Collapse all
Unified
Split
app
at
(trail)
[handle]
trail
[rkey]
TrailStop.css
TrailStop.tsx
+17
-1
app/at/(trail)/[handle]/trail/[rkey]/TrailStop.css
Reviewed
···
150
150
151
151
.TrailStop-insertButton {
152
152
position: absolute;
153
153
-
top: calc(100% + 2rem);
154
153
left: 50%;
155
154
transform: translate(-50%, -50%);
156
155
z-index: 5;
156
156
+
}
157
157
+
158
158
+
.TrailStop-insertButton--before {
159
159
+
top: -2rem;
160
160
+
opacity: 0.3;
161
161
+
transition: opacity 0.2s ease;
162
162
+
}
163
163
+
164
164
+
@media (hover: hover) {
165
165
+
.TrailStop-insertButton--before:hover {
166
166
+
opacity: 1;
167
167
+
}
168
168
+
}
169
169
+
170
170
+
.TrailStop-insertButton--between,
171
171
+
.TrailStop-insertButton--final {
172
172
+
top: calc(100% + 2rem);
157
173
}
158
174
159
175
/* Between-stops buttons are subtle by default, show fully on hover */
+13
-1
app/at/(trail)/[handle]/trail/[rkey]/TrailStop.tsx
Reviewed
···
135
135
</div>
136
136
)}
137
137
138
138
-
{/* Insert stop button - appears after current step only, and only if less than 12 steps */}
138
138
+
{isEditing && editContext && isCurrent && index > 0 && totalStops < 12 && (
139
139
+
<div className="TrailStop-insertButton TrailStop-insertButton--before">
140
140
+
<AddButton
141
141
+
onClick={(e) => {
142
142
+
e.stopPropagation();
143
143
+
editContext.addStop(index - 1);
144
144
+
handleGoToStop(index);
145
145
+
}}
146
146
+
title="insert stop before"
147
147
+
/>
148
148
+
</div>
149
149
+
)}
150
150
+
139
151
{isEditing &&
140
152
editContext &&
141
153
(isCurrent ||