Template talk:Quote box2

Latest comment: 14 years ago by Ningauble in topic Re: merge...

Blockquote edit

Why doesn't this template us <blockquote>? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 19:25, 18 September 2008 (UTC)Reply

Quote box eating the rest of the article edit

If you are here to report that the {{quote box2}} is enclosing a chunk of the article, then here is the problem.

{{Quote box2
 | quote= quote
 | source= <div style="text-align:right;">—source
 | width= 30em
 | bgcolor= transparent
 | align= right
 | halign= left
}}

Note that there is an opening <div> but no closing </div>. The quote box will encapsulate the remaining text until it sees another div tag. This is invalid to begin with, but has apparently been exposed by some recent template changes; this appears to have propogated across several articles. This particular div is not needed, as the salign parameter is intended to align the source.

{{Quote box2
 | quote= quote
 | source= —source
 | width= 30em
 | bgcolor= transparent
 | align= right
 | halign= left
 | halign= right
}}

---— Gadget850 (Ed) talk 09:51, 25 April 2009 (UTC)Reply

Source parameter bug edit

When using bullets, the source is split into a separate table:

Lines delimited by breaks

 
Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
"'Tis some visitor," I muttered, "tapping at my chamber door —
Only this, and nothing more."

–Source line should be in the bottom of the box

Lines delimited by bullets

 

  • Once upon a midnight dreary, while I pondered, weak and weary,
  • Over many a quaint and curious volume of forgotten lore,
  • While I nodded, nearly napping, suddenly there came a tapping,
  • As of some one gently rapping, rapping at my chamber door.
  • "'Tis some visitor," I muttered, "tapping at my chamber door —
  • Only this, and nothing more."

–Source line should be in the bottom of the box

---— Gadget850 (Ed) talk 14:53, 20 July 2009 (UTC)Reply

Fixed. Chris Cunningham (not at work) - talk 15:30, 20 July 2009 (UTC)Reply
Haven't had time to look at your fix, but it was reverted. ---— Gadget850 (Ed) talk 15:59, 20 July 2009 (UTC)Reply
I'm sure that Kaldari (talk · contribs) will be happy to apply a more preferable fix. Chris Cunningham (not at work) - talk 16:02, 20 July 2009 (UTC)Reply
For some reason the fix causes extra whitespace to appear around the quote and source. Maybe a better solution is possible. Kaldari (talk) 17:14, 20 July 2009 (UTC)Reply
Refixed. Kaldari (talk) 17:28, 20 July 2009 (UTC)Reply
Thanks. I see what the problem was, just too busy actually working today. ---— Gadget850 (Ed) talk 17:51, 20 July 2009 (UTC)Reply
... which broke the fix for the bug in bullets, as described here. Chris Cunningham (not at work) - talk 17:48, 20 July 2009 (UTC)Reply

Bullet bug edit

For which I may have a real fix. Need to test it later today. ---— Gadget850 (Ed) talk 17:51, 20 July 2009 (UTC)Reply
Got quiet, so I had a chance to fiddle with this. Think I fixed the original bullet bug: see Template:Quote box2/testcases#Bullet and number test. ---— Gadget850 (Ed) talk 19:04, 20 July 2009 (UTC)Reply
Awesome. :) Chris Cunningham (not at work) - talk 14:28, 21 July 2009 (UTC)Reply
It works, with no other issues. I just want to ensure that I am not relying on HTML Tidy to fix the problem. ---— Gadget850 (Ed) talk 15:08, 21 July 2009 (UTC)Reply
:Tested at Special:ExpandTemplates; whitespace is not an issue. ---— Gadget850 (Ed) talk 18:35, 21 July 2009 (UTC)Reply
The fix doesn't affect the whitespace for bulleted lists, but it does affect the whitespace for regular old text entries (which are 99% of the actual uses). Kaldari (talk) 15:12, 22 July 2009 (UTC)Reply
What was the problem with my refix? I'm afraid I didn't notice. Kaldari (talk) 15:37, 22 July 2009 (UTC)Reply


