Jump to content

Template talk:Sonnet

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Straightening out curlies

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Moved from User talk:JJMC89

Thanks again for your help with my template. I notice you removed all spaces between braces. As a noob, }}}}}}}}} is a pretty opaque, whereas I am much more able to visually parse }} }}} }} }} and read its structure in relation to the rest of the statement. Are spaces dodgy programmatically, or is this more a matter of style? Thanks. Phil wink (talk) 14:53, 6 March 2016 (UTC)[reply]

@Phil wink: It's a matter of style. In this case the spaces would be fine. Also, Similar changes can be made for <poem>...</poem> as was done for <ref>...</ref>, so that <poem>...</poem> don't have to be used in each instance. I can go through the sandbox and make that and some other adjustments if you like. — JJMC89 21:28, 6 March 2016 (UTC)[reply]
Yes. Thanks. I think that would be a big improvement, and I'd be happy to see further improvements. It's currently only being transcluded in a couple of user-space test locations so far, so I can easily clean up the parameters in its few instances. One thing I was going to ask was... The real template ({{Sonnet}}) used to be based on a floating table structure, then recently was updated to be based upon a {{quote box}} structure. This was clearly a more elegant solution to the needs then, but the tricks I'm trying to pull now require more granular control of rows and columns than (as far as I can see) {{quote box}} affords -- so I've gone back to the floating table structure. The question is: I think some parts of that revived code are pretty old... do you see anything that I've brought back that is deprecated, or dicey in any way? (But maybe that was implicit in your offer for "other adjustments".) Phil wink (talk) 23:12, 6 March 2016 (UTC)[reply]
@Phil wink: I changed all the {{{param|<poem>...</poem>}}} to {{#tag:poem|{{{param|...}}}}}, so <poem>...</poem> doesn't need to be used when transcluding the template. I also moved the example text out of the template code. The documentation should be moved to Template:Sonnet/doc when {{Sonnet}} is replaced. {{Quote box}} probably shouldn't have been used since its documentation says not to use it in articles. The code looks good to me. Consider using different parameter names. The only one that I know what it is for is |S=. Maybe use |footnote= or |source=. Something else to consider is that other templates that use a parameter to include a reference, expect the value to have <ref>...</ref>. This would also allow for shortened footnotes (templates like {{sfn}}) that don't get wrapped in <ref>...</ref> to be used. If this referencing style isn't being used then it doesn't matter. Will |Q= and/or |L= ever be anything other than the default? — JJMC89 06:57, 7 March 2016 (UTC)[reply]
Thanks again!
  • Regarding {{quote box}} (not that it matters now), I believe the prohibition is simply to avoid the use of this "fancy" manner of quoting in articles and to encourage "plain" <blockquote>...</blockquote> instead. Because this structure was being repurposed, effectively as a container for an infobox, I think the use was well within the spirit of the law.
  • Agree on parameter names; I'll make them human-readable.
  • Yes, in 2 out of 154 cases... TWO!.... the sonnets have nonstandard lineation and rhyme scheme, hence the parameterized side-apparatus.
  • I expect only to use full references, but if putting the <ref>...</ref> into the value will make the template more standardized (as well as flexible for possible future uses) then I think that's the way to go. I should be able to do that myself.
I may have more questions later, but first I've got to go through the new code and make sure I understand it. Phil wink (talk) 14:09, 7 March 2016 (UTC)[reply]

I think the template and documentation are pretty tight now. Several years ago, an automated update was performed to improve the transclusions of this template. (The discussion is here if you care... I don't know if this is even still the proper venue.) I wonder if the same thing can be done again now. The process would be considerably more complex in this case. What do you think? I'm happy to write up the update in detail, but would you be willing to look over my shoulder, and ensure that it is adequately descriptive? and maybe point me (if you know) to the person or group I should ask? First, I'm going to try to get some consensus for the change (which I expect will consist of no one saying either "no" or "yes"), then work on the update itself. Of course if this just has to be done manually, I can do that too. Thanks. Phil wink (talk) 20:34, 8 March 2016 (UTC)[reply]

@Phil wink: I don't think the task is particularly well suited for a bot. It would be better as an AWB task or done manually. Yes, please post to the WikiProjects. As long as there is consensus, even a silent one, we can proceed. I think it should be fairly straightforward to make the changes, and since I'm already familiar with the template, I'm willing to process the changes. I would just ask that you handle the two special cases manually. — JJMC89 05:53, 9 March 2016 (UTC)[reply]
Very good. I've posted notes at WT:BARD, WT:POETRY, and Talk:Sonnet 18 (which I believe to be the most heavily-watched Sonnet). Since I don't know what AWB's exact capabilities are, I'm going to rattle off all the exceptional cases I can think of, just in case any raise red flags with you.
  • All sonnet articles are named uniformly (Sonnet 1, Sonnet 2... up to 154), and all have the template at or near the top. However, the template exists on some other pages (mostly my own user space). I assume you'll ignore these and I can check them out manually, to see if anything needs doing.
  • One page (Sonnet 18) has no image in the template. For those that do, you should not port the pixel widths currently provided in the individual templates; let the new template apply its default, and I'll clean up if necessary.
  • A few pages have 2 versions of the text within the template typically each with its own bold (sometimes linked) heading, a few have citations inline with the sonnet text. My assumption is that you'll treat this all as one big undifferentiated |4= value, and let me sort it out manually. (E.g. for your purposes, none of the existing templates will have a |source=, even though a handful of them actually do.)
  • And yes, I will certainly clean up the |stanzas= and |linenumbers= (formerly "Q" & "L") values where necessary.
Meanwhile, I'll let you know if any interesting discussion occurs. Thanks. Phil wink (talk) 07:17, 9 March 2016 (UTC)[reply]
It's now been a few weekdays + a weekend, and there's been no discussion. We can wait longer if you like, but I don't think more time will yield any more talk. Since you know what you're doing, I'll stay out of the way and only make supplementary edits as you direct. If it's not a problem, I would like the privilege of updating the template page itself -- uh, because I'm vain -- but I'll wait on that until you direct me, too. Thanks. Phil wink (talk) 03:18, 14 March 2016 (UTC)[reply]
@Phil wink: I have some visual and usage improvements that I would like the make to the template before rolling it out. I'll put them in a userspace sandbox for your thoughts before I merge them into the current sandbox. In any case, I hope to be able to roll it out towards the end of the week. Depending on the final form of the template, I may have to make a transitional version to use while I roll the changes out to prevent disruption to the articles. — JJMC89 06:13, 15 March 2016 (UTC)[reply]
Very exciting. I trust you have your own solutions, but I was thinking about how I'd manage this update myself (before you got involved), and my best solution was: for the main update point all pages to {{Sonnet/sandbox}}, then update the {{Sonnet}} code, then re-point all pages to {{Sonnet}}. It's twice as many page edits, but definitely zero user disruption. I don't know what your visual plans are, but if they involve accommodating 2 texts or headings or in-text citations (all evident, for example, at Sonnet 14), I would counsel against that. These are all elements that I believe don't belong in the first place; in the short term I can suppress |stanzas= and |linenumbers= in these cases (since they won't align correctly), and in the medium term I plan to re-enter and cite all texts, which will get them back to a simple state. Phil wink (talk) 14:07, 15 March 2016 (UTC)[reply]

@Phil wink: I was considering basing it on {{Infobox}}. That would have allowed for headings and multiple text versions. I would have had to nest HTML tables inside it though. I might make some small adjustments to it but you can take a look at my sandbox in comparison to {{Sonnet/sandbox}}.

Parameters and changes
{{Sonnet
| number        = <!-- Optional, overrides automatic detection of the sonnet page transcluded on -->
| image         = <!-- See Module:InfoboxImage and/or Template:Infobox person -->
| image_size    = <!-- See Module:InfoboxImage and/or Template:Infobox person -->
| image_upright = <!-- See Module:InfoboxImage and/or Template:Infobox person -->
| alt           = <!-- See Module:InfoboxImage and/or Template:Infobox person -->
| caption       = <!-- Image caption -->
| stanzas       = 
| line_numbers  = 
| sonnet_text   = 
| source        = 
}}
  • Named parameters
  • Use Module:InfoboxImage
  • Detect the page being transcluded on
    • The sonnet number is optional
    • Uses Module:String to parse the pagename to create links to the previous and next sonnets when the number isn't provided

I don't know if I'm happy with then name |sonnet_text=. I'm more than happy to write up the /doc when this is finalized. Thoughts? As for rolling it out, I'll code a special version into {{Sonnet}} to use during the roll out which can be replaced with the sandbox when I'm done. — JJMC89 02:22, 17 March 2016 (UTC)[reply]

OK, here's the point where I go from greatful noob to demanding client. (For reference, my test (using your subpage) is at: User:Phil wink/sandbox6#JJMC89 test.) NOTE: I've just now put 2 test instances on a new doc page for your user-space version, so it will be easier to visually test stuff. Phil wink (talk) 02:30, 18 March 2016 (UTC)[reply]
  • Image size: There will be some default embiggening of the image. Just from "MOS:IMGSIZE" it's not clear exactly what level your objection was at. If you simply prefer, e.g. "upright=1.6", then yes, we can do that. If you are asserting that no default should be set in the template, I disagree profoundly and am happy to discuss why. Ideally, the image width would be programmatically set to the width of the whole box as displayed to the individual user (minus, say, 10 px), but I expect that's just pie-in-the-sky.
  • Caption: Your removal of the "thumb" apparatus (while perhaps good in itself) has created a visual problem which I have begun to solve -- inexpertly. I'll mention my thinking in hopes that you know of a better solution. 1st: I felt the sans of the caption clashed badly with the serif of the text. 2nd: The caption now seemed that it might equally apply to the text; and while the picture is "Sonnet 70 in the 1609 Quarto", the text explicitly is not -- it is a modernized edition from about 3 centuries later. The "thumb" formatting prevented both these problems by clearly placing the caption and text in visually separate domains. This is what I'm trying to realize with the font shrinkage and dashes (I even tried putting in a fleuron... probably a non-starter, but just for fun, consider replacing my break+rule with something like <br />[[File:Floral heart.svg|x20px]]). Total separation (e.g. putting a bottom border on the caption's row of the table) is, I think, far too strong. I find my solution acceptable, but I'm not enthusiastic about it. Ideas?
  • I see nothing wrong with "sonnet_text". I might have just gone with "text", but as that could describe no fewer than 4 elements of template, it's probably insufficiently explicit.
  • Previously, I had the serif texts set at higher than 100%, and gradually reduced them back down to the current 100%. I'm now thinking that perhaps they should be bumped back up (just a bit to, say, 110%). Thoughts? At least on WP, serif texts that are in principle equal in size to sans texts still tend to look a touch smaller to me; further, the articles repeatedly refer to words, lines, and sections of the text, so I consider the sonnet_text not to be a nice adjunct to the articles, but a central feature which users may refer back to multiple times while reading.
Thanks again. Phil wink (talk) 18:31, 17 March 2016 (UTC)[reply]
I just happened to look at User:JJMC89/sandbox/template/1 in Mobile view, and the images fail to center, even though they center correctly in Desktop view. This is a mystery to me, as the examples at {{Infobox person}} appear to center correctly regardless of view. I'm not super distressed about this, but I thought you'd like to know. Phil wink (talk) 03:31, 18 March 2016 (UTC)[reply]
Since I see you haven't immediately rejected my idea of fleurons (I assumed no one would share that enthusiasm!) I'll mention that I've put a couple additional tests at the above-mentioned-and-struck-out User:Phil wink/sandbox6#JJMC89 test. Cheers. Phil wink (talk) 04:01, 18 March 2016 (UTC)[reply]
The image size should not be set in the template or on the sonnet pages. Setting the size doesn't respect user preferences. If a user's preference is set to 120px, you are forcing it to be larger. The user might a slow internet connection. If a user's preference is set to 400px, you are forcing it to be smaller. The user might have poor sight and thus need the images to be larger. The image sizes are intended to vary based on user preference. I don't think any image scaling should be done, but if it is to be done it should be done with upright as it will scale with a user's preference selection. I suggest testing with different preference options set. I think this might be a good fit as a separator under the caption. I made some fontsize changes; however, note that the 125% for the poem is the same as 100% was previously due to another change. I'm not a fan of large fonts but I guess you could increase it some. Please consider the font size, color, and font family sections of the MOS. I fixed the centering issue. Another thing to note about mobile is that the line numbers and stanza indicators are not likely to align with the text. I might be able to find a way to hide them in mobile. — JJMC89 05:37, 18 March 2016 (UTC)[reply]

I think we need to re-evaluate where this template is headed. Your earlier work was really helpful (and I quite like your suggested rule graphic), but it seems to me that the addition of the infobox elements has been a setback. You've already spent a lot of time (and more is required) fixing problems they caused, but I'm genuinely unaware of any problems they've solved. Currently, we have a template where

  • We have to set fonts to 125% to get them to be 100%.
  • Lines wrap in mobile view. This is already a disqualifier to me, but it is exacerbated by the fact that, while desktop view of the new template pre-shrinks text (so that, as stated, we need 125% to get to 100%) mobile view does not, so we're getting text that is wildly enlarged -- and thus wraps much more than it should have to, even assuming a narrow box!
  • Line spacing has somehow been squished to about 73% of what it was, such that a sonnet which in the old template had a W:H ratio of 10:11 now is 10:8. This decreases both the poem's visual aesthetics and legibility, and the space it saves -- vertical space -- is the unconstrained dimension, even in mobile view.

Problems like these suggest that the basic assumptions of the infobox elements -- include many stacked discrete labeled elements, shrink content, wrap content to maintain narrow table -- are actually contrary to the needs of the sonnet template. We are displaying verse, not housing data. I hate to think of you spending a lot of time and energy turning this ferret into a horse when we've already got a donkey to work with. Are there, indeed, any actual problems with {{Sonnet/sandbox}} as it now stands that you think we need to solve? Phil wink (talk) 16:39, 18 March 2016 (UTC)[reply]

@Phil wink: I did a partial revert to remove the infobox class and selectively apply only the table style from it. (This fixes the font sizing and should fix the line spacing.) The line wrapping occurs in all versions of the template. Additionally I removed the font family per MOS:FONTFAMILY and darkened the color for the stanzas and line numbers per MOS:CONTRAST. The sonnet text could be italicized if desired. Per MOS:IMGSIZE, lead images should usually use upright=1.35 at most. — JJMC89 03:54, 22 March 2016 (UTC)[reply]
Please stop helping. Phil wink (talk) 00:41, 23 March 2016 (UTC)[reply]
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Sizing problem

[edit]

@Frietjes: Something in the recent edits seems to have broken the sizing mechanism. For example, at Sonnet 126 where the template's default of |size=upright=1.5 has been overridden to |size=upright=1.35, yet the display ends up being much bigger than the other transclusions, rather than smaller as it should be. Thanks. Phil wink (talk) 16:29, 22 April 2016 (UTC)[reply]

fixed by using |upright=1.5 instead. Frietjes (talk) 16:42, 22 April 2016 (UTC)[reply]