Read-only hint on index view page

Created on 19 March 2024, 4 months ago
Updated 12 April 2024, 3 months ago

Problem/Motivation

When an index is set to "read-only", there is no indicator on the index view page, that gives a hint.
The only other indicator is that the buttons to reindex are missing.

Unfortunately my index wasn't set to read only by hand, but because of an migration post import event. So I was just wondering why there are no buttons to reindex. It took me a lot of time figuring out that the cause was the read only state of the index.

Therefore it would be nice to have an indicator that states directly that this index is read only.

Steps to reproduce

1. Set index to read-only
2. Look at the index view page
3. Apart from the missing buttons to reindex, there is no other indicator that the index is read only

Proposed resolution

Add an additional row to the summary table on the view page that indicates the read only state of the index.

Remaining tasks

Please review my changes

✨ Feature request
Status

Fixed

Version

1.31

Component

User interface

Created by

🇩🇪Germany kulmjens

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @kulmjens
  • Status changed to Needs review 4 months ago
  • 🇩🇪Germany kulmjens
  • Pipeline finished with Success
    4 months ago
    Total: 1260s
    #123272
  • 🇦🇹Austria drunken monkey Vienna, Austria

    drunken monkey → made their first commit to this issue’s fork.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    Thanks a lot for the suggestion, makes sense!
    However, it seems Core uses the spelling “read-only” (with hyphen) in the vast majority of cases, so we should go with that, too. I also updated the existing strings (one of them, unfortunately, user-facing).

    Then, I think it makes sense to also add a note to the progress bar, and to hide the “Cron batch size” row (since, in fact, nothing will be indexed during cron runs).
    I also moved the new row way up, right beneath “Status”.

    Finally, you made me realize that the CSS classes we’re using in those tables (ok/warning/error) are actually ignored by at least the Claro default admin theme. I’d guess they were probably used by Seven, which is why we added them, but we failed to notice that Claro changed that. The new classes are the color-* classes. So, I updated also all existing rows that use either the warning or error class to also have the corresponding color-* class. (I kept the existing classes, too, in case someone’s custom admin theme relies on those. Not quite sure about that, though.)
    In any case, the index being read-only might be something we want to warn people about so they do notice it, but it’s definitely not an error (generally speaking, that is), so I downgraded the new message accordingly.

    Please tell me what you think about these changes!
    I realize that some are a bit out of scope, but I think it’s OK to make this a general “lets improve the ’View’ tabs a bit” issue.

  • 🇩🇪Germany kulmjens

    Thank you very much for your changes!
    For each of your points I give a thumbs-up.
    I applied the changes, tested them a bit and they work like a charm.

  • Status changed to Fixed 3 months ago
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Great to hear, thanks for reporting back!
    Merged. Thanks again!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024