I reverted my last change for now, but I don't see the issue:

Live version

Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
"'Tis some visitor," I muttered, "tapping at my chamber door —
            Only this, and nothing more."

–Edgar Allan Poe

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

Live version
  • Once upon a midnight dreary, while I pondered, weak and weary,

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

---— Gadget850 (Ed) talk 15:41, 22 July 2009 (UTC)Reply

Compare: Kaldari (talk) 15:51, 22 July 2009 (UTC)Reply

Live version

I think this is the most extraordinary collection of talent, of human knowledge, that has ever been gathered at the White House - with the possible exception of when Thomas Jefferson dined alone.

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

Ah— just was not seeing that; I had to grab a screen ruler to see that the first line of the quote is down by a fraction of a line. This can probably fixed by a line-height rule. ---— Gadget850 (Ed) talk 16:16, 22 July 2009 (UTC)Reply
Live version

__________
__________
__________
__________
__________

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

Not only is the first line moved down, but the line spacing is shorter by a pixel or so as well. Looking at the HTML output, adding that carriage return causes the quote text to be wrapped in <p>...</p>. I don's see that we have a CSS rule for the paragraph tag anywhere. ---— Gadget850 (Ed) talk 16:29, 22 July 2009 (UTC)Reply
What's the problem with the live version? I haven't seen it yet I'm afraid. Kaldari (talk) 17:03, 22 July 2009 (UTC)Reply
Live version
  • __________
  • __________
  • __________
  • __________
  • __________

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

If you use bullet or line number markup on the first line, it is not parsed as wikimarkup. The parser adds a <td> before the first line, which then causes the parser to ignore the bullet markup. The only way I see to get the markup as the first character is to use a carriage return to put it on the first line. This wraps the text in <p>...</p>, which pushes it down about three pixels. ---— Gadget850 (Ed) talk 18:13, 22 July 2009 (UTC)Reply

Geez, what a mess. What if we remade the template from scratch using divs instead of tables? That should give us more control over the formatting. Kaldari (talk) 18:25, 22 July 2009 (UTC)Reply
Good idea. I created this as a fork of {{quote box}} a long time ago when I was still learning templates. ---— Gadget850 (Ed) talk 18:34, 22 July 2009 (UTC)Reply
Done. The line spacing is the same, but less whitespace between the top of the box and the title, between the title and the quotes and at the bottom. I could pad this out to match the old, but I think I like this. I could add a switch for normal or compressed vertical whitespace. ---— Gadget850 (Ed) talk 23:11, 22 July 2009 (UTC)Reply

State of the sandbox edit

I've made some updates to the sandbox to accommodate a feature that was added to {{quote box}} a while back but not synced here, to allow for anonymous attributes rather than having to explicitly specify quote= and author=.

There's one more change I'd like to make: to have a switch which allows this template to mimic {{quote box3}}, by embellishing it with quotation images. At that point I'd like to see a push to merge the three templates. Chris Cunningham (not at work) - talk 08:45, 23 July 2009 (UTC)Reply

Merging is a good idea— we have a plethora of quote templates to the point where we have a template to list the templates. The sandbox version has reduced vertical whitespace as compared to the live version— I like this, but it is different from {{quote}}. ---— Gadget850 (Ed) talk 11:18, 23 July 2009 (UTC)Reply
I'm okay with just merging the "box" templates ({{quote box}}, {{quote box2}}, {{quote box3}}). I'm led to believe that there are irreconcilable difference preventing {{quote}}, {{cquote}} et cetera from being merged right now. Plus, smaller scope usually means less arguing. Chris Cunningham (not at work) - talk 11:24, 23 July 2009 (UTC)Reply

If no one objects, I'm going to twiddle with the sandboxed version a bit. --Ludwigs2 09:07, 1 March 2010 (UTC)Reply

Go ahead. ---— Gadget850 (Ed) talk 16:48, 1 March 2010 (UTC)Reply

