openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Add user info tooltip to account icon

Open rebecca-shoptaw opened this issue 1 year ago • 1 comments

Closes #8708.

Feature. Uses an HTML title attribute to show the user's username and joined date when they hover over the account icon.

Technical

Very simple! Used ctx.user to get the relevant data, and replicated the joined date syntax from the view.html page. There are definitely fancier ways of making the tooltip that would look more stylish, but for the purpose of simplicity and responsiveness -- and avoiding any awkward tooltip hanging around once the on-click menu is opened -- I figured the title attribute would be the best way to go.

Testing

Hover over the account icon from any page. After a second or so, a tooltip should appear with the accurate username and user created date.

Screenshot

Tooltip screenshot

Stakeholders

@mekarpeles @Abhishektharu

rebecca-shoptaw avatar Jan 29 '24 23:01 rebecca-shoptaw

Thank you! Looks good, adding to testing.openlibrary.org for QA

mekarpeles avatar Feb 05 '24 18:02 mekarpeles