Bulleted Lists

Be sure to read and follow the guidelines for our forums.

May 24, 2025 9:12 pm
Continuing from the discussion in the 'Game Wiki' thread [ref]:
Keleth says:
(in other thread) ... I've updated staging to allow lists as ... please test it out ...
The erroneous blank lines seem to be gone.

This seems to have broken the ability to nest lists. It was working yesterday, but now we get a [ list] and [ /list] line and the original list continues as though they were not there.

I should have take screen-shots, but you can see this on the example post on staging [ref].

The nested lists now show up like this:
https://i.imgur.com/66ZZ5ds.png

'C outer' is strangely indented and spaced, and the [ /list] appears to be the final one, outside the list, so it is unclear which one is closing the list.

[list]
[*] A outer
[*] B outer
[list]
[*] A inner
[*] B inner
[/list]
[*] C outer
[/list]

Keleth says:
(in other thread)... [ list=a|A|i|I,# ] - as above, but provide a number to start ...
I believe the syntax is to denote the starting number by using that number as the signifier, not as a separate number. But the bbCode 'spec' is very loose.

The most common way to do this is [ list=2] or [ list=b] or [ list=ii] to start at the second number. This has the benefit of using the same format to specify numbers as letters as numerals, but it does have the downside that the code needs to interpret all the options and turn them into a number for the HTML. If it is much easier to look for a number and use that for the `start=` value, then this looks like a very workable solution.
Keleth says:
(in other thread) ... Please also check out other pages to make sure the CSS I changed to get lists working doesn't break other stuff. ...
I have not seen any other problems from the changes. But I don't know what CSS you changed (just version numbers?). Everything else seems to be working as it used to.
May 24, 2025 11:26 pm
vagueGM says:
broken the ability to nest lists
Regex gonna regex. I'll look at it.
vagueGM says:
I believe the syntax is to denote the starting number by using that number as the signifier, not as a separate number. But the bbCode 'spec' is very loose.
I looked and found 4 different syntaxes, so I just made one that made sense to me. If anyone has a preference, I'm open to it. We can always do something like
Quote:

[list=(a|A|i|I|1) start=#]
vagueGM says:
The most common way to do this is [ list=2] or [ list=b] or [ list=ii]
Yah, if I wanna do it where you put in the start point in the format you want it to run, that'll require a bit more work, basically some sort of code that determines what format you're using and what the start value stands for. The HTML spec is the number of the value you're starting at, so I went with that, in a compressed format. If we'd prefer a more readable/approachable format, I can do it, it'll just take longer. And has potential flaws. Is list=i a roman numeral list or a alphabetic list starting at i?
vagueGM says:
I have not seen any other problems from the changes. But I don't know what CSS you changed (just version numbers?). Everything else seems to be working as it used to.
I changed the reset behavior for all lists (not just posts) as well as padding for lists. This means anywhere there's a list on the site, it could have potentially broken. I don't think it has, but I always add that caveat.
May 24, 2025 11:53 pm
Keleth says:
... Regex gonna regex ...
Are you using straight regex or the nestedReplace function? I only know it from Adam mentioning it could help in this sort of situation [post].
Keleth says:
... I looked and found 4 different syntaxes ...
Unfortunately true. :(
Keleth says:
... potential flaws. Is list=i a roman numeral list or a alphabetic list starting at i? ...
Very good point. Sticking with =format,startValue is looking like the safest bet. It even works with [ list=2] with 2 being both the format and the start, so it is pretty nice.
May 25, 2025 12:53 am
vagueGM says:
Are you using straight regex or the nestedReplace function? I only know it from Adam mentioning it could help in this sort of situation [post].
That's it! I forgot to make it recursive!
vagueGM says:
Very good point. Sticking with =format,startValue is looking like the safest bet. It even works with [ list=2] with 2 being both the format and the start, so it is pretty nice.
Yah, I made sure to set that up, because I felt list=1,4 was too verbose.
May 25, 2025 9:12 am
Will this be added to the BBcode Guide thread?
May 25, 2025 3:26 pm
@vagueGM Nesting should be fixed, as well as any list marker display cutoffs.
May 25, 2025 3:28 pm
Keleth says:
@vagueGM Nesting should be fixed, as well as any list marker display cutoffs.
The previous test page does not load properly anymore. Can you see https://staging.gamersplane.com/forums/thread/21901/?p=1818483#p1818483?
May 25, 2025 3:30 pm
All pages seem to be broken after the first post, second post on a page is empty and then the page ends.
May 25, 2025 4:40 pm
Fixed that bug
May 25, 2025 4:40 pm
That looks great now.
May 25, 2025 4:45 pm
I'm hoping at least one other person checks it out, and if it looks good, I'll put the code live this evening.
May 25, 2025 4:47 pm
In terms of formatting, maybe the numbers should be bolded?

This CSS does it for me:

ol > li::marker {
  font-weight: bold;
}
May 25, 2025 4:53 pm
Bolded markers are definitely a design choice. Some people like them, some don't. I could add a flag for that to make it optional?

Additionally, @Chalrytharendir points out that the padding is insufficient for larger roman numerals. So we have 3 choices as far as I see:

1) Write logic that tries to figure out how many characters in a marker and add padding appropriately (this could be pretty tough, at least for a quick fix)
2) Add left padding sufficient to handle bigger numbers always, but leaving it intended a fair bit (something about 3x the current value)
3) Add left padding if it's a roman numeral list, but then different lists would look differently.
May 25, 2025 5:09 pm
Keleth says:
... Bolded markers are definitely a design choice. Some people like them, some don't. I could add a flag for that to make it optional? ...
Maybe if it is not too much work and does not clutter up the bbCode. It is only an issue when using complex nested lists. In the first screenshot, below, the inner list is easy to lose, in the second the bold number make it a little easier to find, but not enough to justify it if some don't like it.