Sandbox version is cleaned up a bit - I added some parameters and twiddled things. I have three questions though:

  1. do we want to use the sandbox 'div' version or keep the current 'table' version? I know how to fix the 'bullet bug' and the slight spacing differences in the table version; it's just a question of which is preferable for other technical reasons.
  2. do we want to give the extra stylistic control of an open CSS parameters? If so, I may want to rename some of the parameters to make more sense.
  3. do we want CSS indenting on the source or the flat em-dash system? I added some CSS indenting (which I happen to like) but it got reverted, so... I mean, I can leave that as other open style parameter, but which do we want as default?

I'll fix the table version now, just for the heck of it. let me know what you all think. --Ludwigs2 06:06, 2 March 2010 (UTC)Reply

Using divs is probably preferable in the end from a semantic point of view, but it isn't a big deal. I'd rather we had a version with no bugs for now. For the styling, the only reason I'd like an option for styling is to stop people from forking the thing every time they want some tiny style tweak; if all the quote boxes are merged that will hopefully lead to people discussing the need for styling centrally. I've no opinion on the use of CSS indenting other than that we should try to make sure that if we use a CSS solution that it fails gracefully. All that said, thanks a million for working on this (and the same applies to everyone else who has worked on it over the last year). Chris Cunningham (not at work) - talk 12:48, 2 March 2010 (UTC)Reply
This was one of my very first templates— much later, I wished I had used different parameter names, but it is used pretty widely now. I you have a solution for that, go for it. Merge is good— I think I forked this because of a lack of interest on the original template discussion and I was tired of all the various bits of markup being used. ---— Gadget850 (Ed) talk 13:15, 2 March 2010 (UTC)Reply
I would love to see the table mark-up axed if you can fix the spacing bug. Also, I'm open to the idea of using CSS indenting, but not simultaneously with em dash indenting. We should do one or the other, but not both. Kaldari (talk) 21:34, 2 March 2010 (UTC)Reply
well, I can fiv up the table version or the div version. The one snafu with the div version is that incorporating the big quotation marks (like quote box3 does) will muck up wikitext bullets; that's much easier to do with a table structure. I might be able to get around that with some tricky CSS work, or we might just accept that as a limitation of the template (when would anyone put a bulleted list inside big quotes anyway?), or that might be a reason to keep it as a table. keep ing it in table format will also help if we ever want to make collapsible quote boxes.
maybe what I'll do is create a second sandboxed version using tables - we can play with them independently that way, and decide which way we want to run with it. --Ludwigs2 22:19, 2 March 2010 (UTC)Reply
I don't think templates need to be table based to be collapsible, but I could be wrong. The fat quotes should not be an issue. 1. They are discouraged by the Manual of Style and shouldn't be used anyway. 2. If they are going to be implemented, they should probably be implemented using absolute positioning, which means they wouldn't affect the layout of other things in the box. Kaldari (talk) 23:20, 2 March 2010 (UTC)Reply
actually, I was just beefing up the div template to allow fat quotes, and discovered that trying to use absolute positioning gets flagged as vandalism (I've got a filter log on me now, the shame, the shame!!!  ). I've left a false positive report about it, so we'll see what happens. at any rate, you can look at the div version at {{Quote box2/sandbox}} and the table version at {{Quote box2/sandbox t}}, see what you think. don't mind the mispositioned fat-quotes on the div version - that should get cleared up quickly. I've expanded (but not documented) the parameters in each. let me know what you think needs to be added, removed, or revised. --Ludwigs2 23:55, 2 March 2010 (UTC)Reply
Looking good so far! Kaldari (talk) 00:06, 3 March 2010 (UTC)Reply
Kaldari - if you get a chance, could you try changing the position of the two quote marks to absolute? I just looked at the edit filter involved, and I think it makes exceptions for admins, whereas normal users like me will keep getting excluded. the last two position: relative; bits should get changed to position: absolute;, and it should work correctly. once they are in there, I think we're good to go (except that I won't be able to remove the 'absolute' bit, either). --Ludwigs2 02:06, 3 March 2010 (UTC)Reply

