Skip to content

Fix #5511: refactor wiki lists to use bbcode#6858

Open
WhatzGames wants to merge 6 commits intoRevolutionary-Games:masterfrom
WhatzGames:5511_refactor_list_to_use_bbcode
Open

Fix #5511: refactor wiki lists to use bbcode#6858
WhatzGames wants to merge 6 commits intoRevolutionary-Games:masterfrom
WhatzGames:5511_refactor_list_to_use_bbcode

Conversation

@WhatzGames
Copy link
Copy Markdown

Brief Description of What This PR Does

Refactoring to use the bbcode for unordered lists inside the Thriveopedia.
With that I also saw some improvements towards the StringBuilder usage while generating the sections.
Each of the changes are done in separate commits, so it's easier to distinguish between the two.
Should you not want the latter, I'll gladly take the changes back.

Related Issues

closes #5511

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@revolutionary-bot
Copy link
Copy Markdown

Thank you for contributing to Thrive.

Before your contribution can be accepted, you need to sign our CLA.
You can sign it, and find more info about it, here: https://dev.revolutionarygamesstudio.com/cla

Once your contribution has been accepted you can ask to be included in the credits (https://wiki.revolutionarygamesstudio.com/wiki/Team_Members) and you can apply to join the team and use this work as a sample: https://revolutionarygamesstudio.com/application/

@WhatzGames WhatzGames force-pushed the 5511_refactor_list_to_use_bbcode branch from c2ebf68 to fceaf81 Compare April 7, 2026 09:06
@hhyyrylainen hhyyrylainen added this to the Release 1.1.0 milestone Apr 7, 2026

ConvertParagraphToBbcode(paragraph, bbcode);
return bbcode.ToString();
// ordered lists have not been required so far and other tags are invalid in the context of a list
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be fine to for now just make ordered lists also use the same code as unordered lists so that this doesn't blow up unexpectedly some time in the future.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you accidentally still left this comment here that should be removed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is literally just switching to use [ol] instead of [ul], I've now covered a proper implementation for ordered lists.

@hhyyrylainen
Copy link
Copy Markdown
Member

I had a few initial comments about tweaking some small stuff here. Once those are taken care of I'll run this code and see what the results look like in the game.

- use default bullets
- also cover ordered lists
- wrap bigger cases in brackets
Copy link
Copy Markdown
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested in game this now and it almost works for all pages. For some reason, though the Microbe Stage wiki page gets messed up with text missing and multiple lists getting combined into one.

Here's the section that doesn't work correctly: https://wiki.revolutionarygamesstudio.com/wiki/Microbe_Stage#Gameplay

Lux section is missing and the Oxygen section has eaten up all of the other compounds:

Image

So that bug needs fixing, but then I think this is ready as I did not notice any other problems with the Thriveopedia text.


ConvertParagraphToBbcode(paragraph, bbcode);
return bbcode.ToString();
// ordered lists have not been required so far and other tags are invalid in the context of a list
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you accidentally still left this comment here that should be removed.

@WhatzGames WhatzGames force-pushed the 5511_refactor_list_to_use_bbcode branch from c9c8c99 to 8e89168 Compare April 7, 2026 22:22
@WhatzGames
Copy link
Copy Markdown
Author

Bug is fixed as far as I can tell and I removed the comment (I knew I removed it, but I guess I reverted it by accident lol)
I've looked over the pages in game as well and all look great to me.

One thing to note though: the page you linked contains h4 elements, which are currently ignored. Therefore there's no clear separation between the Physical Conditions, Atmospheric Gasses and Compounds.
I've not checked other pages for this, but there might be more with that issue.

@hhyyrylainen
Copy link
Copy Markdown
Member

One thing to note though: the page you linked contains h4 elements, which are currently ignored. Therefore there's no clear separation between the Physical Conditions, Atmospheric Gasses and Compounds.
I've not checked other pages for this, but there might be more with that issue.

Could very well be. Unfortunately the Thriveopedia and our wiki hasn't gotten that much work put into it after the initial implementation. Would be nice to get a fix for that as well, but that should probably be a different PR.

Copy link
Copy Markdown
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what all the changes you just did where for, but I noticed a new problem, there's now no spaces but before a compound type, for example the text WIKI_BINDING_AGENT_EFFECTS now has a "bug" where [b]+2[/b] [thrive:compound type=\"atp\"][/thrive:compound]. has the space removed between [/b] and [thrive:compound which makes the page look unintended in the Thriveopedia.

And also on the bioluminescent vacuole page, there's now this issue:

Image

So I think that unfortunately some of your new compound handling changes have broken things.

{
return element is IHtmlSpanElement
{
Attributes: [{ Name: "typeof" }],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is especially unfamiliar looking to me. Could you maybe add a comment inside this method to explain what it does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

Switch Thriveopedia lists to use the bbcode list tag

4 participants