Fossil SCM

Add a potential TODO. Doc tweaks.

stephan 2026-05-26 17:57 UTC forum-statuses
Commit 5c1ee065c7e6fdce7eb22e4468ed752ee7bedb5a25e366125a7f8f7e7c128df6
2 files changed +2 +4 -2
--- src/forum.c
+++ src/forum.c
@@ -2434,10 +2434,12 @@
24342434
az = fossil_malloc(sizeof(az[0]) * ((1 + fss->n) * 2));
24352435
az[i++] = "*";
24362436
az[i++] = "Any status";
24372437
for( j = 0; j < fss->n; ++j ){
24382438
const ForumStatus * fs = &fss->aStatus[j];
2439
+ /* Potential TODO: skip any entries for which there are no
2440
+ ** forum posts with a status=${fs->zValue} tag. */
24392441
az[i++] = fs->zValue;
24402442
az[i++] = fs->zLabel;
24412443
}
24422444
//assert( i==(1+fss->n)*2 );
24432445
}
24442446
--- src/forum.c
+++ src/forum.c
@@ -2434,10 +2434,12 @@
2434 az = fossil_malloc(sizeof(az[0]) * ((1 + fss->n) * 2));
2435 az[i++] = "*";
2436 az[i++] = "Any status";
2437 for( j = 0; j < fss->n; ++j ){
2438 const ForumStatus * fs = &fss->aStatus[j];
 
 
2439 az[i++] = fs->zValue;
2440 az[i++] = fs->zLabel;
2441 }
2442 //assert( i==(1+fss->n)*2 );
2443 }
2444
--- src/forum.c
+++ src/forum.c
@@ -2434,10 +2434,12 @@
2434 az = fossil_malloc(sizeof(az[0]) * ((1 + fss->n) * 2));
2435 az[i++] = "*";
2436 az[i++] = "Any status";
2437 for( j = 0; j < fss->n; ++j ){
2438 const ForumStatus * fs = &fss->aStatus[j];
2439 /* Potential TODO: skip any entries for which there are no
2440 ** forum posts with a status=${fs->zValue} tag. */
2441 az[i++] = fs->zValue;
2442 az[i++] = fs->zLabel;
2443 }
2444 //assert( i==(1+fss->n)*2 );
2445 }
2446
+4 -2
--- www/forum.wiki
+++ www/forum.wiki
@@ -442,11 +442,13 @@
442442
the associated status. This can be used to style the statuses
443443
in the site skin using CSS selectors such as<br>
444444
<tt>body.cpage-forum div.forumPosts tr&#91;data-status="open"]</tt><br>
445445
Because there is no default status list, no predefined styles
446446
are applied.
447
- * The forum list shows the "label" value of the current status.
447
+ * The forum list shows the "label" value of the current status and
448
+ a selection list of available filters. It elides the status column
449
+ when filtering on a specific status.
448450
* The root of each thread, when selected, gets a new UI control for
449451
displaying or editing the status, depending on permissions.
450452
451453
A list with only a single entry is treated as empty, the justification
452454
being that if there is only one option then the UI does not need to be
@@ -464,14 +466,14 @@
464466
which has no <tt>status</tt> tag, or has a <tt>status</tt> tag value
465467
which is not in that list, is assumed for most purposes to have the
466468
value of the first entry in the list.
467469
* The tag is applied only to the first version of any given post. The
468470
UI ensures that the tag is applied to the proper post, even when
469
- it is rendering a newer version.
471
+ rendering a newer version.
470472
471473
The UI will eventually offer the ability to filter the post list by
472474
status.
473475
474476
Caveat: a "closed" status is not recommended because it's easy to confuse with
475477
the <a href='#close-post'>"closed" tag feature</a>, which behaves considerably
476478
differently and predates that "status" tag support by about three years. The
477479
"closed" semantics cannot be trivially consolidated with those of "status".
478480
--- www/forum.wiki
+++ www/forum.wiki
@@ -442,11 +442,13 @@
442 the associated status. This can be used to style the statuses
443 in the site skin using CSS selectors such as<br>
444 <tt>body.cpage-forum div.forumPosts tr&#91;data-status="open"]</tt><br>
445 Because there is no default status list, no predefined styles
446 are applied.
447 * The forum list shows the "label" value of the current status.
 
 
448 * The root of each thread, when selected, gets a new UI control for
449 displaying or editing the status, depending on permissions.
450
451 A list with only a single entry is treated as empty, the justification
452 being that if there is only one option then the UI does not need to be
@@ -464,14 +466,14 @@
464 which has no <tt>status</tt> tag, or has a <tt>status</tt> tag value
465 which is not in that list, is assumed for most purposes to have the
466 value of the first entry in the list.
467 * The tag is applied only to the first version of any given post. The
468 UI ensures that the tag is applied to the proper post, even when
469 it is rendering a newer version.
470
471 The UI will eventually offer the ability to filter the post list by
472 status.
473
474 Caveat: a "closed" status is not recommended because it's easy to confuse with
475 the <a href='#close-post'>"closed" tag feature</a>, which behaves considerably
476 differently and predates that "status" tag support by about three years. The
477 "closed" semantics cannot be trivially consolidated with those of "status".
478
--- www/forum.wiki
+++ www/forum.wiki
@@ -442,11 +442,13 @@
442 the associated status. This can be used to style the statuses
443 in the site skin using CSS selectors such as<br>
444 <tt>body.cpage-forum div.forumPosts tr&#91;data-status="open"]</tt><br>
445 Because there is no default status list, no predefined styles
446 are applied.
447 * The forum list shows the "label" value of the current status and
448 a selection list of available filters. It elides the status column
449 when filtering on a specific status.
450 * The root of each thread, when selected, gets a new UI control for
451 displaying or editing the status, depending on permissions.
452
453 A list with only a single entry is treated as empty, the justification
454 being that if there is only one option then the UI does not need to be
@@ -464,14 +466,14 @@
466 which has no <tt>status</tt> tag, or has a <tt>status</tt> tag value
467 which is not in that list, is assumed for most purposes to have the
468 value of the first entry in the list.
469 * The tag is applied only to the first version of any given post. The
470 UI ensures that the tag is applied to the proper post, even when
471 rendering a newer version.
472
473 The UI will eventually offer the ability to filter the post list by
474 status.
475
476 Caveat: a "closed" status is not recommended because it's easy to confuse with
477 the <a href='#close-post'>"closed" tag feature</a>, which behaves considerably
478 differently and predates that "status" tag support by about three years. The
479 "closed" semantics cannot be trivially consolidated with those of "status".
480

Keyboard Shortcuts

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