(This is the third post of a series of “fixing things” posts that give some insight into the kinds of bugs and issues we encounter, and how we investigate and solve them. Previous in this series: Fixing Things 1, Fixing Things 2)
This week we have been working on two things. We finished a significant improvement for the World of Darkness character sheet which will be showcased in next week’s blog post. And we worked on fixing several non-critical issues.
Issues come in many shapes and varieties. Some are critical, and some are not. Some are quick to fix, and some are not.
We always try to fix the critical issues quickly regardless of how long it will take, often striving for “as fast as humanly possible”. We want your campaign to be available to you at all times.
But some issues, as you will have surmised, are non-critical. And some of these are also not a quick fix. And those non-critical non-quick-fix issues are what we worked on this week. To give you an idea of what is going on beneath the surface, I will highlight two of the more interesting of these issues to give you an idea of what was happening, and how we tackled those issues.
Incorrectly numbered lists
Some of you might have spotted something like this happening:
Note the numbering that makes a jump from 1. to 3. in a single step, while there is no number 2. anywhere in sight.
We discovered this a while ago. After a short investigation we found that the issue was not really a quick fix — the cause of this issue is a mismatch between how we store the lists you enter, and how we must display them.
Internally, RPGpad does not store text exactly as you entered it. It instead stores the text in an “intermediate format” that allows us to keep track of the meaning of the text. Unfortunately, the structure of this intermediate format does not match the structure of the output we need to produce so your browser can correctly display the list.
Since the root cause was a mismatch in a core part of RPGpad, we discussed the best way to fix this. We finally boiled down the choices to “fix the display code” or “fix the intermediate format code”. Both had a list of pros and cons, and neither was clearly the correct choice. In the end we settled on “fix the display code.”
Fixing the display code was not complex, it just took time. After fixing the code we are certain that we made the right call. All your numbered lists will now have correct numbering!
Search keeps flipping
Another issue we tackled this week was a rather humorous case of ‘computers can do very strange things’. On the right side, just below the menu, we have the quick search. This allows you to quickly search for a character, location, or thread on your campaign.
When the quick search has only a single result, it is supposed to always select that result. By always selecting the single result, just hitting the Enter key once you find what you are looking for should navigate you to that page.
However, as can be seen in the image to the left, the quick search had other ideas.
Every letter it changed it’s mind about whether the single results should be selected or not. This made typing half a name and hitting Enter very random. Half the time you would go to the page for the result, and the other times you would end up in the deep search screen, finding the same page.
The reason the quick search kept changing its mind has to do with the way it decided to clear its selection.
After every search, which effectively means ‘after each letter’ since the search happens for each letter you type, the quick search checks if there is a selected result:
- If there is a selection, it clears the selection — This makes sense, as you don’t want your old selection to stick around if your search results change.
- If not result is selected, it counts how many search results there are. If there is only a single result, that result will be selected — This makes sense, as we want to make it easy to navigate to the single match you found.
So, following the panels in the image:
- After typing the
d
inbrid
, it sees that there is no selection, and because there is only a single result it selects it. - You type the
e
. The quick search sees that there is a selection: so it clears the selection. - Then on the
w
, it again sees that there is no selection… And we’re back in the original situation, flipping the selection again and again.
While somewhat funny once you understand what is happening, we want our quick search to be consistent in what it does. For some players (myself included) the quick search is a major way we navigate through the campaign. We want to make sure that finding things in your campaign is as smooth as possible.
To fix the quick search, we rewrote parts of code to make it a little faster, and to fix the inconsistencies in its behaviour. You will find the exact details of the changes and fixes in this week’s changelog.
And, as always, we’re very happy to hear your thoughts on changes, new features, and any other feedback in our community forum.