Comments

Jeff Burnz’s picture

Status: Active » Needs review
StatusFileSize
new4.46 KB

I have refactored the tabs to use a different technique for most browsers (floats) which works much better in standards compliant browsers and solves the IE8 and Opera RTL issues. For IE 6, 7 we take the floats off and use display:inline;.

I'm getting a lot of big horizontal scroll-bars under different conditions in different browsers although I do not think they're tied directly to this patch (needs testing).

Jeff Burnz’s picture

#1: bartik-refactor-tabs-for-rtl.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, bartik-refactor-tabs-for-rtl.patch, failed testing.

Jeff Burnz’s picture

The horizontal scroll bars were due to the skip link CSS, which has been fixed. I'm going to re-roll this shortly, it needs to go in because IE is the most popular browser in RTL speaking countries (I mean by miles, like 90% dominant), we really must support it properly.

Jeff Burnz’s picture

Issue tags: +RTL

tagging

Jeff Burnz’s picture

Status: Needs work » Needs review
StatusFileSize
new3.24 KB

Updated patch, didn't have to as much this time around as some other patches have been committed.

It would be very good if this did not get committed until after #660614: Remove #block-system-main dependency, fix font sizes, remove crufty CSS, in which case this will need to be re-rolled.

Good for testing now and discussing the approach - this is how I normally build tabs - one of the main differences is that I do not rely on padding to set the height of the tab because this is fragile across browser (different browsers can render padding differently) so we get issues like #844456: Main menu is off by one pixel in Opera for Linux cropping up from time to time. What we do instead is rely on the font size and line-height which I have found to be much more robust - if you set line-height and font-size the same it will center align the text vertically.

munzirtaha’s picture

I applied your patch and my first notice is the opacity is removed and many lines are changed unnecessarily. So, I came up with a very small patch that fixed the problems without re-factoring the tabs. I don't have IE to test so I am waiting for your review.

munzirtaha’s picture

StatusFileSize
new463 bytes
Jeff Burnz’s picture

Hmmm...

1) rgba is still in the patch
2) patch in #8 will not work correctly in IE6 or 7 in RTL mode

Citing "your patch changes many lines" is totally irrelevant. What is somewhat relevant is the amount of code - the patch in #8 simply adds more CSS, whereas the patch in #6 removes many lines.

Back to #6 please, if you have a review that would be good.

reglogge’s picture

In #6 the margin between the tabs is now significantly smaller than before.

#main-menu ul.links li needs margin: 0 1px;

Jeff Burnz’s picture

Status: Needs review » Needs work

OK, I'll get to this, feel free to beat me to it :)

munzirtaha’s picture

Status: Needs review » Needs work
StatusFileSize
new851 bytes

My review to your patch is:
1. The opacity is removed and I don't know why you removed the line background: rgba(240, 240, 240, 1.0);
2. The margins and paddings are not correct
3. The color of the tabs are changed to white background: #fff; unnecessarily
4. Some rules like: display: inline, zoom: 1 are added unnessarily.
5. You can fix the bug with much less code (16 compared with 65 changes roughly)

Please, note your patch encourage me to test and roll mine and without it, I might have thought it's a more esoteric problem, so I really appreciate your work and it's not a matter of my patch vs your patch. Compare the two and take your decision.

Here is my patch after fixing IE issue, too.

munzirtaha’s picture

Status: Needs work » Needs review
munzirtaha’s picture

Assigned: Unassigned » munzirtaha
Status: Needs work » Needs review
StatusFileSize
new849 bytes

Removing a redundant new line

Jeff Burnz’s picture

Assigned: munzirtaha » Unassigned
StatusFileSize
new325.88 KB
new200.27 KB
new3.35 KB

Hmmm, ok well I made a series of screenshots to show:

1) the patch from #14 and how it fails in RTL in IE and with text resizing.
2) comparisons for bartik-refactor-tabs-for-rtl_3.patch

You will see what I mean about your approach not working with IE and text resizing - there are several issues not accounted for. I would very much appreciated if you would work on the actual issue and stop spreading FUD about the patch in #6.

Please do not assign yourself to these issues - we want to keep them open to everyone, if you assign yourself others may not take up the challenge.

