See https://img.skitch.com/20110124-tiud9p5uq9dwb9egrp94asa96m.jpg
And the markup for reference... https://img.skitch.com/20110124-t6f82ryk517ka8rex9i1unuwp4.jpg
Comment | File | Size | Author |
---|---|---|---|
#33 | after.png | 6.54 KB | imshivani |
#33 | before.png | 30.25 KB | imshivani |
#24 | garland-before-patch.png | 12.26 KB | David_Rothstein |
#24 | garland-after-patch.png | 12.26 KB | David_Rothstein |
#14 | 1038356-seven-table-th-label.patch | 812 bytes | droplet |
Comments
Comment #1
droplet CreditAttribution: droplet commentedhow can i reproduce this error
Comment #2
Peter Törnstrand CreditAttribution: Peter Törnstrand commentedHave the same error on my install.
In my case the table contains unlimited number of nodereference fields (Autocomplete widget) and from the screenshot above it seems mfer is using unlimited media fields (Media file selector widget).
The offending CSS is in field.css
Comment #3
jensimmons CreditAttribution: jensimmons commentedI agree, there should be some padding on the left of these labels. This code fixes the problem.
Meanwhile, I've been getting around this bug by creating an custom administration theme that's a child of Seven, and putting this code into that child theme.
Comment #4
jensimmons CreditAttribution: jensimmons commentedOk, here's a patch with that change.
Comment #5
Bojhan CreditAttribution: Bojhan commentedIs this a bug only experienced in contrib? I never saw it in core, and cant find a place to reproduce it.
Comment #6
Bojhan CreditAttribution: Bojhan commentedComment #7
jensimmons CreditAttribution: jensimmons commentedThis is in core. It's been there for a long time. It's a bug in the Seven theme — one that you will see even with a brand new install and nothing downloaded from contrib.
How to reproduce:
1) Create a multivalue field in any content type. (Doesn't matter what kind of field).
2) Go to enter content for that content type.
3) Look at the table header for the multivalue field form. :(
Comment #8
jensimmons CreditAttribution: jensimmons commentedActually, this code looks better and I believe is closer to what was originally intended.
Comment #9
jensimmons CreditAttribution: jensimmons commentedA patch with the code from comment 8. I hope.
Comment #11
rjgoldsborough CreditAttribution: rjgoldsborough commentedRe-rolled patch.
Comment #12
xjmThe proposed change looks good to me. Note that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades). When the patch has been rerolled, please set the issue back to "Needs Review."
Tagging as novice for the task of rerolling the Drupal 8.x patch.
If you need help rerolling this patch, you can come to core office hours or ask in #drupal-gitsupport on IRC.
Comment #13
rjgoldsborough CreditAttribution: rjgoldsborough commentedRerolled due to file structure change.
Comment #14
droplet CreditAttribution: droplet commentedremove styles, keep it same as other TH head
Comment #15
xjm#14 is interesting; I wonder why that CSS was there to begin with? Are we altering the rendering of anything else by making this change?
Comment #16
droplet CreditAttribution: droplet commentedI guess it had padding-left on LABEL
<th class="field-label" colspan="2"><label>test: </label></th>
Comment #17
ezheidtmann CreditAttribution: ezheidtmann commentedI have reviewed this patch and I can confirm that the latest 8.x patch fixes this bug as droplet describes. It also fixes the identical problem in Bartik. (should the component be changed to field system or CSS?)
The line in field.css was added 3 years ago in what appears to be an unrelated commit:
http://drupalcode.org/project/drupal.git/commit/4ac090eb54ecc7ad5bf5df42...
To answer the question "Are we altering the rendering of anything else by making this change?": No. The CSS selector includes the class "field-multiple-table" and this string occurs just once in core outside of the css files this patch touches: in core/modules/field/field.form.inc where tables are generated for multi-value fields.
Comment #19
xjmThanks @ezheidtmann! We should probably double-check this fix looks correct in:
Comment #20
August1914 CreditAttribution: August1914 commentedChecked D8 before the patch to verify I could see the reported problem; then ran the D8 patch and verified that it sets padding acceptably for the label of multi-value fields, as seen under Firefox, Safari and Chrome, under Seven and Bartik; checked RTL as well. (I wasn't able to get a test site to where I could get at it from IE.) Looks good.
Comment #21
Bojhan CreditAttribution: Bojhan commentedComment #22
August1914 CreditAttribution: August1914 commentedVerified also under IE8 as well.
Comment #23
catchThanks! Committed/pushed to 8.x, there's a 7.x patch here already so leaving RTBC.
Comment #24
David_Rothstein CreditAttribution: David_Rothstein commentedI tried the Drupal 7 patch in Garland and it didn't look good:
Before:
After:
So, it introduces a misalignment in the field label where there wasn't one before.
Not sure what to do about that, because overall the patch does make sense.
I think the issue is that Garland is doing some weird stuff with its table layouts (in fact, if the original change was made 3 years ago as described above, I think that was back when Garland was still the default theme so maybe it was done to "fix" Garland)... So, we could leave the change as is and then do something else to fix Garland, but that also makes me wonder if there are other themes out there that this generic fix will break.
Moving back to "needs review" since it seems we need a little more thought on how to handle this for Drupal 7.
Comment #25
geerlingguy CreditAttribution: geerlingguy commentedGoing to take a quick glance at this during a meetup tonight as an example.
Comment #26
geerlingguy CreditAttribution: geerlingguy commentedIt does seem a little wonky in Garland, but should we fix that with some theme-specific CSS, or should we leave it be?
In my testing, I found the exact same thing happened as David_Rothstein.
Comment #27
geerlingguy CreditAttribution: geerlingguy commentedComment #28
R13ose CreditAttribution: R13ose commentedI tried the patch in #14 (1038356-seven-table-th-label.patch) in Drupal 7.42-dev and I like the padding that is given in the label. I tested this in themes (Seven, and Bartik), Firefox and Chrome, and the RTL language Arabic which works for me too.
Comment #29
abinayaa.k CreditAttribution: abinayaa.k as a volunteer and commentedHi,
I have checked this issue in drupal7. Its working fine.
Comment #30
sandipauti CreditAttribution: sandipauti commentedAdd padding to your table form field i.e
form .field-multiple-table th.field-label {
padding-left: 0;
}
Add this CSS to active theme file.
Cheers,
Comment #33
imshivani CreditAttribution: imshivani commentedSteps I followed to test the patch #14:
1) I installed the Drupal 7.52-dev.
2) Then I saw the issue in the labels of the table.
3) I downloaded the patch #14 and applied it in the Bartik theme.
4) I checked the patch for firefox and chrome and it is working fine for the both.
I'm attaching the screenshots of before and after applying the patch.
Comment #36
mahalingam_cs CreditAttribution: mahalingam_cs at TATA Consultancy Services commentedApplied the patch successfully in Seven 7.55-dev and Stark 7.55-dev ( Drupal 7.x) and the labels alignment looks good.
Comment #37
jollysolutionsComment #38
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThis is the same patch as before, and it has the same problem that I identified previously in #24.