Ok, one of the filter-list admins fixed the quotes, so I have the two versions up and running with a test page here: Template:Quote box2/test. these should should handle the parameters of {{quote box}},{{quote box2}}, and {{quote box3}} easily, so we could conceivably merge and redirect those directly. I could also work in the {{quote}} template, though that would be a bit more of a challenge (different parameter names, and different default assumptions...). look it over as you get the chance, and let's see what consensus we have about which version to use. then we should be able to just plop it in and do the merge without anyone really noticing a difference. --Ludwigs2 04:53, 3 March 2010 (UTC)Reply

They look good. You seem to have fixed all the pesky bugs. Thanks so much for working on these! So, which one will it be, divs or tables? Personally, I prefer the div solution, as it makes more sense semantically, but I'm fine with either. Thoughts? Kaldari (talk) 05:27, 3 March 2010 (UTC)Reply

Re: merge... edit

There are two revised versions of the template at {{Quote box2/sandbox}} and {{Quote box2/sandbox t}} - the first uses table syntax while the second uses div syntax. you can see a test page at Template:Quote box2/test. these will effectively replace {{quote box}}, {{quote box2}} and {{quote box3}}. there should be no detectable difference from the user's perspective (except possibly with the last, which may require a parameter). --Ludwigs2 07:31, 7 March 2010 (UTC)Reply

You got that backwards- the one that ends with a "t" is the table version. Looks like you added |tstyle=, |quoted=, |qstyle= and |sstyle= and the default font is Times New Roman. The top alignment is still off on the div version. The live version is 42px between the top border and the first line, where {{Quote box2/sandbox}} is 48px; see the previous discussion on this. No issues in other tests.
Live version
  • __________
  • __________
  • __________
  • __________
  • __________

{{[[Template:Quote box2/sandbox |Quote box2/sandbox ]]}}

I'll see if I can fix the alignment issue now. what font would you prefer to see as default font? I think I just grabbed whatever was on QB2.
With respect to added parameters, yes> qstyle, tstyle, and sstyle are style parameters for the individual parts (quote, title and source) to complement the style parameter that was already there (but undocumented). quoted is a binary parameter for including fat-quotes, which may or may not be desired, but which is included for compatibility with QB3. we might want to rename halign to qalign for consistence in the final version. I'm ambivalent about whether the old specific-style parameters should be encouraged or discouraged in the final version. they need to be there for backwards compatibility, but do we want to have them in the docs, or get people to focus on using the generic style parameters? --Ludwigs2 20:01, 7 March 2010 (UTC)Reply
P.s. - think I got the erroneous spacing fixed. --Ludwigs2 20:17, 7 March 2010 (UTC)Reply
Spacing looks good— I will have to see what you did. If we want to change the parameter names, I can use AWB to make updates. ---— Gadget850 (Ed) talk 21:04, 7 March 2010 (UTC)Reply

