We have these in the HTML on the staff interface: loggedinusername loggedincategorycode logged-in-branch-code Instead of display that info as text in the HTML element we should use data-attributes. One big benefit to using data-attributes would be that these could then be selectable with CSS.
Created attachment 184237 [details] [review] Bug 40421: Make HTML elements data attributes Test Plan: 1. Apply patch 2. In Staff Interface inspect element and notice HTML has data attributes
Thanks Eric, this is great. The reason I wanted this is because, with this patch, I can now write CSS like this for example: body:has(span[data-logged-in-branch-code="CPL"]) { background: red; } body:has(span[data-logged-in-branch-code="MPL"]) { background: blue; } Now, without JS, I can change the background color per branch.
Created attachment 184239 [details] [review] Bug 40421: Make HTML elements data attributes Test Plan: 1. Apply patch 2. In Staff Interface inspect element and notice HTML has data attributes Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
I changed the bug title because this should not replace the text we currently have, that would break too many customization. It should go along with the text, which is what Eric did.
Created attachment 184378 [details] [review] Bug 40421: Make HTML elements data attributes Test Plan: 1. Apply patch 2. In Staff Interface inspect element and notice HTML has data attributes Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x