I want to redesign the card info window. Looking for opinions

Goal

I want to redesign the card info window, which can be accessed in Browse, then Ctrl+Shift+i on a card (or via context menu).

Current Design in Anki (latest main build)


Proposed, rough design


  1. The blue row is only shown on hover (I took the color from dae’s profile picture).
  2. The revlog (second) table should look more like the first (regarding the borders and maybe text alignment as well).
  3. The styles are largely copied from the deck options screen. See CSS below.

Blockers

I’ve got a working prototype, but to make this work properly I’d have to modify the html code. This is the only way I see to make the styling better, which in this case actually means making the styling consistent.

E.g. the second “table” (revlog) doesn’t apply the dashed border like in the first table. The reason is that the revlog table consists of a lot of divs, rather than an actual html table.

This means dae might not accept it.

ToDos (in case changes were accepted)

  • Fix card stats table, so that it could be centered, if desired.
  • Fix revlog “table”, to make it an actual html table (which would fix the styling, which is way off currently).

CSS

I don’t have a PR for you to test. But if you use the dev console addon, you can add the following css to achieve my proposed design:

/* TABLE AT THE TOP (CardStats.svelte) */
:root {
    --anki-color: #01bcff;
}

.row {
    margin-bottom: 2rem;
    justify-content: center;
    overflow:hidden; /* Hack. Wrapping the table around a second div would be better. Needed, because the dashed lines otherwise overflow. */
    
    /* Styles below have been copied from the deck options styles */
    box-shadow: 0 3px 3px -2px #14141433, 0 3px 4px #14141424, 0 1px 8px #1414141f;
    background: var(--canvas-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-medium, 10px);
    padding: 1rem 1.75rem 0.75rem 1.25rem;
}

.stats-table {
    margin: 1.5rem 2.5rem;
    border-collapse: separate;
}

th, td {
    padding: 0.25em 0;
}

tr:hover {
    background-color: var(--anki-color);
}

tr:nth-child(4n):not(:last-child) {
    border-bottom: 2px dashed #ccc;
}


/* TABLE IN THE MIDDLE (Revlog.svelte) */
/* 
 * Note: This isn't a real table, just a bunch of divs that look like a table.
 * This does break styling though. If this change would be accepted, and dae
 * would accept rewriting the divs into a table, the styling issues will be
 * fixed. It was supposed to look like the first table.
 */

.revlog-table {
    margin: 1.5rem 2.5rem;
}

.column-content, .column-content > div {
    padding: 0.25em 0;
}

.column-content > div:hover {
    background-color: var(--anki-color);
}

.column-content > div:nth-child(4n):not(:last-child) {
    border-bottom: 2px dashed #ccc;
}



/* FORGETTING CURVE AT THE BOTTOM (ForgettingCurve.svelte) */
.forgetting-curve {
    margin: 1.5rem 2.5rem !important;
}

.forgetting-curve > div.container {
    box-shadow: none !important;
    border: 0;
    border-radius: initial;
    padding: 0;
}

The highlighting/emphasis lines seem strange to me.

  • I don’t know what purpose is served by having the blue-on-hover in the top info. [I expect you could find a color that blends better with the interface – maybe the hover-color from the menus or the Decks list? Or something from Stats?]
  • Similarly, I don’t know what purpose is served by having the dotted underline in the revlog section. [Is that also on-hover?]
  • The division of the top info into sections/bands seems to be done haphazardly. I’m not sure it’s necessary at all, but if it’s going to be happen, the divisions should make sense (i.e., like with like).

As far as everything else – I don’t know what is gained by making this page prettier or more animated, since it’s in the “most users will never see it” category. But if it doesn’t hurt anything [make sure it works well with Reduce motion, Minimalist mode, and Dark Theme] and it doesn’t make support more difficult, I’ll just be “meh” about it.

4 Likes

what about zebra striping instead of this?

I think max-height is useful for the revlog table, given there’s forgetting curve after it now. If you have too many reviews (which some of us do, think filtered reviews), this takes too much space.

2 Likes

I thought zebra stripping looked worse but that might be because I just put #ccc on every odd row.

Anyways, it seems like a change in this window (at least for now) isn’t desired. I’ll thus try to find something else I can work on instead.

Edit:

You mean it should have a max height, then scroll?

Yeah.

Your choice I guess.

I think that could be great from a usability perspective. But it might make things more difficult for support (users are sometimes asked to make screenshots of this list). I’m assuming there’s more margin for error, if users for some reason don’t realize it’s scrollable.

I just don’t want to work on something that’ll be rejected anyways. So far, this topic received 3 votes against and 0 votes for the changes (or similar changes) I proposed.

But if there’s some demand in the future, I’d gladly pick this up.

Make a small PR with minimum changes, a good start might be to just add the borders around revlog and the top stats.

I don’t have a PR for you to test. But if you use the dev console addon, you can add the following css to achieve my proposed design:

What is the dev console addon? Where can I find it to test the changes?

It’s called AnkiWebView Inspector (it’s called dev console on web browsers, sorry for the confusion).

You can find it here: https://ankiweb.net/shared/info/31746032

You can add alternating colors like this.

Yep, that’s the zebra striping sorata was talking about:

I wanted to make it look cleaner, so the dashed lines seemed reasonable.

Anyways; if I decide to work on it in the future, I’ll keep this one in mind.

1 Like

In case this affects design: there’s an upcoming change to split the AnkiDroid Browse screen on Tablets/Chromebooks:

As a future extension, I’d like the right hand panel to show one of:

  • Edit
  • Preview
  • Card Info
2 Likes

Another potential issue with the card info window is cards with a really long history. It’s quite annoying having to scroll down pages every time I want to see the chart.

Some discussion here, before I knew about this thread. I think a more general solution is better than my proposed “fix”.

2 Likes

I specifically wanted you to see my comment here:

What do you think about a scrollable container for the revlog table?

A scrollable container within a scrollable page doesn’t seem like it’d be pleasant to use. Perhaps an alternative would be to crop the revlog and add “Show more” at the bottom to expand it fully

2 Likes