Release 1.6.11

This minor NarraFirma release contains several slight prettifications. All of them were occasioned by my going over all the images from NarraFirma in my new edition of Working with Stories to make sure they are clear and understandable. I didn’t like how some of the graph fonts and spacings looked in the book, so I changed the software to make them look better – for me and for you. There’s nothing like a different context to make you see things differently!

No more shouty graph titles. I changed all of the graph titles to lower case. Now they will look exactly the way you entered them. Ten years ago I thought upper-case titles made NF’s graphs look more professional. Now I think they are ugly and distorting. If you liked the upper-case titles, you can put them back. On the “Configure catalysis report” page, in the advanced options, under “Custom CSS,” add this line:

.narrafirma-graph-title { font-variant-caps: small-caps; }

Bigger label fonts. I increased the size of every font on every graph – not a lot, just a little – for better readability. You can override all of these new settings using the Custom CSS feature (but I think you won’t want to).

More no-count graph options. There has long been an option to hide the story-count numbers on contingency graphs. I’ve now added the same options for bar graphs and histograms. For histograms, you can set the option separately for single and subgraph (histogram set) versions.

Better bar-chart count label. I changed the bar-chart y-axis label from “Count” to “Number of stories.” The things in the columns of bar graphs in NF are always stories, even if the questions are about people. I think this labeling might be more clear for the people who look at your graphs. This new label also draws attention to the fact that the little alternating-color boxes on the graph are stories, which (in NF) you can hover over and read. (I think a lot of people don’t realize that.) Note that if you previously entered a catalysis-report translation for the “Count” label, and you don’t create a new translation for “Number of stories,” your graphs will still show your old translation of “Count.”

This example shows all four of the above changes (better title, bigger fonts, hidden column counts, changed y-axis label):

Example of improved bar graph

Bold axis names. I decided to draw all axis names (x and y) on all graphs in bold. I noticed that they were a little too easy to overlook or forget.

Better positions for subgraph names. For histogram sets and scatterplot sets, I had originally put the names of the subgraphs (e.g., Feel about: happy) in the axis labels. That never looked good to me! But I had to do it because otherwise the subgraph titles were not included in the exported PNG or SVG files (because they were outside the SVG structure). I have now fixed that, by drawing titles for subgraphs within the SVG stucture.

Boxes around subgraphs. I felt that subgraphs (in histogram sets and scatterplot sets) were easy to confuse with each other, so I put thin little boxes around subgraphs. Now, I think, it is more clear what each smaller graph shows.

This image shows the previous three changes for histogram sets (bold axes, subgraph titles, boxes, plus no column counts):

Improved subgraphs for histogram sets

This image shows the previous three changes (bold axes, subgraph titles, boxes) for scatterplot sets:

Improved subgraphs for scatterplot sets

 

A few other tweaks:

  • On the “Configure catalysis report” page, I changed the “tables” graph type to “contingency tables.” That’s less confusing. It still says “tables” on the “Type” column in the “Explore patterns” page. That’s harder to change.
  • I increased the default graph width (which drives every other size) from 800 to 900 pixels. Screens are bigger now. You can set any graph width (and height) in the advanced options, but the default is a little higher now.

Font scaling bug fixed. Lastly, I fixed a longstanding bug in the PNG file export of graphs. It’s not a fix, really. It’s just a workaround for a bug in the (very old) version of the canvg library NarraFirma uses to create PNG files from SVG (vector) graphics. The fonts on those files have always come out smaller than they should. So in this version I brute-force increased the font sizes in all PNG-exported graph images. (I had added a user-supplied “percentage modifier” to increase font sizes in reports a long time ago, but I suspect that few users have noticed it.)

The real fix for this problem will be to update the canvg library version we are using. Canvg is one of several libraries we are using in out-of-date versions from 2015 (or so). We would like to update all of them. However, updating each one will require us to update each piece of library-calling code to comply with current usages. We will also need to do a lot of regression testing to make sure we haven’t broken anything (for new or legacy projects). I hope we will eventually find the time to do it. In the meantime, NarraFirma still works fine with the old versions of the libraries, and Paul says HTML is pretty strongly backwardly compatible, so we should be fine. Probably.

