While working on #1979066: Consider using field formatters to display changes I noticed some weirdness with our theme template for the issue link (now used for both the [#x] filter and also field formatters and Views row plugins). Since the template is defining an outer <span> with a class that we use to decide if we want text-decoration: line-through; applied, and since that span itself contains newlines, you can sometimes see the strike-through happening outside the <a> in a weird way. If you try to put a + in front of the link, it ends up looking like +-[link] which is confusing as hell (and seemed like a bug in the nodechanges code). I think the only way to really deal with this is to remove the newlines from theme/project-issue-issue-link.tpl.php. Even though it makes the template itself less readable, it removes all these extra newlines from the markup, which in cases like this cause serious weirdness in how it looks.

Comments

dww’s picture

StatusFileSize
new10.85 KB

For example:

Issue link template with newlines

dww’s picture

Status: Active » Needs review
StatusFileSize
new10.78 KB

And here's how it looks with theme/project-issue-issue-link.tpl.php flattened into a single line:

issue link template without newlines

dww’s picture

StatusFileSize
new18.83 KB

Saw the same weirdness locally with stark as my theme instead of bartik (but only in nodechanges output, never with the [#x] link in other places. Then realized it's something about doing this within a table. Saw the same badness even on git7site with bluecheese:

issue link template newlines inside a table are bad

So, I think there's no good way out of this without just killing the newlines in the template...

dww’s picture

An alternate approach tvn suggested was adding this to project_issue.css:

.project-issue-issue-link {
  display: inline-block;
}

That seems to work on my local site running stark with Chrome, FF and Safari. However, it forces the links onto a newline when I switch back to bartik. :( And I suspect we'll have the same badness on bluecheese.

So, probably easier to just remove the newlines and be done with it...

dww’s picture

Status: Needs review » Fixed

Screw it. Removed the newlines. Problem solved:

http://drupalcode.org/project/project_issue.git/commit/df20e2a

dww’s picture

p.s. I just looked and in D6 we've never seen any problems because it's not a theme template, it's just a theme function that creates the markup without any newlines. So, this really was a new problem...

dww’s picture

p.s. Now merged into bzr and should be live on git7site soon (although I can't access that site right now).

Automatically closed -- issue fixed for 2 weeks with no activity.