Fossil SCM

Replaced recent activity list fieldset element with a fieldset-like element because of Safari fieldset layout/sizing bugs.

stephan 2021-09-23 15:15 chat-user-filter
Commit dc3f028290648d3d1ab609b046c8308091eb300ddf65ea11f4f0b426fa27cd71
2 files changed +2 -2 +10 -6
+2 -2
--- src/chat.c
+++ src/chat.c
@@ -181,20 +181,20 @@
181181
@ <input type="file" name="file" id="chat-input-file">
182182
@ </div>
183183
@ <div id="chat-drop-details"></div>
184184
@ </div>
185185
@ </div>
186
- @ <fieldset id='chat-user-list-wrapper' class='hidden'>
186
+ @ <div id='chat-user-list-wrapper' class='hidden'>
187187
@ <legend>Active Users (most recent first)</legend>
188188
@ <div id='chat-user-list'>
189189
@ <div class='help-buttonlet'>
190190
@ Users who have messages in the currently-loaded list.<br>
191191
@ Tap a user name to filter messages on that user and
192192
@ tap again to clear the filter.
193193
@ </div>
194194
@ </div>
195
- @ </fieldset>
195
+ @ </div>
196196
@ <div id='chat-preview' class='hidden chat-view'>
197197
@ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header>
198198
@ <div id='chat-preview-content' class='message-widget-content'></div>
199199
@ <div id='chat-preview-buttons'><button id='chat-preview-close'>Close Preview</button></div>
200200
@ </div>
201201
--- src/chat.c
+++ src/chat.c
@@ -181,20 +181,20 @@
181 @ <input type="file" name="file" id="chat-input-file">
182 @ </div>
183 @ <div id="chat-drop-details"></div>
184 @ </div>
185 @ </div>
186 @ <fieldset id='chat-user-list-wrapper' class='hidden'>
187 @ <legend>Active Users (most recent first)</legend>
188 @ <div id='chat-user-list'>
189 @ <div class='help-buttonlet'>
190 @ Users who have messages in the currently-loaded list.<br>
191 @ Tap a user name to filter messages on that user and
192 @ tap again to clear the filter.
193 @ </div>
194 @ </div>
195 @ </fieldset>
196 @ <div id='chat-preview' class='hidden chat-view'>
197 @ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header>
198 @ <div id='chat-preview-content' class='message-widget-content'></div>
199 @ <div id='chat-preview-buttons'><button id='chat-preview-close'>Close Preview</button></div>
200 @ </div>
201
--- src/chat.c
+++ src/chat.c
@@ -181,20 +181,20 @@
181 @ <input type="file" name="file" id="chat-input-file">
182 @ </div>
183 @ <div id="chat-drop-details"></div>
184 @ </div>
185 @ </div>
186 @ <div id='chat-user-list-wrapper' class='hidden'>
187 @ <legend>Active Users (most recent first)</legend>
188 @ <div id='chat-user-list'>
189 @ <div class='help-buttonlet'>
190 @ Users who have messages in the currently-loaded list.<br>
191 @ Tap a user name to filter messages on that user and
192 @ tap again to clear the filter.
193 @ </div>
194 @ </div>
195 @ </div>
196 @ <div id='chat-preview' class='hidden chat-view'>
197 @ <header>Preview: (<a href='%R/md_rules' target='_blank'>markdown reference</a>)</header>
198 @ <div id='chat-preview-content' class='message-widget-content'></div>
199 @ <div id='chat-preview-buttons'><button id='chat-preview-close'>Close Preview</button></div>
200 @ </div>
201
--- src/style.chat.css
+++ src/style.chat.css
@@ -136,11 +136,10 @@
136136
}
137137
138138
/** Container for the list of /chat messages. */
139139
body.chat #chat-messages-wrapper {
140140
overflow: auto;
141
- flex: 2 1 auto;
142141
padding: 0 0.25em;
143142
margin-bottom: 0.5em;
144143
}
145144
body.chat #chat-messages-wrapper.loading > * {
146145
/* An attempt at reducing flicker when loading lots of messages. */
@@ -265,18 +264,20 @@
265264
266265
body.chat #chat-drop-details img {
267266
max-width: 45%;
268267
max-height: 45%;
269268
}
270
-
269
+body.chat .chat-view {
270
+ flex: 20 1 auto
271
+ /*ensure that these grow more than the non-.chat-view elements*/;
272
+}
271273
body.chat #chat-config,
272274
body.chat #chat-preview {
273275
/* /chat configuration widget */
274276
display: flex;
275277
flex-direction: column;
276278
overflow: auto;
277
- flex: 2 1 auto;
278279
padding: 0;
279280
margin: 0;
280281
align-items: stretch;
281282
min-height: 6em;
282283
}
@@ -324,27 +325,30 @@
324325
flex: 0 1 auto;
325326
margin: 0.25em 0;
326327
}
327328
328329
body.chat #chat-user-list-wrapper {
329
- flex: 1 1 auto/*attempt to work around Safari mobile bug*/;
330
+ /* Safari can't do fieldsets right, so we emulate one. */
330331
border-radius: 0.5em;
331332
margin: 0.3em 0 0.2em 0;
332333
padding: 0.25em 0.5em;
333334
font-size: 85%;
334
- border-width: 1px/*some skins remove fieldset borders*/;
335
+ border-style: inset;
336
+ border-width: 0 1px 1px 1px/*else collides with the LEGEND*/;
335337
}
336338
body.chat #chat-user-list-wrapper > legend {
337339
font-weight: initial;
338340
padding: 0 0.5em;
341
+ position: relative;
342
+ top: -1.75ex;
339343
}
340344
body.chat #chat-user-list {
345
+ margin-top: -1.25ex;
341346
display: flex;
342347
flex-direction: row;
343348
flex-wrap: wrap;
344349
align-items: center;
345
- min-height: fit-content/*attempt to work around Safari mobile*/;
346350
}
347351
body.chat #chat-user-list .help-buttonlet {
348352
margin: 0.2em 0.5em 0.2em 0;
349353
}
350354
body.chat #chat-user-list .chat-user {
351355
--- src/style.chat.css
+++ src/style.chat.css
@@ -136,11 +136,10 @@
136 }
137
138 /** Container for the list of /chat messages. */
139 body.chat #chat-messages-wrapper {
140 overflow: auto;
141 flex: 2 1 auto;
142 padding: 0 0.25em;
143 margin-bottom: 0.5em;
144 }
145 body.chat #chat-messages-wrapper.loading > * {
146 /* An attempt at reducing flicker when loading lots of messages. */
@@ -265,18 +264,20 @@
265
266 body.chat #chat-drop-details img {
267 max-width: 45%;
268 max-height: 45%;
269 }
270
 
 
 