As always, if you find any bugs – or find anything in NF confusing or hard to use – please tell me on the GitHub issues page.

Release 1.6.10

This minor NarraFirma release adds a few new features and fixes a few bugs.

Your win-win proposal(s)

I realized that NF did not give you an opportunity to write and record win-win proposals: things you want to say to potential project participants. So I added a section with some questions to help you do that. You will find it in the “Describe participant groups” page.

Slightly easier translation options

A user reported a bug, and while we were fixing it, we noticed that they had entered a translation language, entered some translated texts, then changed the name of the language. Because the translation facility in NF relies on a simple lookup function linked to a language name, they then had to re-enter all of their previously translated texts. That seemed like a pain. So I added functions to rename and remove language entries en masse.

On the “Translate story forms” page, you can find these new functions (“Rename language” and “Remove language”) in the list of things you can do next to the “Do it” button. Because these functions reach into and change dictionary entries across all of your translated story-form texts, I suggest that you export your translation dictionary before you use them, in case you make a mistake (or I did).

On the same page, I also changed the counts of translated texts shown below the “additional languages” box. Any translations that are not visible on the page because you renamed or removed a translation language in the “additional languages” box (without using the rename/remove functions) are now counted and marked as “hidden.”

Better error reporting for renamed or removed questions

The user who reported the bug also renamed a few questions, causing some rather cryptic errors to appear when their story form was being shown. I improved the clarity of the error messages.

I also added a flag to the question lists on the “Build story forms” page. The new flag (“NOT FOUND in project”) tells you that a question you have included in your story form no longer exists in the project (because you have renamed or removed it). You should remove these questions from your form (press the > arrow), because until you do, you will keep seeing errors in your console every time you use the form.

Now for the bug

This was a pretty big bug, but it only appears in a very specific situation. This user (the same one as above) created two choice questions.

  • One had numbers for answers: 1, 2, 3, etc
  • Another had number ranges for answers: 1-25, 26-50, etc

They used these questions in a form, associated it with a story collection, then added some translations to it. Then they tried to update the form connected to the story collection. NarraFirma spat out an error message and refused to update or display the form, stopping them from collecting any more stories.

After some investigation, we discovered (to our surprise) that the hash method we were using to verify the security of the transmitted data was slightly different whether it was PHP doing it (within the WordPress server) or Javascript doing it (in the browser client). More specifically, the JSONification method in the Javascript code sorted their data structure differently than the most recent versions of PHP sorted it. That was what caused the error message: sorted data structures (thus hashes) that didn’t match. We never saw it happen before because to see it you had to have two sets of entries that might or might not sort together (1, 1-25, 2, 26-50, 3) or separately (1, 2, 3, 1-25, 26-50).

So Paul changed the Javascript method to bring it into synch with the PHP method. It fixed our user’s bug, and we tested the change with some legacy projects, so we think it will not cause any problems for anyone.

NF is getting out of date

That bug happened because the NF code is pretty old and is getting out of synch with the rest of the web. We really ought to go over it with a fine-toothed comb to bring it up to date with respect to a lot of things that have changed since we first released it in 2015. We are probably not going to be able to do that unless we get more funding to work on it.

If you want NarraFirma to continue to be a useful tool, please make a donation to support it. Without more donations, the best we can do is to fix each problem as our users find it. We intend to do that for as long as we can.

A few smaller bugs

We also discovered that:

  • There were a few places in our PHP code where there should have been return statements. It probably didn’t create any problems, but it’s better now.
  • The Node.js site admin page was confusing in a few places. We fixed it.
  • We improved another error message that appears when a question is missing.

In general we are always trying to make our error messages more clear, so you know what is going on. If NF ever does things you think it should not do, look at your browser console! There is usually something written there.

As always, if you find any bugs – or find anything in NF confusing or hard to use – please tell me on the GitHub issues page.