Adium

Ticket #11872 (closed patch: fixed)

Opened 11 months ago

Last modified 5 months ago

%keywords% and html tempate agnosticism

Reported by: mathuaerknedam Owned by: earthmkii
Milestone: Adium 1.4 Component: Message View
Version: Severity: normal
Keywords: SO3 Cc:
Patch Status: Accepted

Description

It would be nice if the various message style %keywords% worked regardless of the HTML template in which they are located. While the keywords were (I think) originally intended to be used to display the inserted content to users, they're now seen a much expanded role in styling. New keywords are being added for the express purpose of allowing greater control of styling (especially %status% and %mesageClasses%).

For example, I'd like to include %service% in status.html so that I can provide styling specific to status/event messages in IRC.

Also, the usefulness of the HTML template fallback is limited by the inability of some templates to process some keywords.

Attachments

blankkeywords2.diff (1.0 KB) - added by mathuaerknedam 9 months ago.
statusbad.png (42.1 KB) - added by mathuaerknedam 8 months ago.
Status tooltip, pre-patch
statusgood.png (41.2 KB) - added by mathuaerknedam 8 months ago.
Status tooltip, post-patch
messagebad.png (41.3 KB) - added by mathuaerknedam 8 months ago.
Message tooltip, pre-patch
messagegood.png (41.4 KB) - added by mathuaerknedam 8 months ago.
Message tooltip, post-patch

Change History

Changed 11 months ago by mathuaerknedam

  • type changed from defect to enhancement

Changed 11 months ago by mathuaerknedam

  • keywords SO3 added

Changed 11 months ago by zacw

  • status changed from new to closed
  • resolution set to fixed

(In [26911]) Add %service% to all WKMV templates. Fixes #11872. We use the chat's account's service instead of the source's because it is likely for statuses that the source does not exist. I don't see any other keywords which could potentially be used between status and message; the remaining are all rather specific to the type of content (sender, mostly, really). Fixes #11872.

Changed 9 months ago by mathuaerknedam

  • status changed from closed to new
  • type changed from enhancement to patch
  • patch_status set to Needs Dev Review
  • resolution fixed deleted

My original post was unclear, but the patch I attached implement what I was thinking of. Specifically, when a %keyword% doesn't "make sense" (like %status% in an outgoing message) it replaces it with "" rather than ignoring it. Structurally, there's little reason for most message styles to have different html templates for status and message content, and a single root-level content.html will suffice. The place where I've seen this break down is the keywords, but this is easily solved with this patch.

There are other keywords that could be treated in the same way, but these are the ones I care about right now. If the patch is accepted I'll happily add the other keywords.

Changed 9 months ago by mathuaerknedam

Hm, There's something wrong with the patch. %status% is getting replaced with "" in status messages too. I'm looking into it.

Changed 9 months ago by mathuaerknedam

Changed 9 months ago by mathuaerknedam

Patch fixed, old one deleted.

Changed 8 months ago by mathuaerknedam

I'm going to attach a series of pics that demonstrate what happens now and what happens after the patch.

Changed 8 months ago by mathuaerknedam

Status tooltip, pre-patch

Changed 8 months ago by mathuaerknedam

Status tooltip, post-patch

Changed 8 months ago by mathuaerknedam

Message tooltip, pre-patch

Changed 8 months ago by mathuaerknedam

Message tooltip, post-patch

Changed 7 months ago by mathuaerknedam

  • owner set to earthmkii

Changed 5 months ago by Zachary West <zacw@…>

  • status changed from new to closed
  • resolution set to fixed

(In  1b8a3dce56d1) Patch from mathuaerknedam to replace status keywords in messages with blanks, and vice versa. Fixes #11872.

Changed 5 months ago by Robby

  • patch_status changed from Needs Dev Review to Accepted

Changed 5 months ago by Zachary West <zacw@…>

(In  0cd78c81e7bd) Patch from mathuaerknedam to replace status keywords in messages with blanks, and vice versa. Fixes #11872.

Note: See TracTickets for help on using tickets.