271 body.chat #chat-config,
272 body.chat #chat-preview {
273 /* /chat configuration widget */
274 display: flex;
275 flex-direction: column;
276 overflow: auto;
277 flex: 2 1 auto;
278 padding: 0;
279 margin: 0;
280 align-items: stretch;
281 min-height: 6em;
282 }
@@ -324,27 +325,30 @@
324 flex: 0 1 auto;
325 margin: 0.25em 0;
326 }
327
328 body.chat #chat-user-list-wrapper {
329 flex: 1 1 auto/*attempt to work around Safari mobile bug*/;
330 border-radius: 0.5em;
331 margin: 0.3em 0 0.2em 0;
332 padding: 0.25em 0.5em;
333 font-size: 85%;
334 border-width: 1px/*some skins remove fieldset borders*/;
 
335 }
336 body.chat #chat-user-list-wrapper > legend {
337 font-weight: initial;
338 padding: 0 0.5em;
 
 
339 }
340 body.chat #chat-user-list {
 
341 display: flex;
342 flex-direction: row;
343 flex-wrap: wrap;
344 align-items: center;
345 min-height: fit-content/*attempt to work around Safari mobile*/;
346 }
347 body.chat #chat-user-list .help-buttonlet {
348 margin: 0.2em 0.5em 0.2em 0;
349 }
350 body.chat #chat-user-list .chat-user {
351
--- src/style.chat.css
+++ src/style.chat.css
@@ -136,11 +136,10 @@
136 }
137
138 /** Container for the list of /chat messages. */
139 body.chat #chat-messages-wrapper {
140 overflow: auto;
 
141 padding: 0 0.25em;
142 margin-bottom: 0.5em;
143 }
144 body.chat #chat-messages-wrapper.loading > * {
145 /* An attempt at reducing flicker when loading lots of messages. */
@@ -265,18 +264,20 @@
264
265 body.chat #chat-drop-details img {
266 max-width: 45%;
267 max-height: 45%;
268 }
269 body.chat .chat-view {
270 flex: 20 1 auto
271 /*ensure that these grow more than the non-.chat-view elements*/;
272 }
273 body.chat #chat-config,
274 body.chat #chat-preview {
275 /* /chat configuration widget */
276 display: flex;
277 flex-direction: column;
278 overflow: auto;
 
279 padding: 0;
280 margin: 0;
281 align-items: stretch;
282 min-height: 6em;
283 }
@@ -324,27 +325,30 @@
325 flex: 0 1 auto;
326 margin: 0.25em 0;
327 }
328
329 body.chat #chat-user-list-wrapper {
330 /* Safari can't do fieldsets right, so we emulate one. */
331 border-radius: 0.5em;
332 margin: 0.3em 0 0.2em 0;
333 padding: 0.25em 0.5em;
334 font-size: 85%;
335 border-style: inset;
336 border-width: 0 1px 1px 1px/*else collides with the LEGEND*/;
337 }
338 body.chat #chat-user-list-wrapper > legend {
339 font-weight: initial;
340 padding: 0 0.5em;
341 position: relative;
342 top: -1.75ex;
343 }
344 body.chat #chat-user-list {
345 margin-top: -1.25ex;
346 display: flex;
347 flex-direction: row;
348 flex-wrap: wrap;
349 align-items: center;
 
350 }
351 body.chat #chat-user-list .help-buttonlet {
352 margin: 0.2em 0.5em 0.2em 0;
353 }
354 body.chat #chat-user-list .chat-user {
355

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button