https://i.imgur.com/YWyOOrG.png
https://i.imgur.com/B7Xldtp.png

Keleth says:
... the padding is insufficient for larger roman numerals. ...
Actually it looks insufficient for all lists that need more than two places. [ list=99] gives the numbers 99, 00, 01, ...
May 25, 2025 5:14 pm
@Keleth Could you add an argument to give the user control over the padding? Use the current for default, then user variable changes it by a factor of x.
[ list=type,start,paddingfactor]
That way most use cases work by default, but for edge cases that get cut off, the user can fix it themselves.
Last edited May 25, 2025 5:34 pm
May 25, 2025 8:27 pm
Or what about something like this?
< ol style="list-style-type:upper-roman; list-style-position:inside;" >
< li style="text-indent:-1em; margin-left:1em;" >

I think it would something like this:
[ +- ] Example
The dots of each item don't always line up, but the numerals are never cutoff.
May 25, 2025 8:36 pm
Chalrytharendir says:
... list-style-position:inside;
...
list-style-position:inside; does weird things with the alignment and indentation. We should think about reserving this for lists that are going to break because of too long items (†) and not as a default which breaks all lists.

((†) Roman numerals are more common on an second level list, where there is already space to the left.)

This is also caused by something in reset.css, excluding that from a page fixes these list problems, so it may be worth looking at what reset.css is doing and patching out the bits that break things.
May 26, 2025 12:33 am
I've been playing around with spacing, and I found a value I like for non-roman numerals. It works for numbers < 10000, but falls apart at roman numerals with more than 4 characters. The problem is because the box that contains the post itself doesn't allow content larger than the box to show (a safety measure for an image too large, or something like that).

So I see one of two solutions: a flag you can add to the list to allow for approximately 1.5x spacing or 1.5x the spacing for roman numeral lists.
May 26, 2025 6:42 am
Keleth says:
... So I see one of two solutions: ...
'Solution' three: Accept that long lists of roman numerals are going to be a problem for many reasons and leave it as is?
May 26, 2025 10:32 am
Solution usually implies solving the problem, heh, but yes, that is a third possible outcome.
load next

You do not have permission to post in this thread.