Adium

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#11872 closed patch (fixed)

%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 (5)

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

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by mathuaerknedam

  • Type changed from defect to enhancement

comment:2 Changed 11 years ago by mathuaerknedam

  • Keywords SO3 added

comment:3 Changed 11 years ago by zacw

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:4 Changed 10 years ago by mathuaerknedam

  • Patch Status set to Needs Dev Review
  • Resolution fixed deleted
  • Status changed from closed to new
  • Type changed from enhancement to patch

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.

comment:5 Changed 10 years 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 10 years ago by mathuaerknedam

comment:6 Changed 10 years ago by mathuaerknedam

Patch fixed, old one deleted.

comment:7 Changed 10 years ago by mathuaerknedam

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

Changed 10 years ago by mathuaerknedam

Status tooltip, pre-patch

Changed 10 years ago by mathuaerknedam

Status tooltip, post-patch

Changed 10 years ago by mathuaerknedam

Message tooltip, pre-patch

Changed 10 years ago by mathuaerknedam

Message tooltip, post-patch

comment:8 Changed 10 years ago by mathuaerknedam

  • Owner set to earthmkii

comment:9 Changed 10 years ago by Zachary West <zacw@…>

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:10 Changed 10 years ago by Robby

  • Patch Status changed from Needs Dev Review to Accepted

comment:11 Changed 10 years 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.