Join the R Community at ShinyConf 2023

User Interface Design: Talk To The User In Their Language


User Interface (UI) design can make or break the User Experience (UX) of your Shiny apps. Learning to talk to the user in their language can help.

It’s been nearly 30 years, yet Jakub Nielsen’s 10 usability heuristics for UI design still hold up as the backbone for good interfaces. Today I want to talk about principle 2 – Match between the system and the real world.

The information should appear in the usual way for the user. Conditionally, this can be divided in:

  • Accordance to the mental model
  • The usual language

This is what helps the user readily find information and navigate an interface of any complexity.

What is the mental model and how to apply it for UI Design?

Let’s perform a short exercise.

Close your eyes and imagine how you see time moving. At the highest level of abstraction, we tend to have a high probability of indicating the past on the left, the future on the right, and the flow of time from left to right. This sinistrodextral (fancy term for reading left to right) view is often found in graphs and diagrams.

Gantt chart showing date progression from left to right.

By the same logic, one can define the positive as the top and bottom, respectively. This can be expressed in the Y axis as negative and positive values:

Bar chart showing negative and positive values at bottom and up, respectively.

Linear chart showing date progression from left to right and amount bottom to up.

Here is a matrix for a general expression of the mental model:

Naturally, this matrix is somewhat unique to the western hemisphere, it is not universal and each culture has its own representation.

It is therefore important to calibrate your presentation system according to the target user’s matrix before starting the design.

Why is mental modeling important for UX design?

Let me explain why mental modeling is important with a personal experience:

A couple of years ago I was in Albania and needed to rent a car. I won’t name the brand to avoid making anti-advertisements, but it was a fairly modern vehicle. Being modern, one might expect similar design elements we’re all accustomed to.

Build a Shiny UI/UX with a familiar touch using Microsoft’s Fluent library. Learn how with Appsilon’s {shiny.fluent} video tutorial.

This particular night, I was traveling on a windy, mountain road without any side lighting. I had to frequently switch from low beams to high and back again. Now, in this car, to turn on the high beams, I needed to pull a lever toward myself in order to see farther. 

This minor detail with an inverted action had a tremendous effect on my safety. I had to rely on an unintuitive manual input (pulling the lever) over and over again in order to see the road ahead and push the lever back to avoid blinding oncoming cars. 

But why did this happen? Let’s look at it. How do you show far to near? More likely than not, you’ll do so with a hand gesture out and toward yourself, respectively. This view is basic and subconsciously processed. So in order to control the levers in this non-intuitive way, I had to tap into additional mental resources that were already being used to navigate unfamiliar terrain. 

If we’re talking about a user interface, then such examples are rare where the result depends on the speed of the reaction. 

As a rule, not matching the emotion matrix will increase the user interaction time with the system at best, and at worst, the user will leave. Let’s look at typical user interface examples next. 

Bad UI design: fighting logic in mental models

In this modal window, the target button is on the left, and the “cancel” is on the right. This order goes against the typical perception of procedures (for a western audience). 

Think about how you sign documents or read a paper book: the target action, whatever it could be, put your signature or turn the page will always be on the bottom right corner as a logical end. This view is based on a study by the 1950s psychologists Paul Fitts and Charles Seeger, which reveals the essence of Stimulus-response compatibility.

I recommend diving deeper into the concept here: Natural matching and stimulus-response compatibility in user interface design.

Good UI design: flowing with logic in mental models

A horizontal progress bar helps users assess where they are in current time and most importantly helps to estimate how much time is left before completing the task. By the way, some modern landings use horizontal direction instead of vertical for good storytelling or structure rethinking (e.g., Kwokyinmak, Canals-amsterdam, Royal Oak).

A common example of a horizontal progress bar.

User language

Terminology and voice of tone must be relevant to the user’s expectation and level of experience. Otherwise, the user won’t understand what you are trying to say. 

Why is it important

The designer and developer are not equal to the user.

I mean this in the sense that our expectations and knowledge of the system are wholly different. A common problem in the UI design process is the assumption that the end user knows the application as well as the designer/developer. This is never the case.

Want beautiful, custom styling and layouts? Try {imola} and {shiny.fluent} for professional Shiny app UI.

This problem stems from a higher level of familiarity with the workflow, UI, and hidden features underneath the hood. You might know the system in and out, but your knowledge doesn’t translate to your user – unless you’re a telepath. 

We often find this mistake in error messaging:

Bad error messaging

What we see here is unfriendly and meaningless for users. For developers, this might cut straight to the point and be insightful, but for the average user – it is not.

Regarding the topic of error prevention, this message doesn’t contain acceptable reasons and ways to resolve it from the user’s perspective.

Good error messaging

Here we see clear reasoning and friendly language for the user. And it provides ways to fix it.

To sum up, keep in mind that your user doesn’t have much time to figure out what’s going on and they don’t share your experience. They want a quick solution to resolve the issue.

When in doubt, explain it in the simplest way possible to address the lowest level user (i.e. explain it like I’m 5). This is a good time to address any shortcomings in your own understanding of the issue.

Key takeaways for better User Interface Design

Ignoring the emotion matrix will not have a critical effect in terms of creating apps, but may complicate their use and increase the cognitive resistance ratio.

Conversely, understanding the user’s mental model and application knowledge will give you the ability to make a solution that speaks to users in a native language and encourages adoption.

Should you be using R for enterprise applications? Here are 6 lessons for building Shiny apps.

Moreover, aligning with the user’s mental model gives you a credit of trust. It opens up the user’s ability to perform something complex when asked of them. They will recognize it as anticipation, not as an obligation.

Do you know your user’s mental model? Need help translating your data story to end users? Reach out to the Shiny experts and we’ll show you how to improve your dashboards and applications.