This new patch accounts for the 1px margin (#10) and takes account of the featured active tab which I forgot about in #6 (ops...).

This screenshot shows the patch from #14 and how it fails badly in IE8 - the first two images are with bartik-refactor-tabs-for-rtl_3.patch, the 3rd and 4th shots are of the patch from #14

bartik-IE8-tabs.png

This is bartik-refactor-tabs-for-rtl_3.patch screenshot comparisons, IE6 looks the same as IE7 - note the small difference in the gap between the tabs in IE7 in RTL mode - this is pretty hard to solve and probably easier when #923928: theme_links adds a new line ('\n') after <li> - leads to space between horizontally aligned list elements lands

bartik-tabs.png

Jeff Burnz’s picture

@munzirtaha - I would also like the point out that I am not playing some sort of "my patch is better than yours" game - that is actually pretty insulting, given the thousands of hours I have contributed to D7 over the past 18 months or so, and the thousands of lines of code I have written, and hundreds and hundreds of issues worked on with many many other contributors.

LET ME BE CLEAR: I only look at the techniques used - I know in one glance that the approach currently used in Bartik has some fundamental issues - its fine in LTR and if you don't intend to support text resizing - however it simply not robust enough for the harsh reality of a core theme. What you are criticizing as "unnecessary lines" are in fact a full-proof backstop to the kind of failures Bartik is currently experiencing.

You cannot make a silk purse from a sows ear - its as simple as that. You can dress up and make-over the current approach all you want, but at the end of the day the approach is flawed - that you cannot fix that without changing the approach.

munzirtaha’s picture

Umm! I haven't tried text resizing and sorry if you find my words insulting thought it's not meant to be, and definitely if you need all your changes to support resizing, I would recommend your patch but let me find IE 8 to test and understand the issue better.

munzirtaha’s picture

@Jeff: Till I can find IE 8 to test, can you please fix the issues with opacity disappearing and hover not working. I applied your new patch and still can see those problems in firefox.

Jeff Burnz’s picture

What version of Firefox are you running - the patch is developed in Firefox 3.6.x - when you make a browser report its very handy to have screenshots to visually show the error, for example I have no understanding what you mean by "opacity disappearing". I can't fix an issue that I cannot see after testing this in every major browser on my system.

munzirtaha’s picture

StatusFileSize
new32.28 KB

It's very strange that every major browser you tested doesn't display the problem whereas every browser I tested display the problem. I really suspect something wired from my side then but please have a look at the screenshot. I see this at least in

Firefox: 3.6 and 4.0b7pre
Chromium: 7.0.540.0 (61020)
Opera: 10.62.6438

The tabs color is just white, even when I hover over it with the mouse after applying your patch.

Jeff Burnz’s picture

Wow, crazy - lets see if we can get some feedback from the others, what OS are you using?

Also - could you check the markup and see that they are not all getting the active classes for some reason? If each link is active they will be all white. Outside chance but worth checking.

Embedding the image from #20

bartik rtl tabs are white, wtf?

munzirtaha’s picture

StatusFileSize
new2.77 KB

@Jeff: my OS is maverick and I now took a look at your patch and found that if I removed a.active and leave a:active only it works properly. Here is a patch that fixed this problem and keeps all your other changes

munzirtaha’s picture

Aha! the problems happen to me and not you because I am using the same path "" for all those testing links. However, do we really need a.active here?

Status: Needs review » Needs work

The last submitted patch, bartik-refactor-tabs-for-rtl_4.patch, failed testing.

Jeff Burnz’s picture

Yes, we really must leave the design as faithful to Jens vision as possible, we should not be changing the design at this stage, just fixing bugs.

The patch in 15 needs a reroll since the big font sizing patch landed

Jeff Burnz’s picture

Assigned: Unassigned » Jeff Burnz
Status: Needs work » Needs review

Re-roll chasing HEAD, also fixes a regression for IE6/7 tabs that stemmed from a typo in the Fix the Header patch that just got committed, my apologies for that.

Jeff Burnz’s picture

StatusFileSize
new26.27 KB
new3.07 KB

OK, getting tired...

This screeny is still relevant (its the same code): http://drupal.org/files/issues/bartik-tabs.png

Also did a quick test in IE9, attaching screenshot.

Jeff Burnz’s picture

Title: Bartik Tabs broken in RTL » Bartik Tabs broken in IE6, 7 and RTL

Retitling to reflect the issue better - in short the tabs are not working correctly in IE6, IE7, or Opera RTL. The patch basically changes the how they are positioned, by using good old fashioned floats instead of display: inline. This is the only way I have found to reliable ensure RTL works accross browser, there are probably other good methods, but this is one I have used for years so I have big faith in it.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

This is good to go!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)

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

carlos8f’s picture

Title: Bartik Tabs broken in IE6, 7 and RTL » Bartik Tabs broken in Firefox (Ubuntu)
Status: Closed (fixed) » Active
StatusFileSize
new30.9 KB

The tabs are hovering too high in Firefox now. I have the latest CVS D7 HEAD, using Firefox 3.6.12 on Ubuntu Lucid. Standard profile install. The relevant CSS seems to be here:

+++ themes/bartik/css/style.css	6 Oct 2010 00:39:21 -0000
@@ -436,26 +435,35 @@
 #main-menu-links {
   font-size: 0.929em;
-  padding: 2px 0;
-  padding: 0;
+  padding: 0 15px;
+}

When removing the new padding rule with Firebug, the tab snaps back in its normal place.

I tried reversing the committed patch and it also fixes the issue. I haven't tested in any other versions of Firefox; my other browser is Chrome and it renders it correctly.

webchick’s picture

Title: Bartik Tabs broken in Firefox (Ubuntu) » Bartik Tabs broken in Firefox
Priority: Normal » Critical

I noticed this on my Firefox too (4 beta, OSX Snow Leopard), but only after cvs upping after a week or so. Since this patch was committed about a month ago, I'm not sure why reversing it out works. Hm.

Anyway, I can't roll a beta/RC with Firefox looking so broken. :\

carlos8f’s picture

Also confirmed on FF 3.6.10 Mac OS Snow Leopard.

damien tournoud’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)