Conversation
StephDriver
left a comment
There was a problem hiding this comment.
General reaction 🥳 💃 🍹
But some small specific niggles:
1. security wrapper not working (as per discussion).
Notes from the UI manager/settings/images
2. some images that show up in the journal image settings, don't have edit alt text options,
but there is no explanation as to why - so this will confuse users. In this example, the default large image has a button, but the press image override does not. The favicon and default profile image similarly have no alt-text button on my install.
3. The alt text is saved on the "save alt text" button in the popup, but there is also a 'submit' button at the end of the page.
Users may think they've saved changes they haven't - File changes are only actioned on submit, making it possible here to select a file, edit alt text and save it, then click away from teh page without submitting (the submit button may be off screen at bottom of page) and only have saved the alt text, while the file has not actually been added.
Users may think they have undone changes that have actually been saved - the alt text edit popup once saved is saved, users are not warned that there is no way to undo a mistake here and they are accustomed to being able to click back off a page to cancel their edits.
4. As page links to the documentation, that documentation either needs to be updated to include alt-text instructions, or there needs to be a second link to additional instruction on this new alt-text functionality.
Other
5. Profile image missing 'edit alt text' option
/profile/ one can upload a profile image, but no edit alt text button.
6. Issues page cannot load
{% get_alt_text obj=issue file_path=issue.cover_image.url as alt_text %} 7. Likewise collections
Invalid block tag on line 20: 'get_alt_text', expected 'empty' or 'endfor'. Did you forget to register or load this tag?
alt="{% get_alt_text obj=collection file_path=collection.hero_image_url default=collection.issue_title|striptags %}"8. likewise homepage
... this continued I can't find a front of house page that might use one of these alt-texts that will load.
I don't think I can really look at much more right now, until the errors are sorted out.
One final thought - I can't work out where on the Press manager this alt-text fits. Is this work covering press?
|
OLH article loading fine, but material and clean have same error:
The 'large_image' attribute has no file associated with it. alt=" {% get_alt_text obj=article.large_image_file file_path=article.issue.large_image.url default=article.title|striptags %} "> |


Closes #3943
Closes #3938
This PR introduces a new pattern for HTMX functionality in Janeway. There's a new
partial_views.pymodule specifically for HTMX endpoints, separate from regular views. Partial templates live in/appname/partials/. This keeps HTMX-specific code isolated rather than mixing it into existing views and templates, hopefully this will make it easier to find and maintain as we add more interactive features.Throughout the admin - article image management, journal settings, issue pages - there's now an "Edit alt text" button. Click it and you get an HTMX powered modal that lets you add or update alt text without page reloads. The modal itself is a reusable base template that other features can extend.
Note: This PR adds a new builtin templatetag (see
janeway_global_settings.pyand if this has been copied tosettings.pythis will need to be updated.