MyBBStuff / MyAlerts

A simple notification/alert system for MyBB similar to IPB and XenForo's core implementations of user notifications.
http://www.euantor.com/myalerts/
47 stars 33 forks source link

Fixes #319 - Time/date of alert - center text #320

Closed Eldenroot closed 7 months ago

Eldenroot commented 11 months ago

Add width tag and add align missing tag

Fixes #319

Eldenroot commented 10 months ago

Width is not added for these templates, so if the thread has a long title -> it shrinks the column for date/time. Please try it on your own. Also I added "center" for date/time alignment. Anyway I can update the PR and delete the width change.

lairdshaw commented 8 months ago

Please try it on your own.

I've just done that (i.e., without applying this PR). I can't reproduce a shrunken date/time column. When the thread title is overlong, the popup stretches to fit, although the close button "X" doesn't shift along with it. I think we can live with that minor glitch. See the image below for what I'm seeing.

Screenshot 2024-02-15 at 19-57-02 Recent Alerts - Forums (1)

Maybe you have added custom styling somewhere like a max-width which is causing this problem on your own board? Or maybe I've forgotten about something I've done on my vanilla dev board which is fixing the problem.

Eldenroot commented 8 months ago

It is weird... maybe because of Czech language MyBB core pack?

lairdshaw commented 8 months ago

Oh, wait, I see that with a longer date ("Less than 1 minute ago") it actually does appear shrunken. Is this the sort of thing you mean?

Screenshot 2024-03-07 at 13-09-47 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234

Eldenroot commented 8 months ago

Yes

lairdshaw commented 8 months ago

Hmm. It seems that that's an extreme scenario, with no breaking whitespace in the thread's subject. When I insert regular whitespace characters, it seems fine:

Screenshot 2024-03-07 at 15-47-30 Recent Alerts - Forums (1)

And when I remove a few "words" from the title, it also looks fine:

Screenshot 2024-03-07 at 15-46-49 Recent Alerts - Forums (1)

Do you have any examples other than extreme scenarios like that of my previous post that you can share?

Eldenroot commented 8 months ago

Almost any longer thread name

lairdshaw commented 7 months ago

Screenshot?

lairdshaw commented 7 months ago

@Eldenroot, sorry, but I don't think that the issue this PR solves is really an issue (aside from the alignment fix). I think browsers do a satisfactory job of managing column widths without explicit width styling, and I also think that when an explicit width is provided, oftentimes it is unnecessarily long and thus over-truncates the alert description column, causing another problem of the type it was designed to fix.

To ease your disappointment, please note that PR #323 increases the overall width of the modal popup to make room for the new "Unread only" checkbox.

I'd be happy to merge this PR if you remove the width styling and simply keep the alignment styling.

Alternatively, maybe @euantorano disagrees with me and agrees with you, in which case, the PR can be merged as-is.

Eldenroot commented 7 months ago

@lairdshaw - reverted changes, please merge

Eldenroot commented 7 months ago

Yes, you are righz. I missed this.

lairdshaw commented 7 months ago

Not to worry; I made the change for you.

Eldenroot commented 7 months ago

Thank you!