Fix #5511: refactor wiki lists to use bbcode#6858
Fix #5511: refactor wiki lists to use bbcode#6858WhatzGames wants to merge 6 commits intoRevolutionary-Games:masterfrom
Conversation
|
Thank you for contributing to Thrive. Before your contribution can be accepted, you need to sign our 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/ |
c2ebf68 to
fceaf81
Compare
Scripts/WikiUpdater.cs
Outdated
|
|
||
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I think you accidentally still left this comment here that should be removed.
There was a problem hiding this comment.
Since it is literally just switching to use [ol] instead of [ul], I've now covered a proper implementation for ordered lists.
|
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
hhyyrylainen
left a comment
There was a problem hiding this comment.
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:
So that bug needs fixing, but then I think this is ready as I did not notice any other problems with the Thriveopedia text.
Scripts/WikiUpdater.cs
Outdated
|
|
||
| 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 |
There was a problem hiding this comment.
I think you accidentally still left this comment here that should be removed.
c9c8c99 to
8e89168
Compare
|
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) One thing to note though: the page you linked contains |
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. |
hhyyrylainen
left a comment
There was a problem hiding this comment.
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:
So I think that unfortunately some of your new compound handling changes have broken things.
| { | ||
| return element is IHtmlSpanElement | ||
| { | ||
| Attributes: [{ Name: "typeof" }], |
There was a problem hiding this comment.
This is especially unfamiliar looking to me. Could you maybe add a comment inside this method to explain what it does?
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.
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)
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.