Ok, I think we are ready to do the merge the three templates together. I'll post an editrequest now over on {{Quote box}} since I think that should be the final name for the template. once that editrequest is filled, we can redirect QB2 and QB3 over to QB. we'll need the following changes made using AWB (I'd do it, but I'm on a Mac, so I'm stuck):

  • the current QB template tags should have |qalign=left added to their template tags, to preserve the current default left alignment of QB
  • the current QB2 template tags should have |qalign=center added to their template tags, to preserve the current default center alignment of QB2
  • the current QB2 template tags should have any halign parameters renamed to qalign (this is not strictly necessary, since I've accomodated both parameters in the sandboxed version, but it will make things cleaner in the long run)
  • the current QB3 templates should have |quoted=1 or |quoted=true - whichever you think is clearer - added to the template tags. this will preserve the fat-quotes they currently have.

--Ludwigs2 06:54, 13 March 2010 (UTC)Reply

please note the strikeouts above. because QB is protected, and thus more difficult to edit, I decided it was easier to set the default text alignment to left, and adjust the QB2 template tags.

QB2:

  • |qalign=center
  • halign → qalign

QB3 has the background hard coded for some reason. To match the current implementations, we need to add:

  • |quoted=true
  • |bgcolor=#FFFFF0
  • |salign=center
  • |source=–

I will work this today. ---— Gadget850 (Ed) talk 13:09, 13 March 2010 (UTC)Reply

ah, I also just noticed that the old QB had a built-in mdash - &mdash;{{{source|{{{2}}} }}} - so we might want to AWB one in on the QB template tags (i.e. change |quote= to |quote={{mdash}} or |quote=&mdash;). We could talk about making a separate revision to automatically an mdash, but I think it might be more trouble than it's worth. --Ludwigs2 16:42, 13 March 2010 (UTC)Reply
I can write a bot to remove or add em dashes to the sources. Just let me know which approach you want to take. Kaldari (talk) 18:03, 13 March 2010 (UTC)Reply
well, Gadget said he'd AWB it. no action so far (that I can see) but let's give him through the weekend. I'm really annoyed that AWB doesn't work on Macs - I'm going to go look at the source code and see how hard it would be to convert it to PHP. if it's easy enough, I may do it and start running it off my own server. --Ludwigs2 05:33, 14 March 2010 (UTC)Reply
All transclusions of QB2 have been updated. Will work QB3 tomorrow. I should of kept a list of how parameters can be misspelled. And I found more fracking divs inside the quotes. G'night all. ---— Gadget850 (Ed) talk 06:10, 14 March 2010 (UTC)Reply
lol - if it aint one thing it's another. since QB2 is done, I'll go ahead and redirect that. I'll spot check for problems while I'm at it and self-revert if I find any, but it should be fine. let me know when you're done with QB3 and I'll handle the redirect on that as well. thanks, and sorry for the headaches.   --Ludwigs2 06:33, 14 March 2010 (UTC)Reply
QB3 is done. Interesting to see how folks can over complicate these templates with redundant or ineffective bits of HTML. ---— Gadget850 (Ed) talk 15:33, 14 March 2010 (UTC)Reply
ok, I'll redirect it now. hopefully the new open-style parameters will keep people from doing odd stuff in the future, but I'm not going to hold my breath.   --Ludwigs2 16:43, 14 March 2010 (UTC)Reply
Ah - I noticed you only AWBed mainspace. I fixed the QB3 non-mainspace usages by hand (there were only about 20), but there are a bit over 100 non-mainspace usages of QB2. is it worth the time to go and fix those as well, or should we just leave it up to individual editors to fix if they have an issue with it? otherwise, the redirects are done (I've even checked for double-redirects, which there weren't any, so no worries). --Ludwigs2 17:12, 14 March 2010 (UTC)Reply
Please do fix what wasn't broken before these changes. Migrating legacy usage in the least disruptive manner feasible is just the right thing to do. Thanks. ~ Ningauble (talk) 18:42, 15 March 2010 (UTC)Reply
I don't see any current uses other than discussions.[1] ---— Gadget850 (Ed) talk 18:53, 15 March 2010 (UTC)Reply
QB2 has a number of still-active transclusions [2], mostly from archives, user pages, and the like.
Ningauble - can you point to a page where there's an issue? I'm more than happy to address any problems. --Ludwigs2 19:46, 15 March 2010 (UTC)Reply
I had looked at those, and didn't see any pressing need to update them. I can zip through them later and update the template call. ---— Gadget850 (Ed) talk 21:10, 15 March 2010 (UTC)Reply
whatever you think's best. it doesn't strike me as a huge issue, and I'm happy to deal with specific problems as and if they arise. --Ludwigs2 21:14, 15 March 2010 (UTC)Reply
I was one of the handfull of editors affected by QB3 on my talk page, and I am grateful to Ludwigs2 for fixing it. Investigating what had happened, I came across discussion here about not doing the same thing for QB2. I was just offering my two cents on general principles, but it is not a big deal because compatibility appears to be close enough in typical uses. ~ Ningauble (talk) 13:23, 16 March 2010 (UTC)Reply