Markup simplicity; easier to style without the extra elements. This article does a good job of explaining the merits of dropping lists on navigation, with a focus on accessibility: http://css-tricks.com/navigation-in-lists-to-be-or-not-to-be

Here's a static implementation of the tabs in Seventy Eight.http://drupalcode.org/sandbox/ry5n/1932040.git/blob_plain/39e83df:/patte...

<nav role="navigation" >
  <ul class="tabs tabs--primary">
    <li class="tabs__tab is-active">
      <a href="#">Edit</a>
    </li>
    <li class="tabs__tab">
      <a href="#">Manage display</a>
    </li>
  </ul>
</nav>
CommentFileSizeAuthor
#302 dream_mark_up_for_tabs-1999182-301.patch23.4 KBlauriii
#299 mobile-landscape-issue.png41.71 KBaschiwi
#298 manage-display-bartik-mobile.png20.21 KBaschiwi
#298 manage-display-bartik-tablet-desktop.png18.81 KBaschiwi
#296 block-layout-desktop.png11.72 KBaschiwi
#296 content-type-operations-desktop.png19.98 KBaschiwi
#296 manage-display-desktop.png18.1 KBaschiwi
#296 edit-node-mobile.png16.41 KBaschiwi
#296 edit-node-tablet.png16.45 KBaschiwi
#296 edit-node-desktop.png16.94 KBaschiwi
#296 manage-display-tablet.png20.34 KBaschiwi
#296 manage-display-mobile.png14.28 KBaschiwi
#296 manage-display-open-mobile.png21.24 KBaschiwi
#291 interdiff-1999182-280-291.txt1.24 KBgints.erglis
#291 dream-markup-for-tabs-1999182-291.patch22.93 KBgints.erglis
#290 Screenshot 2015-09-20 13.33.22.jpg42.38 KBlewisnyman
#290 Screenshot 2015-09-20 13.32.50.jpg500.55 KBlewisnyman
#280 dream-markup-for-tabs-1999182-280.patch22.68 KBgints.erglis
#280 1999182-275-dream-markup-for-tabs.patch22.68 KBgints.erglis
#273 Screenshot 2015-09-13 10.28.41.jpg292.26 KBlewisnyman
#273 Screenshot 2015-09-13 10.28.17.jpg510.05 KBlewisnyman
#272 interdiff-262-270.txt14.29 KBrainbowarray
#270 1999182-270-dream-markup-for-tabs.patch24.39 KBrainbowarray
#265 Screen Shot 2015-09-02 at 22.38.22.png44.73 KBemma.maria
#265 Screen Shot 2015-09-02 at 22.29.32.png29.52 KBemma.maria
#265 Screen Shot 2015-09-02 at 22.28.37.png42.02 KBemma.maria
#262 interdiff-1999182-261-262.txt2.21 KBsubhojit777
#262 dream_mark_up_for_tabs-1999182-262.patch24.97 KBsubhojit777
#261 dream_mark_up_for_tabs-1999182-261.patch25.12 KBsubhojit777
#255 interdiff-1999182-246-255.txt4.66 KBpguillard
#255 dream_mark_up_for_tabs-1999182-255.patch25.9 KBpguillard
#253 interdiff-1999182-246-253.txt4.66 KBpguillard
#253 dream_mark_up_for_tabs-1999182-253.patch25.9 KBpguillard
#246 interdiff-1999182-241-246.txt4.75 KBmanjit.singh
#246 dream_mark_up_for_tabs-1999182-246.patch21.24 KBmanjit.singh
#241 interdiff.txt1.42 KBpguillard
#241 dream_mark_up_for_tabs-1999182-241.patch20.61 KBpguillard
#239 interdiff.txt1.69 KBpguillard
#239 dream_mark_up_for_tabs-1999182-239.patch20.62 KBpguillard
#237 interdiff.txt404 bytespguillard
#237 dream_mark_up_for_tabs-1999182-237.patch20.51 KBpguillard
#233 comments-not-highlighted.png90.84 KBmgifford
#232 dream_mark_up_for_tabs-1999182-232.patch20.34 KBsubhojit777
#224 interdiff-1999182-223-224.txt379 bytespivica
#224 1999182-224.patch20.11 KBpivica
#223 interdiff-1999182-220-223.txt2.46 KBpivica
#223 1999182-223.patch20.11 KBpivica
#220 1999182-220.patch19.54 KBrpayanm
#220 1999182-interdiff.txt1.94 KBrpayanm
#219 1999182-218-seven2-after.gif41.06 KBidebr
#219 1999182-218-seven-after.gif35.15 KBidebr
#219 1999182-218-after.gif31.78 KBidebr
#218 dream_mark_up_for_tabs-1999182-218.patch20.06 KBsarhugo
#214 dream_mark_up_for_tabs-1999182-214.patch20.2 KBsubhojit777
#214 interdiff-1999182-208-214.txt654 bytessubhojit777
#212 output_uzmgv3.gif32.5 KBsubhojit777
#208 dream_mark_up_for_tabs-1999182-208.patch20.2 KBsubhojit777
#208 interdiff-1999182-203-208.txt730 bytessubhojit777
#206 1999182-206-after.gif45.98 KBidebr
#203 interdiff-1999182-193-203.txt5.37 KBsubhojit777
#203 dream_mark_up_for_tabs-1999182-203.patch20.18 KBsubhojit777
#193 interdiff-188-193.txt544 bytesjedihe
#193 dream_mark_up_for_tabs-1999182-193.patch25.16 KBjedihe
#189 1999182-188-bartik-after.png52.51 KBidebr
#189 1999182-188-bartik-before.png54.59 KBidebr
#189 1999182-188-mobile.png11.98 KBidebr
#188 dream_mark_up_for_tabs-1999182-188.patch25.11 KBsubhojit777
#184 interdiff-1999182-172-184.patch1.09 KBsubhojit777
#184 dream_mark_up_for_tabs-1999182-184.patch25.02 KBsubhojit777
#179 dream_mark_up_for_tabs-1999182-179.patch25.5 KBsubhojit777
#179 interdiff-1999182-172-179.txt1.57 KBsubhojit777
#177 interdiff-1999182-172-177.txt1.58 KBsubhojit777
#177 dream_mark_up_for_tabs-1999182-177.patch25.51 KBsubhojit777
#176 Selection_003.png95.66 KBsubhojit777
#176 Selection_004.png93.17 KBsubhojit777
#174 Screen Shot 2015-01-25 at 17.37.01.png21.03 KBAnonymous (not verified)
#172 interdiff-1999182-168-172.txt1011 bytessubhojit777
#172 dream_mark_up_for_tabs-1999182-172.patch24.91 KBsubhojit777
#170 Screen Shot 2015-01-23 at 11.32.03.png8.1 KBAnonymous (not verified)
#170 Screen Shot 2015-01-23 at 11.32.07.png9.97 KBAnonymous (not verified)
#168 dream_mark_up_for_tabs-1999182-168.patch24.51 KBsubhojit777
#168 interdiff-1999182-161-168.txt560 bytessubhojit777
#166 Screen Shot 2015-01-20 at 17.02.51.png7.52 KBAnonymous (not verified)
#166 Screen Shot 2015-01-20 at 17.03.24.png6.31 KBAnonymous (not verified)
#165 1999182-161-after.png67.36 KBidebr
#162 Screen Shot 2015-01-17 at 13.56.31.png18.82 KBsubhojit777
#162 Screen Shot 2015-01-17 at 13.56.42.png18.8 KBsubhojit777
#162 Screen Shot 2015-01-17 at 13.56.35.png17.44 KBsubhojit777
#162 Screen Shot 2015-01-17 at 13.56.44.png17.38 KBsubhojit777
#162 Selection_006.png14.63 KBsubhojit777
#162 Selection_005.png15.25 KBsubhojit777
#162 Selection_004.png22.14 KBsubhojit777
#162 Selection_003.png13.52 KBsubhojit777
#161 dream_mark_up_for_tabs-1999182-161.patch24.51 KBsubhojit777
#161 interdiff-1999182-157-161.txt1.07 KBsubhojit777
#159 Screen Shot 2015-01-16 at 07.55.39.png12.15 KBAnonymous (not verified)
#158 Screen Shot 2015-01-16 at 07.51.28.png16.27 KBAnonymous (not verified)
#158 Screen Shot 2015-01-16 at 07.47.58.png10.97 KBAnonymous (not verified)
#158 Screen Shot 2015-01-16 at 07.50.21.png24.85 KBAnonymous (not verified)
#157 interdiff-1999182-147-157.txt445 bytessubhojit777
#157 dream_mark_up_for_tabs-1999182-157.patch24.32 KBsubhojit777
#155 Screen Shot 2015-01-14 at 09.51.27.png23.96 KBAnonymous (not verified)
#150 dream_mark_up_for_tabs-1999182-150.patch24.54 KBsubhojit777
#150 interdiff-1999182-147-150.txt552 bytessubhojit777
#147 interdiff-1999182-134-145.txt2 KBsubhojit777
#147 interdiff-1999182-134-147.txt1.61 KBsubhojit777
#147 interdiff-1999182-145-147.txt476 bytessubhojit777
#147 dream_mark_up_for_tabs-1999182-147.patch24.28 KBsubhojit777
#145 dream_mark_up_for_tabs-1999182-145.patch23.72 KBsubhojit777
#139 Screen Shot 2014-12-27 at 00.32.01.png23.88 KBsubhojit777
#139 Screen Shot 2014-12-27 at 00.31.35.png46.5 KBsubhojit777
#139 Screen Shot 2014-12-27 at 00.31.17.png18.82 KBsubhojit777
#135 Screen Shot 2014-12-26 at 21.40.19.png46.5 KBsubhojit777
#135 Screen Shot 2014-12-26 at 21.40.37.png24.45 KBsubhojit777
#134 dream_mark_up_for_tabs-1999182-134.patch24.06 KBlauriii
#128 interdiff-1999182-114-122.txt417 bytessubhojit777
#128 dream_mark_up_for_tabs-1999182-122.patch23.95 KBsubhojit777
#123 Screen Shot 2014-12-16 at 23.36.51.png60.73 KBsubhojit777
#123 Screen Shot 2014-12-16 at 23.36.31.png61 KBsubhojit777
#123 Screen Shot 2014-12-16 at 23.36.08.png76.93 KBsubhojit777
#123 Screen Shot 2014-12-16 at 23.35.59.png18.8 KBsubhojit777
#122 interdiff-1999182-114-122.txt417 bytessubhojit777
#122 dream_mark_up_for_tabs-1999182-122.patch23.95 KBsubhojit777
#120 Screen Shot 2014-12-16 at 10.58.36.png13.53 KBAnonymous (not verified)
#120 Screen Shot 2014-12-16 at 10.53.37.png13.65 KBAnonymous (not verified)
#116 interdiff-1999182-107-114-corrected.txt739 bytessubhojit777
#114 interdiff-1999182-107-114.txt2.25 KBsubhojit777
#114 dream_mark_up_for_tabs-1999182-114.patch23.96 KBsubhojit777
#109 Bildschirmfoto 2014-12-04 um 14.17.42.png88.43 KBBoaah
#108 Bildschirmfoto 2014-12-04 um 14.17.56.png3.34 KBBoaah
#108 Bildschirmfoto 2014-12-04 um 14.18.02.png96.5 KBBoaah
#107 dream_mark_up_for_tabs-1999182-107.patch23.78 KBlewisnyman
#107 Screen Shot 2014-11-23 at 23.35.12.jpg489.32 KBlewisnyman
#107 interdiff.txt437 byteslewisnyman
#106 interdiff-1999182-99-106.txt2.52 KBsubhojit777
#106 dream_mark_up_for_tabs-1999182-106.patch23.92 KBsubhojit777
#103 Screen Shot 2014-11-22 at 01.31.55.jpg506.11 KBlewisnyman
#99 interdiff-98.txt4.01 KBdroplet
#99 dream_mark_up_for_tabs-1999182-99.patch24.11 KBdroplet
#98 interdiff-1999182-89-98.txt688 bytessubhojit777
#98 dream_mark_up_for_tabs-1999182-98.patch23.89 KBsubhojit777
#94 highlighted.png46.74 KBdroplet
#89 interdiff-1999182-82-89.txt716 bytessubhojit777
#89 dream_mark_up_for_tabs-1999182-89.patch23.92 KBsubhojit777
#82 interdiff-76-82.txt1.94 KBJens-0
#82 dream_mark_up_for_tabs-1999182-82.patch20.65 KBJens-0
#79 dream_mark_up_for_tabs-1999182-79.patch19.61 KBJens-0
#76 interdiff-1999182-69-76.txt1.07 KBsubhojit777
#76 dream_mark_up_for_tabs-1999182-76.patch20.32 KBsubhojit777
#70 interdiff-1999182-59-69.txt921 bytessubhojit777
#70 interdiff-1999182-50-69.txt921 bytessubhojit777
#69 dream_mark_up_for_tabs-1999182-69.patch20.76 KBsubhojit777
#69 interdiff-1999182-59-69.patch921 bytessubhojit777
#69 interdiff-1999182-50-69.patch921 bytessubhojit777
#63 interdiff-1999182-50-59.txt608 bytessubhojit777
#59 dream_mark_up_for_tabs-1999182-59.patch19.29 KBsubhojit777
#54 Screenshot_2014-10-03-18-53-16.png123.7 KBAnonymous (not verified)
#53 Dashboard-tc1bc-alf9q.png226.32 KBaschiwi
#50 tabs-dream-markup-1999182-50.patch18.89 KBAnonymous (not verified)
#50 interdiff.txt383 bytesAnonymous (not verified)
#49 47.png19.2 KBaschiwi
#48 interdiff-1999182-42-47.txt566 bytesaschiwi
#48 1999182-47.patch18.9 KBaschiwi
#47 with-patch.png16.56 KBaschiwi
#47 without-patch.jpg23.96 KBaschiwi
#45 Screen Shot 2014-10-03 at 10.55.22.png19.91 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.26.47.png34.11 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.21.31.png94.71 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.21.39.png30.7 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.21.46.png39.06 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.22.00.png66.65 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.22.46.png15.54 KBAnonymous (not verified)
#44 Screen Shot 2014-10-03 at 10.22.54.png39.98 KBAnonymous (not verified)
#42 tabs_dream_markup-1999182-42.patch18.83 KBAnonymous (not verified)
#40 tabs_dream_markup-1999182-40.patch17.36 KBAnonymous (not verified)
#40 Screen Shot 2014-10-01 at 16.46.04.png34.35 KBAnonymous (not verified)
#40 Screen Shot 2014-10-01 at 16.42.34.png38.9 KBAnonymous (not verified)
#38 Screen Shot 2014-10-01 at 13.57.07.png21.82 KBAnonymous (not verified)
#38 tabs_dream_markup-1999182-38.patch17.15 KBAnonymous (not verified)
#37 Screen Shot 2014-10-01 at 13.24.11.png22.05 KBAnonymous (not verified)
#37 Screen Shot 2014-10-01 at 13.24.29.png20.65 KBAnonymous (not verified)
#37 Screen Shot 2014-10-01 at 13.27.30.png20.71 KBAnonymous (not verified)
#37 Screen Shot 2014-10-01 at 13.26.22.png24.05 KBAnonymous (not verified)
#5 tabs-dream-markup-1999182-5.patch7.29 KBlauriii
#6 tabs-dream-markup-1999182-6.patch8.34 KBlauriii
#8 tabs-dream-markup-1999182-6.patch8.34 KBAnonymous (not verified)
#10 tabs-dream-markup-1999182-10.patch12.35 KBAnonymous (not verified)
#13 tabs-dream-markup-1999182-13.patch8.77 KBlauriii
#13 interdiff-1999182-8-13.txt1.37 KBlauriii
#30 tabs_dream_markup-1999182-30.patch9.76 KBckrina
#34 tabs_dream_markup-1999182-34.patch14.26 KBlauriii
#34 interdiff-1999182-30-34.txt5.43 KBlauriii
#35 Screen Shot 2014-10-01 at 12.08.44.png19.06 KBAnonymous (not verified)
#35 Screen Shot 2014-10-01 at 12.05.44.png130.09 KBAnonymous (not verified)
#35 Screen Shot 2014-10-01 at 12.08.57.png119.58 KBAnonymous (not verified)

Comments

mgifford’s picture

Any reason that this shouldn't be as an unordered list?

ry5n’s picture

Markup simplicity; easier to style without the extra elements. However, it would need screen reader testing. We have the navigation ARIA role, we may need additional roles on children.

This article does a good job of explaining the merits of dropping lists on navigation, with a focus on accessibility: http://css-tricks.com/navigation-in-lists-to-be-or-not-to-be/

lewisnyman’s picture

lewisnyman’s picture

Issue summary: View changes
Issue tags: +frontend
lauriii’s picture

Status: Active » Needs review
StatusFileSize
new7.29 KB

Did some progression on this one. CSS needs some refactoring. I'll leave that for someone who's more familiar with this.

I'll change the status to Needs Review so that test bot tests if my patch breaks Drupal or not.

lauriii’s picture

StatusFileSize
new8.34 KB

refactored css. Please review

lauriii’s picture

Status: Needs review » Needs work

Ups, patch shouldn't be here.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new8.34 KB

Right, now its correct :), lauri accidentally posted my patch.

Refactored css.
Please review

Anonymous’s picture

Assigned: Unassigned »
Status: Needs review » Needs work

Found a slight glitch still in css fixing now.

Anonymous’s picture

Assigned: » Unassigned
Status: Needs work » Needs review
StatusFileSize
new12.35 KB

Right now everything should be in order. latest patch fixed "sub tabs" being shown wrongly when hovering.

lewisnyman’s picture

Status: Needs review » Needs work
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
diff --git a/.idea/vcs.xml b/.idea/vcs.xml

diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100755

new file mode 100755
index 0000000..c80f219

index 0000000..c80f219
--- /dev/null

--- /dev/null
+++ b/.idea/vcs.xml

+++ b/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>
+

Looks like there is a lot of additional changes from other issues here?

Anonymous’s picture

Wow. good point wonder how those got there..

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new8.77 KB
new1.37 KB

Cleaned #10.

+++ b/core/themes/seven/style.css
@@ -146,12 +146,14 @@ ul.menu li.expanded {
+/* TODO */

@@ -163,9 +165,11 @@ ul.menu li.expanded {
+/* TODO */

@@ -235,6 +235,7 @@ li.tabs__tab a {
+/* TODO */

Still some TODO's left in the CSS.

mgifford’s picture

Issue tags: +Accessibility

The link that @ry5n posted in #2 has a follow-up about what came out of this discussion online. The conclusion was:

"Personally, I think marking up navigation as lists seems to be the best choice. You can look at the facts and decide for yourself though."

More importantly from webaxe's response:
"The straight answer? Continue to use lists."

Removing them removes semantics that some assistive technology relies on.

teroelonen’s picture

The problem I see with this link element-only solution is that creating nested menus is hard. What do you think? I think the usage of lists is pretty much the standard so I would go with that =)

Error303’s picture

+1 for lists

lewisnyman’s picture

Ok, sounds like we need to update the html in the issue summary

mgifford’s picture

Issue tags: +Needs reroll
mgifford’s picture

So much has changed since June....

lauriii’s picture

Issue summary: View changes
lauriii’s picture

lauriii’s picture

Im not sure if there's anything to do anymore. I looked how the tabs markup looks like atm and its pretty much the same suggested here.

jwilson3’s picture

So does the HTML code sample in the issue summary with the current HTML (including the button)?

Where does the last patch stand? is it no longer required?

lauriii’s picture

Assigned: Unassigned » lauriii

Things have changed a lot since I created the last patch. Now we're using templates etc. for generating tabs.

lauriii’s picture

Assigned: lauriii » Unassigned

Didnt mean to assign this

lewisnyman’s picture

Issue summary: View changes
Issue tags: -Needs reroll

I've updated the example to remove seven specific collapsible stuff. Looks like we need to update menu-local-tasks.html.twig template_preprocess_menu_local_task in menu.inc. With these changes we'd need to update a fair amount of CSS and remove some code from seven.theme that will no longer be needed.

ckrina’s picture

Assigned: Unassigned » ckrina

Working on that

ckrina’s picture

StatusFileSize
new9.76 KB

Here is a first approach:

  • Updated markup in both menu-local-tasks.html.twig in Seven and system templates.
  • Added 'tabs__tab' class in template_preprocess_menu_local_task() in menu.inc.
  • Removed seven_preprocess_menu_local_task() in seven.theme.
  • Updated styles.
ckrina’s picture

Assigned: ckrina » Unassigned
Status: Needs work » Needs review

Unassigning and changing status.

lauriii’s picture

Assigned: Unassigned » lauriii

Gonna take look of this

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new14.26 KB
new5.43 KB
Anonymous’s picture

Assigned: lauriii » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new119.58 KB
new130.09 KB
new19.06 KB

#34 does what its supposed to. see screenshots for new markup.

lewisnyman’s picture

Status: Reviewed & tested by the community » Needs work

We've made a lot of changes here, we need to test/post screenshots for Stark and Bartik as well.

  1. +++ b/core/themes/seven/css/components/tabs.css
    @@ -1,9 +1,10 @@
    +.is-collapse-enabled .tabs,
     .is-horizontal .tabs {
       position: relative;
    +  height: 35px;
    
    @@ -45,57 +46,60 @@
       text-overflow: ellipsis;
       white-space: nowrap;
    +  text-decoration: none;
    ...
    +.tabs.tabs--primary .tabs__tab:hover {
    +  background-color: #fafaf7;
    +}
    ...
    -.tabs.primary .tabs__tab.active {
    +.tabs.tabs--primary .tabs__tab.active {
       z-index: 15;
       border-color: #a6a6a6;
    -  border-radius: 4px 0 0 0;
    +  border-radius: 4px 4px 0 0;
       background-color: #ffffff;
    -  color: #004f80;
    

    We've changed a lot of styling here, we will have to be careful for regressions. Ideally we would only change the selectors to remove the chance of regressions

  2. +++ b/core/themes/seven/css/components/tabs.css
    @@ -45,57 +46,60 @@
    -  .tabs.primary a {
    +  .tabs.tabs--primary a {
    

    We can remove the .tabs selector in all these selectors, so it's just .tabs--primary

Anonymous’s picture

Starks seems to be same as it used to be, but bartik has isnt correct First file is how bartik tabs look with patch and second is how they used to look. third is stark tabs new and fourth is stark tabs old.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new17.15 KB
new21.82 KB

Refactored css as per #36 requested and also modified bartiks selectors to work with new markup. theres still one .tabs.tabs--primary due to theres a selector called ul.tabs that would override just .tabs--primary selector.

lewisnyman’s picture

Status: Needs review » Needs work

@b0unty Do your think we we could remove the ul from ul.tabs then we can have perfect CSS selectors? :D

Anonymous’s picture

Status: Needs work » Needs review
Issue tags: +Amsterdam2014
StatusFileSize
new38.9 KB
new34.35 KB
new17.36 KB

Right, removed the ul which leaded in a few new problems that are sorted out in the patch. also found out a bug in bartik tabs--secondary which was fixed with clearfixing it. didnt add the clearfix as a class cause its only needed in bartik.

lauriii’s picture

Good job on the patch @b0unty!

  1. +++ b/core/themes/bartik/css/colors.css
    @@ -12,10 +12,10 @@ body {
    +nav .tabs--primary li a.active {
    

    Is there a reason for the first nav?

  2. +++ b/core/themes/bartik/css/style.css
    @@ -1287,46 +1287,51 @@ div.tabs {
    +nav .tabs--secondary:after {
    +  content: "";
    +  display: table;
    +  clear: both;
    +}
    

    If we really need to do this I'd prefer adding a class in Bartik.

Anonymous’s picture

StatusFileSize
new18.83 KB

1. No there was no need for it, removed.
2. Added to bartik as a class.

and lastly i modified the bartiks tabs to use same markup with other tabs. (removed one excess nav element)

lauriii’s picture

Issue tags: +Needs screenshots, +Novice
Anonymous’s picture

StatusFileSize
new19.91 KB

Primary tabs non horizontal screenie.

aschiwi’s picture

Assigned: Unassigned » aschiwi

Testing.

aschiwi’s picture

Assigned: aschiwi » Unassigned
Status: Needs review » Needs work
StatusFileSize
new23.96 KB
new16.56 KB

The result looks almost perfect.
I applied the patch successfully to current 8.0.x. I compared the screenshots with the actual site with Bartik, Seven and Classy.

I found a problem on pages like Manage fields in the (example: admin/structure/types/manage/article/fields). While without the patch you see a number of list items, they are hidden below the content when the patch is applied. I'm attaching two screenshots to show the problem.

The problem comes from the "height: 35px;" that is set in tabs.css, line 7. What is that line in for?

aschiwi’s picture

Status: Needs work » Needs review
StatusFileSize
new18.9 KB
new566 bytes

I identified two problems, the one with the height mentioned in #47, and an issue with a missing border-bottom, which can be seen in the screenshots from comment #47.

I am attaching a new patch and an interdiff file. Please review :)

aschiwi’s picture

StatusFileSize
new19.2 KB

Adding screenshot for expected look with patch from #48.

Anonymous’s picture

StatusFileSize
new383 bytes
new18.89 KB

#48 does fix the missing border issue.
also now that the height: 35px; was removed there was an unused height: 34px; that i've removed

aschiwi’s picture

testing

aschiwi’s picture

Tested again, in Chrome, Firefox, Safari, and iOS Simulator. I'm not sure what the design was for this but it looks different/better in Safari (desktop and smartphone version). Should probably be tested in an android browser and mobile chrome.

aschiwi’s picture

StatusFileSize
new226.32 KB

Looking good in Android browser as well (tested with browserstack, screenshot attached).

Anonymous’s picture

StatusFileSize
new123.7 KB

looks like that in mobile chrome. anyways thats a seperate issue as it was like that even without the patch.

aschiwi’s picture

One more tester please :)

lewisnyman’s picture

Status: Needs review » Needs work

also now that the height: 35px; was removed there was an unused height: 34px; that i've removed

I remember the 35px height being required when we implemented this, but I tested it with the patch and couldn't find a problem. Seven's mark up shouldn't be changing right?

We're almost there! We can make these selectors a bit weaker.

  1. +++ b/core/themes/bartik/css/colors.css
    @@ -12,10 +12,10 @@ body {
    +nav .tabs--primary li a.active {
    
    +++ b/core/themes/bartik/css/style.css
    @@ -1287,46 +1287,46 @@ div.tabs {
    +.tabs--secondary li a {
    ...
    +.tabs--secondary li a.active {
    

    In these situations we can just remove the li's

  2. +++ b/core/themes/bartik/css/colors.css
    @@ -12,10 +12,10 @@ body {
    +nav .tabs--primary li.active a {
    
    +++ b/core/themes/bartik/css/style.css
    @@ -1245,7 +1245,7 @@ div.tabs {
    +nav .tabs--primary {
    
    @@ -1256,21 +1256,21 @@ div.tabs {
    +nav .tabs--primary li {
    

    Why are we adding 'nav' here? I don't think we need it.

  3. +++ b/core/themes/bartik/css/style.css
    @@ -1256,21 +1256,21 @@ div.tabs {
    +[dir="rtl"] nav .tabs--primary li {
    

    In Seven we use the tabs__tab class instead of the li. We should be consistent I think.

+++ b/core/modules/system/css/system.theme.css
@@ -424,12 +424,9 @@ ul.links a.active {
 .tabs > li {

We can change this selector to .tabs__tab to make it weaker

lauriii’s picture

Issue tags: +Needs reroll
subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new19.29 KB

First patch in a D8 issue here :)

subhojit777’s picture

Assigned: subhojit777 » Unassigned
aschiwi’s picture

@subhojit777 Thanks for your work on this! Could you provide an interdiff file to make it easier to review? Here's the d.o documentation I used when creating mine: https://www.drupal.org/documentation/git/interdiff

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

StatusFileSize
new608 bytes

@aschiwi here is the interdiff

Anonymous’s picture

Assigned: subhojit777 » Unassigned
Status: Needs review » Needs work

Theres still work to mentioned in #56

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

@b0unty @LewisNyman I do not understand what do you mean by "make the selectors a bit weaker" as said in #56 I want to get involved in Drupal 8, so please let me create the patch :)

Anonymous’s picture

Making the selectors have less selectors :P
but if you read post #56 it has quite nice explain what to do with which.

subhojit777’s picture

Issue tags: +Needs reroll
subhojit777’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new921 bytes
new921 bytes
new20.76 KB

@b0unty rerolled patch including changes as said in #56. Interdiffs included.

subhojit777’s picture

StatusFileSize
new921 bytes
new921 bytes

Sorry, incorrect extension for interdiffs uploaded. Uploading them again.

Anonymous’s picture

Assigned: subhojit777 » Unassigned
lewisnyman’s picture

Status: Needs review » Needs work

Thanks for the changes.

  1. +++ b/core/themes/bartik/css/style.css
    @@ -1266,96 +1292,53 @@ div.tabs {
    -@media screen and (max-width: 37.5em) { /* 600px */
    -  .tabs ul.primary {
    -    border-bottom: 1px solid #bbb;
    -  }
    -  .tabs ul.primary li {
    -    display: block;
    -    margin: 0;
    -  }
    -  .tabs ul.primary li a {
    -    padding: 5px 10px;
    -  }
    -  .tabs ul.primary li.active a {
    -    border-bottom: none;
    -  }
    -}
    

    It looks like the most recent patch is removing the changes made in #2152521: User login page looks cramped on mobile

  2. +++ b/core/themes/seven/css/components/tabs.css
    @@ -19,8 +19,8 @@
    -.content-header .is-horizontal .tabs:before,
    -.content-header .is-collapse-enabled .tabs:before {
    +#branding .is-horizontal .tabs:before,
    +#branding .is-collapse-enabled .tabs:before {
    

    This also undoes the changes made in #2337379: Rename 'branding' to 'content-header'

Apart from that I can't find anything

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Status: Needs work » Needs review
StatusFileSize
new20.32 KB
new1.07 KB
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Anonymous’s picture

Status: Needs review » Needs work

We will need to rework those selectors also as we've changed the tabs markup.

Jens-0’s picture

Status: Needs work » Needs review
StatusFileSize
new19.61 KB

Fixed mobile login view.

subhojit777’s picture

@Jens-0 could you please submit an interdiff as well so that we can the difference between last two patches.

subhojit777’s picture

@b0unty Sorry but I do not undertand what markup changes have been made. I test applied patch in #76 on 8.0.x branch and it applied without any error. I have asked @Jens-0 to submit an interdiff, may be I can figure out what tab markup changes have been made.

Jens-0’s picture

StatusFileSize
new20.65 KB
new1.94 KB

Failed creating the patch last time, so ignore #79. Now interdiff attached.

droplet’s picture

Status: Needs review » Needs work

I wonder why not change TAB (tabs__tab) to Navigation items (navigation__item). And then we can have a shared .class & markup to set these links displayed in horizontal or vertical styling. e.g.: http://getbootstrap.com/components/#nav

If you looking around the real world web, Tabs are switching the content without refresh, not a group of links in tab-like styling. For examples, the top right links in Drupal.org, if it styled with rounded corners, will you call it Tabs?

https://developer.yahoo.com/ypatterns/navigation/tabs/moduletabs.html
http://www.smashingmagazine.com/2009/06/24/module-tabs-in-web-design-bes...
http://getbootstrap.com/javascript/#tabs
http://foundation.zurb.com/docs/components/tabs.html
http://jqueryui.com/tabs

  1. +++ b/core/themes/bartik/css/colors.css
    @@ -12,10 +12,10 @@ body {
    +.tabs--primary li.active a {
    

    li -> .tabs__tab ?

  2. +++ b/core/themes/bartik/templates/menu-local-tasks.html.twig
    @@ -0,0 +1,27 @@
    +  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
    +<nav role="navigation">
    

    Shouldn't this hidden element put inside NAV tag.

  3. +++ b/core/themes/seven/css/components/tabs.css
    @@ -45,58 +45,63 @@
    +.tabs .tabs__tab {
    

    reduce specificity ?

    .tabs .tabs__tab -> .tabs__tab

  4. .tabs--primary li {
      float: left;
    }
    

    using .is-horizontal to control float:left ?

  5. .tabs__tab.active -> .tabs__tab.is-active ?
    
    

Thanks.

subhojit777’s picture

@droplet I agree with you. But, tab switching without refresh means you have to load content of all pages (unless you are loading via AJAX). Loading all content means it will take more time to completely load the page, the load of HTML DOM will increase considerably and hence browser will start taking more memory. If there are less content to show in tabs then tab switch without refresh seems feasible.

subhojit777’s picture

Status: Needs work » Needs review

@LewisNyman shall we go for the updates as suggested by @droplet

lewisnyman’s picture

Status: Needs review » Needs work

Sorry I missed this.

@droplet This issue is not about the defining what the tabs component is, just to bring the tabs markup inline with our standards. We should move that discussion to another issue to prevent postpone bikeshedding.

I agree with the principle, it is a bit weird to refer them as tabs because they could look like anything, but we do that everywhere right now.

I think all the code comments that Droplet raised in #83, with the exception of 2, are correct so setting to needs work. Let's not change anything that affects accessibility in this patch to keep is simpler.

subhojit777’s picture

Assigned: Unassigned » subhojit777
Issue tags: +Needs reroll
droplet’s picture

About #83-2

+++ b/core/themes/bartik/templates/menu-local-tasks.html.twig
@@ -0,0 +1,27 @@
+{% if primary %}
+  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
+<nav role="navigation">
+  <ul class="tabs tabs--primary clearfix">{{ primary }}</ul>
+  {% endif %}
+  {% if secondary %}
+  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
+  <ul class="tabs tabs--secondary clearfix">{{ secondary }}</ul>
+</nav>
+{% endif %}

H2 is a part of NAV.

subhojit777’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new23.92 KB
new716 bytes

@LewisNyman here goes the patch as suggested by @droplet in #83.

subhojit777’s picture

@LewisNyman @droplet I am not sure why do we need the heading before navigation tabs. Does it serves some sort of accessibility.

Is this issue related #2045039: Cleanup HTML heading structure to this one?

lewisnyman’s picture

@subhojit777 Yep the header is a screen reader improvement.

@droplet I don't want to change anything related to accessibility unless it gets signed off by an accessibility team member. Let's assume it's not broken as it is right now. Maybe we can get @mgifford to weigh in?

droplet’s picture

It's totally markup problem more than accessibility and the problem is introduced in THIS PATCH

If you do something like this that won't affect accessibility in most cases:
<li><ul></li></ul>
But it's an error in markup.

Please have a look:
http://cgit.drupalcode.org/drupal/tree/core/modules/system/templates/men...

If we think H2 is not related to NAV. Then I think the code should be:

{% if primary %}
  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
 <nav><ul class="tabs primary">{{ primary }}</ul></nav>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <nav><ul class="tabs secondary">{{ secondary }}</ul></nav>
{% endif %}

If we think this is related:

<nav>
{% if primary %}
  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  <ul class="tabs primary">{{ primary }}</ul>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <ul class="tabs secondary">{{ secondary }}</ul>
{% endif %}
</nav>

Of course, anyone can explained in their own way, it's hard to say RIGHT or WRONG on HTML5 Semantic World.

mgifford’s picture

Bad markup is bad for accessibility! @droplet I'm a bit confused though how this patch leads to the problems you are describing. I don't see it.

I don't see a problem with the process you are describing. Would make sense to me to wrap a NAV element around both primary & secondary tabs as you've described, but not sure how you'd determine the relationship.

droplet’s picture

StatusFileSize
new46.74 KB

@mgifford,

I have no idea how to explain it in more details because i think it's very clearly and a simple concept. Let me try...

Version A:

{% if primary %}
  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
 <nav role="navigation"><ul class="tabs tabs--primary">{{ primary }}</ul></nav>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <nav role="navigation"><ul class="tabs tabs--secondary">{{ secondary }}</ul></nav>
{% endif %}

Version B:

<nav role="navigation">
{% if primary %}
  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  <ul class="tabs tabs--primary">{{ primary }}</ul>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <ul class="tabs tabs--secondary">{{ secondary }}</ul>
{% endif %}
</nav>

Version C:

{% if primary %}
  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  <nav role="navigation">
    <ul class="tabs tabs--primary">{{ primary }}</ul>
 {% endif %}
 {% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
    <ul class="tabs tabs--secondary">{{ secondary }}</ul>
  </nav>
 {% endif %}

==============================================


thinking of the relationship between NAV & Primary tab & Secondary tab

Now, I just can tell Version A & B are better than Version C. And Version A & B structures are more close to unpatch version.

Just go ahead if you're think Version C is okay.

Cheers :)

subhojit777’s picture

I think @droplet has explained well, and he has a good point. The current twig structure for tabs looks wrong (version C). We should go for either version A or B. I will vote for version A. version A will not harm the accessibility, and its twig structure looks good. @droplet++

@mgifford @lauriii @LewisNyman your call.

mgifford’s picture

Version A or B look good. I don't have a preference. Agreed that C is a problem. @droplet Sorry to have you go into more detail on this.

Let's fix the patch so that we're not getting C?

subhojit777’s picture

Status: Needs review » Needs work
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new23.89 KB
new688 bytes

Here is the patch that follows @droplet's version A suggestion. My explanation for applying version A can be seen here #95. Seems like someone has already corrected Bartik's twig template. This patch fixes system's twig template.

droplet’s picture

StatusFileSize
new24.11 KB
new4.01 KB

A furthermore fixes to #98.

<h2 id="primary-tabs-title" class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  <nav role="navigation" class="is-horizontal is-collapsible" aria-labelledby="primary-tabs-title" data-drupal-nav-tabs>

Actually I just found a better dream markup is already in Seven theme. It's more accessibility. (I didn't add into this patch)

subhojit777’s picture

Status: Needs review » Needs work
  1. +++ b/core/themes/bartik/css/style.css
    @@ -1309,36 +1315,24 @@ div.tabs {
    -  .tabs--primary li.active a {
    

    Do we need this empty styling.

  2. +++ b/core/themes/bartik/templates/menu-local-tasks.html.twig
    @@ -17,11 +17,13 @@
    -<nav role="navigation">
    

    The indentation is incorrect.

droplet’s picture

Do we need this empty styling.

Why ? new Code Standard ?? (If Yes, very odd rule)

mgifford’s picture

Status: Needs work » Needs review

I'm guessing @subhojit777 was reading it wrong. The styling on the removed code doesn't matter. It happens....

Moving this back to Needs review.

lewisnyman’s picture

Status: Needs review » Needs work
StatusFileSize
new506.11 KB

The active states in Seven have disappeared:

Looks like we've changed the .active class to .is-active in CSS even though we haven't in HTML:

+++ b/core/themes/seven/css/components/tabs.css
@@ -154,38 +143,31 @@ li.tabs__tab a {
-.is-collapse-enabled .tabs__tab.active {
+.is-collapse-enabled .tabs__tab.is-active {
...
-[dir="rtl"] .is-collapse-enabled .tabs__tab.active {
+[dir="rtl"] .is-collapse-enabled .tabs__tab.is-active {
...
-.is-open .tabs__tab.active {
+.is-open .tabs__tab.is-active {
subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Sorry @droplet my bad I commented on the deleted codes :p - #100

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new23.92 KB
new2.52 KB

Thanks @LewisNyman for the corrections.

lewisnyman’s picture

StatusFileSize
new437 bytes
new489.32 KB
new23.78 KB

I noticed that the Seven collapsible tab trigger was broken, I guess changing the specificity of the other CSS affected it. I can't see any other problems.

Boaah’s picture

Looks fine for me on OS X 10.10, Chrome 39.0.2171.7.

image
image

Boaah’s picture

StatusFileSize
new88.43 KB
Boaah’s picture

I also testet it now on several other combinations without noticing any problems. I am not sure if i should post all the screenshots i made but i could attach them if anyone is interested.
Windows 7: IE 11 10 9, Chrome 36 35 34, Firefox 30 29 28, Opera 12.16.
OSX 10.10: Firefox 30 29 28, Chrome 36 35 34, Safari 8.
OSX 10.09 Safari 7.
iPhone 5s & 6 Safari.
iPad Air Safari.

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Sounds like we are there then

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs work

Sorry to push this back but this should be a quick fix:

+++ b/core/includes/menu.inc
@@ -331,10 +331,12 @@ function template_preprocess_menu_local_task(&$variables) {
-    $variables['attributes']['class'] = array('active');
+    $variables['attributes']['class'] = array('active tabs__tab');

Seems these should be two separate strings, i.e. array('active', 'tabs__tab');

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new23.96 KB
new2.25 KB
lewisnyman’s picture

@subhojit777 There seems to be more changes in the interdiff than just @tstoeckler's review. Is that intentional?

subhojit777’s picture

StatusFileSize
new739 bytes

The interdiff tool I am using in Ubuntu seems broken. Here is the correct interdiff (Interdiff obtained with the help Stackoverflow: Show all changed files between two Git commits)

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

In that case, back to RTBC. Thanks!

aschiwi’s picture

YAY!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

We need a CR for this and we need evidence of RTL testing.

Anonymous’s picture

subhojit777’s picture

Assigned: Unassigned » subhojit777

Looking into the issue.

subhojit777’s picture

StatusFileSize
new23.95 KB
new417 bytes

@b0unty Thanks for testing this. Here is the fix.

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new18.8 KB
new76.93 KB
new61 KB
new60.73 KB

Screenshots.

Moving this to "Needs review" for the testbots. Anyone please review this, and change it back to "Needs work" as alexpott has asked for change records (#119).

lewisnyman’s picture

Issue tags: -Needs change record

Here's the change record, please review. https://www.drupal.org/node/2394699

nod_’s picture

RTBC +1

subhojit777’s picture

Status: Needs review » Needs work

Invoking tests..

subhojit777’s picture

Status: Needs work » Needs review

Invoking bot to test #122

subhojit777’s picture

Uploading the patch again..

lewisnyman’s picture

+++ b/core/themes/seven/css/components/tabs.css
@@ -260,7 +260,6 @@
 .is-horizontal .tabs--secondary .tabs__tab {
   background: none;
   float: left;
   position: relative;

Is this change intentional? Why are we making this change?

subhojit777’s picture

+++ b/core/themes/seven/css/components/tabs.css
@@ -260,7 +260,6 @@
-  float: left;

I have just removed this styling. Due to this the tabs were not aligning right in RTL (See b0unty's comment in #120). Screenshots taken after applying this patch #123

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Ok makes sense. I manually tested for any regressions around Seven's secondary tabs and it looks good. Thanks!

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new24.06 KB
subhojit777’s picture

Assigned: Unassigned » subhojit777
Status: Needs review » Needs work
StatusFileSize
new24.45 KB
new46.5 KB

There are theme breaks.

Lets see what I can do.

subhojit777’s picture

@lauriii an interdiff always helps to identify the changes.

lauriii’s picture

Its not possible to create interdiff for reroll

subhojit777’s picture

@lauriii I thought you are using interdiff http://freecode.com/projects/patchutils

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Reviewed & tested by the community
StatusFileSize
new18.82 KB
new46.5 KB
new23.88 KB

my bad I did not clear the cache. silly me.

Screenshots:

Thanks all!!

lauriii’s picture

Issue tags: +Needs reroll
subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new23.72 KB
subhojit777’s picture

Assigned: Unassigned » subhojit777
Status: Needs review » Needs work

I have missed the changes in page.html.twig

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new24.28 KB
new476 bytes
new1.61 KB
new2 KB
subhojit777’s picture

Status: Needs work » Needs review
StatusFileSize
new552 bytes
new24.54 KB

I am not sure this fix should go with this issue. However the same test was passing in my localhost, I have PHP 5.5.9

lauriii’s picture

What is the change on #150 intended for?

subhojit777’s picture

#147 was failing due to array syntax. In #150 I corrected it. But later I saw that #147 passed the test. So #150 can be ignored.

Anonymous’s picture

Status: Needs review » Needs work
StatusFileSize
new23.96 KB

When you click an secondary tabs link it colors it just before it loads to annoying grey ( current 8.x without patch doesnt do this) see screenshot.

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new24.32 KB
new445 bytes

There was :focus problem. While replacing the seclectors with new class we missed the :focus attribute style.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new24.85 KB
new10.97 KB
new16.27 KB

Right, i think we are there. (Again ..:D)

Theres a slight problem in bartik but this is also in current master so its a seperate issue.

Bartik Problem :

LTR image with patch :

RTL image with patch :

Anonymous’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new12.15 KB

Actually not RTL has a responsive issue :

subhojit777’s picture

Assigned: Unassigned » subhojit777

@b0unty Thanks for testing

subhojit777’s picture

Status: Needs work » Needs review
StatusFileSize
new1.07 KB
new24.51 KB
subhojit777’s picture

  1. +++ b/core/modules/system/css/system.theme.css
    @@ -438,7 +438,6 @@ ul.links a.active {
    -  margin-left: 0.3em;
    

    This fixes:

  2. +++ b/core/themes/seven/css/base/elements.css
    @@ -129,7 +129,6 @@ ul {
    -  margin-right: 1.5em;
    

    This fixes:

  3. +++ b/core/themes/seven/css/components/tabs.css
    @@ -134,7 +134,6 @@
    -  top: 11px;
    

    This fixes:

subhojit777’s picture

Issue tags: +#SprintWeekend2015
subhojit777’s picture

Issue tags: -#SprintWeekend2015 +SprintWeekend2015
idebr’s picture

Status: Needs review » Needs work
Issue tags: -Amsterdam2014 +Needs issue summary update
StatusFileSize
new67.36 KB
+++ b/core/themes/bartik/templates/menu-local-tasks.html.twig
@@ -0,0 +1,29 @@
+  <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
+  <nav role="navigation" class="is-horizontal">
+    <ul class="tabs tabs--primary">{{ primary }}</ul>
+  </nav>

+++ b/core/themes/bartik/templates/page.html.twig
@@ -137,9 +137,7 @@
-              <nav class="tabs" role="navigation" aria-label="{{ 'Tabs'|t }}">
-                {{ tabs }}
-              </nav>
+              {{ tabs }}

The class "tabs" is no longer available on the <nav> element. This class is necessary for the styling in Bartik. Screenshot after:

Anonymous’s picture

Double post..

Anonymous’s picture

i cant reproduce the issue mentioned in #165 BUT there's another issue with the same place tabs on bartik are missing the underline see screens.

Before:

After:

subhojit777’s picture

StatusFileSize
new560 bytes
new24.51 KB

@b0unty++ Thanks for testing. You have a hawk's eye :)

subhojit777’s picture

Status: Needs work » Needs review
Anonymous’s picture

Status: Needs review » Needs work
StatusFileSize
new9.97 KB
new8.1 KB

Sorry to say this but found one more bug... :(

secondary tabs on RTL do not set the blue border of selected nor :focus on the right. see screens

Before:

after:

after this is fixed we should be RTBC tho

subhojit777’s picture

Assigned: Unassigned » subhojit777

Lets get on with it. Thanks again @b0unty

subhojit777’s picture

Status: Needs work » Needs review
StatusFileSize
new24.91 KB
new1011 bytes

There you go.

subhojit777’s picture

Assigned: subhojit777 » Unassigned
  1. +++ b/core/themes/seven/css/components/tabs.css
    @@ -230,6 +230,26 @@
    +[dir="rtl"] .tabs--secondary .tabs__tab.active {
    +  border-left: 1px solid #bfbfbf;
    +  border-right: 2px solid #004f80;
    +}
    

    This makes sure that the border comes in correct place for active tab.

  2. +++ b/core/themes/seven/css/components/tabs.css
    @@ -230,6 +230,26 @@
    +[dir="rtl"] .tabs--secondary .tabs__tab:focus,
    +[dir="rtl"] .tabs--secondary .tabs__tab:hover {
    +  border-left: 1px solid #bfbfbf;
    +  border-right: 2px solid #008ee6;
    

    This makes sure border comes in correct place for tabs when hovered.

  3. +++ b/core/themes/seven/css/components/tabs.css
    @@ -230,6 +230,26 @@
    +[dir="rtl"] .tabs--secondary .tabs__tab {
    +  padding-left: 15px;
    +  padding-right: 16px;
    +  margin-left: 0;
    +  margin-right: -1px;
    +}
    

    This and the rest of the styles following this makes sure that the text in tab does not moves when hovered.

  4. +++ b/core/themes/seven/css/components/tabs.css
    @@ -230,6 +230,26 @@
    +[dir="rtl"] .tabs--secondary .tabs__tab.active:focus,
    +[dir="rtl"] .tabs--secondary .tabs__tab.active:hover {
    +  padding-right: 16px;
    +}
    

    And this

  5. +++ b/core/themes/seven/css/components/tabs.css
    @@ -230,6 +230,26 @@
    +  padding-right: 15px;
    +}
    

    And this

These styles were not added back while creating dream markup for tabs.

Anonymous’s picture

Status: Needs review » Needs work
StatusFileSize
new21.03 KB

Ty for patch @subhojit777 !
Only problem now is that the styles you added to mobile also affect desktop :
(only on RTL)

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

StatusFileSize
new93.17 KB
new95.66 KB

I am not sure whether this is a bug.

Sorry, its no "toolbar-vertical" class.

subhojit777’s picture

StatusFileSize
new25.51 KB
new1.58 KB

I have added a new class based on which it adds border in rtl mode. I will upload another patch using not() selector. Based on conversation with joelpittet in irc it is okay to use not() selector in Drupal 8, and it is already used in the core.

is it okay if I style with :not() selector? Is Drupal 8 considering browser compatibilities? like IE 8 :p
joelpittet> subhojit777: yes, there are patches in the queue that are using it and in core

lewisnyman’s picture

I think the 'vertical-tabs' class is going to conflict with the vertical tabs UI component, can I suggest using 'is-vertical' like we use 'is-horizontal'?

subhojit777’s picture

StatusFileSize
new1.57 KB
new25.5 KB

Yeah makes sense.

aschiwi’s picture

@subhojit777: did you mean to "needs review" this?

subhojit777’s picture

Nope, see #177. And there is another bug I found (simiar to this #155 but in RTL), will post that soon.

subhojit777’s picture

Title: Dream mark up for tabs » Dream mark uphttps://www.drupal.org/node/1999182# for tabs

I want to apply some styles only when the elements do not come under is-horizontal class. See the interdiff in #179, instead of using is-vertical class I will do that using :not(.is-horizontal).

nod_’s picture

Title: Dream mark uphttps://www.drupal.org/node/1999182# for tabs » Dream mark up for tabs
subhojit777’s picture

Patch using :not selector. I would recommend this patch #179 because it ensures better browser compatibility.

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review

I was checking using responsive tester provided by developer tools Chrome, and there was when you click some link it becomes gray for an instant (like @b0unty said in #155). I guess its not an issue. I am changing this needs review.

Also consider my comment in #176

lewisnyman’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

@subhojit777 We are able to use the :not() selector as we don't support IE8

+++ b/core/themes/bartik/templates/menu-local-tasks.html.twig
@@ -0,0 +1,29 @@
+  <nav role="navigation" class="is-horizontal">
...
+  <nav role="navigation" class="is-horizontal">

We've added the is-horizontal classes to the Bartik theme but I think these classes are only used in the Seven theme?

This now needs a reroll, otherwise I would of manually tested it.

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new25.11 KB

Patch rerolled

idebr’s picture

StatusFileSize
new11.98 KB
new54.59 KB
new52.51 KB

I found two issues with manual testing:

  1. The margin on the secondary tabs has changed:
  2. The content below tabs in Bartik is placed outside the content region:

    Screenshot before:

    Screenshot after:

lewisnyman’s picture

Status: Needs review » Needs work

Settings to needs work based on comment above

Anonymous’s picture

This needs a reroll again.

patch -p1 < ../dream_mark_up_for_tabs-1999182-188.patch 
patching file core/includes/menu.inc
patching file core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
patching file core/modules/system/css/system.theme.css
Hunk #1 succeeded at 413 (offset -14 lines).
patching file core/modules/system/src/Tests/Menu/LocalTasksTest.php
Hunk #1 succeeded at 31 with fuzz 2.
patching file core/modules/system/templates/menu-local-tasks.html.twig
patching file core/modules/user/src/Tests/UserRoleAdminTest.php
Hunk #1 succeeded at 38 (offset 7 lines).
patching file core/modules/views/src/Tests/Plugin/DisplayPageWebTest.php
patching file core/themes/bartik/css/colors.css
patching file core/themes/bartik/css/components/content.css
Hunk #1 succeeded at 121 (offset 1 line).
patching file core/themes/bartik/css/components/tabs.css
Hunk #1 succeeded at 7 with fuzz 2 (offset 3 lines).
Hunk #2 FAILED at 51.
1 out of 2 hunks FAILED -- saving rejects to file core/themes/bartik/css/components/tabs.css.rej
patching file core/themes/bartik/templates/menu-local-tasks.html.twig
patching file core/themes/bartik/templates/page.html.twig
patching file core/themes/seven/css/base/elements.css
Hunk #1 succeeded at 131 (offset 2 lines).
patching file core/themes/seven/css/components/tabs.css
patching file core/themes/seven/seven.theme
patching file core/themes/seven/templates/menu-local-tasks.html.twig
droplet’s picture

+++ b/core/modules/system/css/system.theme.css
@@ -427,20 +427,16 @@ ul.links a.active {
-div.tabs {
-  margin: 1em 0;
-}
-ul.tabs {
+.tabs {
   list-style: none;
-  margin: 0 0 0.5em;
+  margin: 1em 0 0.5em;
   padding: 0;
 }
...
+.tabs__tab {
...
-  margin-left: 0.3em;
+[dir="rtl"] .tabs__tab {

+++ b/core/themes/seven/css/components/tabs.css
@@ -76,44 +66,42 @@ li.tabs__tab a {
-  border-radius: 4px 0 0 0; /* LTR */
+  border-radius: 4px 4px 0 0;

@@ -127,14 +115,13 @@ li.tabs__tab a {
-  padding-right: 4px;
-  padding-left: 4px;
-  border-left: 0; /* LTR */
-  border-radius: 0 4px 0 0; /* LTR */
+  padding: 8px 4px;
+  border-left: 0;
+  border-radius: 0 4px 0 0;

My reviews may not accuracy. However, I think when we do markup changes (HTML), we should do 100% conversion directly and do not to improve CSS in same thread.

jedihe’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new25.16 KB
new544 bytes

Rerolled patch, fixed these conflicts manually:

core/modules/system/templates/menu-local-tasks.html.twig

<<<<<<< HEAD
  <ul>{{ primary }}</ul>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <ul>{{ secondary }}</ul>                                                                                                                                                
=======
  <nav role="navigation">
    <ul class="tabs tabs--primary">{{ primary }}</ul>
  </nav>
{% endif %}
{% if secondary %}
  <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  <nav role="navigation">
    <ul class="tabs tabs--secondary">{{ secondary }}</ul>
  </nav>
>>>>>>> 1999182-reroll

Here I preserved the second part only (which agrees with the intent I see in the patch from #188.

core/themes/bartik/css/components/tabs.css
Hunk 1:

<<<<<<< HEAD                                                                                                                                                              
.tabs ul.primary {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.tabs ul.primary li a {
=======
@media screen and (min-width: 37.5em) { /* 600px */
  .is-horizontal .tabs__tab {
    float: left; /* LTR */
  }
  [dir="rtl"] .is-horizontal .tabs__tab {
    float: right;
  }
}

.tabs--primary {
  border-collapse: collapse;
  height: auto;
  line-height: normal;
  margin: 0;
  overflow: hidden;
  border: none;
  white-space: nowrap;
}
.tabs--primary .tabs__tab {
  display: block;
  vertical-align: bottom;
  margin: 0 5px 0 0; /* LTR */
}
[dir="rtl"] .tabs--primary .tabs__tab {
  margin: 0 0 0 5px;
  zoom: 1;
}
.tabs--primary .tabs__tab.active a {
  border-bottom: 1px solid #ffffff;
}
.tabs--primary .tabs__tab a {
>>>>>>> 1999182-reroll

Here I preserved only .tabs ul.primary from 8.0.x HEAD (first part), but renamed it to .tabs--primary. I kept the whole of the second part (which agrees with #188).

Hunk 2:

<<<<<<< HEAD
@media screen and (min-width: 37.5em) { /* 600px */
  .tabs ul.primary {
    border-collapse: collapse;
    height: auto;
    line-height: normal;
    padding: 0 3px;
    margin: 0;
    overflow: hidden;
    border: none;
    background: transparent url(../../images/tabs-border.png) repeat-x left bottom;
    white-space: nowrap;
  }
  .tabs ul.primary li {
    display: block;
    float: left; /* LTR */
    vertical-align: bottom;
    margin: 0 5px 0 0; /* LTR */
  }                                                                                                                                                                       
  [dir="rtl"] .tabs ul.primary li {
    margin: 0 0 0 5px;
    float: right;
  }
  .tabs ul.primary li a { 
    float: left; /* not LTR */
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }
  .tabs ul.primary li.active a { 
    border-bottom: 1px solid #fff;
  }
}
.tabs ul.secondary {
=======
.tabs--secondary {
>>>>>>> 1999182-reroll

Here I preserved the second part, which agrees almost perfectly with the intent I see in the patch from #188.

I'm attaching the patch + a very simplistic interdiff; I couldn't capture the actual differences I saw between the two patches.

jedihe’s picture

I just did a quick test for #193 on simplytest.me and found primary and secondary tabs looking good. It may be the patch just needs to be updated to account for changes in other parts of core (just a quick guess).

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

These are all unrelated tests that are failing https://qa.drupal.org/pifr/test/979483.

subhojit777’s picture

I am not sure whether the reroll has been done properly.

subhojit777’s picture

The reroll was done properly. Sorry for the confusion, there is something wrong with the tests.

I saw that they are failing because it cannot find some HTML elements which are fetched based on classes like tabs tabs--primary.

+++ b/core/themes/seven/templates/menu-local-tasks.html.twig
@@ -19,12 +19,12 @@
-    <ul class="tabs primary clearfix" data-drupal-nav-tabs-target>{{ primary }}</ul>
+    <ul class="tabs tabs--primary clearfix" data-drupal-nav-tabs-target>{{ primary }}</ul>
   </nav>
 {% endif %}
 {% if secondary %}
   <h2 id="secondary-tabs-title" class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
   <nav role="navigation" class="is-horizontal" aria-labelledby="secondary-tabs-title" data-drupal-nav-tabs>
-    <ul class="tabs secondary clearfix">{{ secondary }}</ul>
+    <ul class="tabs tabs--secondary clearfix">{{ secondary }}</ul>

This has been changed, and the tests should pass. But it is still failing.

When I renamed tabs tabs--primary to tabs primary all tests are passing. I am not sure about this. Am I looking in right place?

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review

Tests corrected (classes renamed). Please do a review of the tests. Fixes done as per #189

subhojit777’s picture

StatusFileSize
new20.18 KB
new5.37 KB
subhojit777’s picture

File appears (as per xjm's comment https://www.drupal.org/node/2394951#comment-9614057) - why the bot is not picking up the patch for test?

subhojit777’s picture

idebr’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new45.98 KB
  1. +++ b/core/modules/system/css/system.theme.css
    @@ -413,20 +413,16 @@ ul.links a.active {
    -.tabs > li {
    +.tabs__tab {
       display: inline-block;
       margin-right: 0.3em; /* LTR */
     }
    

    This no longer overrides the styling in Seven due to lower specificity. This results in a little jumping on small viewports:

  2. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,39 @@ div.tabs {
    -.tabs ul.primary {
    +.tabs--primary {
       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    +@media screen and (min-width: 37.5em) { /* 600px */
    

    Missing closing bracket on .tabs--primary. This syntax error breaks the display of tabs in Bartik.

subhojit777’s picture

Assigned: Unassigned » subhojit777

Thanks @idebr for the review. It is the longest Drupal issue I have worked on :)

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new730 bytes
new20.2 KB

@idebr Could you please explain us more on how you are testing in #206.1. I see that you are changing tabs. I am doing the same in Firefox. I have opened two tabs both showing block layout page, and pages are shown in viewport 320x480. I am changing tabs like you are doing but I dont see the "jump".
I am using Firefox 35.0.1 in Ubuntu 14.04

jedihe’s picture

@subhojit777: I'm guessing @idebr got that by refreshing each tab with a different code state (one before, one after the patch).

idebr’s picture

Status: Needs review » Needs work

@subhojit777 My bad, I was terribly unclear in 206:1. As @jedihe noted I was switching between installations with/without this patch to check for regressions in the display of tabs.

I can confirm 206:2 was fixed, but 206:1 still needs work. Thanks for your work and perseverance on this issue, it's looking very good and we're incredibly close to our dream markup :)

subhojit777’s picture

Assigned: Unassigned » subhojit777

Lets do it :)

subhojit777’s picture

StatusFileSize
new32.5 KB

@idebr I think the problem has already been addressed in #203. Remember you said about the problem in ##18. Were you using the correct patch?
I am seeing a tiny jump though, not as big as #206.1

subhojit777’s picture

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new654 bytes
new20.2 KB

Please check

subhojit777’s picture

Issue tags: +Needs reroll
sarhugo’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new20.06 KB

Solved conflict at core/includes/menu.inc line 38.

idebr’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new31.78 KB
new35.15 KB
new41.06 KB
  1. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +.tabs--primary {
       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    +  @media screen and (min-width: 37.5em) { /* 600px */
    +    .is-horizontal .tabs__tab {
    +      float: left; /* LTR */
    +    }
    +    [dir="rtl"] .is-horizontal .tabs__tab {
    +      float: right;
    +    }
    +  }
    +}
    

    This is invalid CSS syntax

  2. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  border-collapse: collapse;
    

    border-collapse only applies to table elements, so it can safely be removed.

  3. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  height: auto;
    

    This is the default value for height. Since it does not override any previous declarations, it can safely be removed.

  4. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  line-height: normal;
    

    This is the default value for line-height. Since it does not override any previous declarations, it can safely be removed.

  5. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  border: none;
    

    This is the default value for border. Since it doesn't override any previous declarations it can safely be removed.

  6. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  vertical-align: bottom;
    

    Vertical align does not have any effect on block elements, so this attribute can be removed.

  7. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  zoom: 1;
    

    This styling is not specific for RTL. Also it doesn't do anything, so it can be removed.

  8. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -4,10 +4,40 @@ div.tabs {
    +  border-bottom: 1px solid #ffffff;
    

    The CSS coding standards suggest using shorthand color codes when possible, eg. '#fff' instead of '#ffffff'.

  9. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -21,92 +51,73 @@ div.tabs {
    -  }
    
    +++ b/core/themes/seven/css/components/tabs.css
    @@ -76,44 +66,42 @@ li.tabs__tab a {
    +  background-color: #ffffff;
    

    Use a shorthand color code here as well, eg. '#fff' instead of '#ffffff'.

  10. +++ b/core/themes/seven/css/components/tabs.css
    @@ -38,37 +38,27 @@
    -  padding: 9px 2em 7px 1em; /* LTR */
    +  padding: 9px 2em 7px 1em;
    

    The /* LTR */ comment is still relevant here and should not be removed.

  11. There is a little jump in Bartik before/after applying #218:

  12. There is a little jump in Seven before/after applying #218:

  13. There is some weird clipping going on in Seven:

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.94 KB
new19.54 KB

1. Done.
2. Done.
3. Done.
4. Done.
5. Done.
6. Done.
7. Done.
8. Done.
9. Done.
10. Done.
11. Pending.
12. Pending.
13. Pending.

mgifford’s picture

@rpayanm What are 11-13 waiting on? I assume they aren't in the patch and would need to be written. Thanks for the interdiff.

idebr’s picture

Status: Needs review » Needs work

@mgifford I think you are correct, I updated the issue status to 'Needs work' for #219.11 through #219.13.

pivica’s picture

Status: Needs work » Needs review
StatusFileSize
new20.11 KB
new2.46 KB

OK first try...

Rechecked changes from 1 to 10:

1. had an error from before - wrong css rules order, it should be '.is-horizontal .tabs--primary'

with this change there is no need for left float on a tag:

@@ -57,7 +53,6 @@ div.tabs {
     padding: 0 3px;
   }
   .tabs--primary .tabs__tab a {
-    float: left; /* not LTR */
     border-top-left-radius: 6px;
     border-top-right-radius: 6px;
   }

No idea why it was introduced in the first place?

the rest is OK.

11, 12, 13 also fixed.

Also introduced some other changes and fixes, please recheck:

  1. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -1,24 +1,20 @@
     /* --------------- System Tabs  --------------- */
     
    -div.tabs {
    -  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -  margin-bottom: 20px;
    -}
    -.tabs--primary {
    +.tabs {
       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
     }
    

    Quickly searched core and could not find any place where div.tabs combination is used so i removed it.

    This will also fix using of different fonts for secondary tabs - there is really no point if doing this and i guess that original div.tabs rule wanted to work like this.
    But if this is really intended behaviour then we need to introduce different font for secondary tabs.

  2. +++ b/core/themes/seven/css/components/tabs.css
    @@ -38,7 +38,7 @@
       overflow: hidden;
       box-sizing: border-box;
       margin: -1px 0 0;
    -  padding: 9px 2em 7px 1em; /* LTR */
    +  padding: 0;
       width: 100%;  /* 1 */
       border: 1px solid #bfbfbf;
       background-color: rgba(242, 242, 240, 0.7);
    @@ -51,9 +51,6 @@
       color: #008ee6;
       background-color: #fafaf7;
     }
    -.tabs__tab {
    -  padding: 0;
    -}
     .tabs__tab a {
       padding: 9px 2em 7px 1em;
     }
    @@ -107,10 +104,11 @@
     }
     .tabs__trigger {
       display: none;
    +  padding: 9px 0 7px 0; /* LTR */
     }
    

    Moved specific padding: 9px 2em 7px 1em; /* LTR */ to .tabs__trigger selector,

    This change also fixed wrong width of .trigger-element and on click event background color overflow (bg color overflow visible in chrome).

pivica’s picture

Status: Needs review » Needs work
StatusFileSize
new20.11 KB
new379 bytes

While working on #2335523: Remove node.module.css from node/drupal.node library and deprecate node/form library i saw that px/rem mixin is used on other places to, not just here, no idea why? Anyway returning removed rem rule with this patch, no other changes.

pivica’s picture

Status: Needs work » Needs review

Test please.

Anonymous’s picture

Issue tags: +Needs reroll
Anonymous’s picture

Status: Needs review » Needs work
mgifford’s picture

@pivica why did you set it back to needs work & mark as Needs reroll. The bot seems to like it.

Still going back up to comment #219.11 through #219.13?

subhojit777’s picture

Assigned: Unassigned » subhojit777
subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new20.34 KB
mgifford’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new90.84 KB

With the patch, the active tab is no longer being highlighted. In this case the comments were white before.

I didn't see any jumping though which had been reported earlier.

Patrick Storey’s picture

I am removing the Novice tag from this issue because the issue has over 200 comments and that's rather long for a new contributor.

I’m using this documentation as a source: https://www.drupal.org/core-mentoring/novice-tasks#avoid

Really a great amount of contributions have been put into this issue. Very impressive everyone!

Patrick Storey’s picture

Issue tags: -Novice
bill richardson’s picture

#233 still needs investigated

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new20.51 KB
new404 bytes

Just #233 investigation : The active tab has the correct selector, it appears that this is just the wrong color?!

I didn't follow all the comments, so please double check. This is just my small contribution..

bill richardson’s picture

Status: Needs review » Needs work

Tab has bottom line when active and also artifact to the right , also background of tab is changing color when hover on already active tab.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new20.62 KB
new1.69 KB

Hum, difficult to compile all comments, and add my part...
I discovered that li.is-active had become li.active.
It looks much better like that in Bartik and Seven, but again, please double check !

bill richardson’s picture

Status: Needs review » Needs work

Great work - looks a lot better visually after last changes.
Just looking through patch , there still seems several references to is-active rather than active which may need to also be updated.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new20.61 KB
new1.42 KB

You are right, thanks @bill richardson.

idebr’s picture

Status: Needs review » Needs work

Looks great, thanks!

  1. +++ b/core/modules/system/templates/menu-local-tasks.html.twig
    @@ -17,9 +17,13 @@
    -  <ul>{{ primary }}</ul>
    +  <nav role="navigation">
    +    <ul class="tabs tabs--primary">{{ primary }}</ul>
    +  </nav>
    ...
    -  <ul>{{ secondary }}</ul>
    +  <nav role="navigation">
    +    <ul class="tabs tabs--secondary">{{ secondary }}</ul>
    +  </nav>
    

    These changes also have to be applied to classy/templates/navigation/menu-local-tasks.html.twig

  2. +++ b/core/themes/bartik/css/colors.css
    @@ -7,13 +7,13 @@ body {
    -.region-primary-menu .menu-item--active-trail a {
    +.region-primary-menu .menu-item .menu-item--active-trail a {
    

    The first level of the main menu is no longer styled as an active item.

  3. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -1,13 +1,34 @@
    +  .is-horizontal .tabs--primary [dir="rtl"] .tabs__tab {
    

    This selector never applies, as [dir="rtl"] applies to the html tag.

  4. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -1,13 +1,34 @@
    +.tabs--primary .tabs__tab.active a {
    +  border-bottom: 1px solid #fff;
    +}
    

    This change introduces a white line in the mobile viewport on the active tab, so there is a gap in the borders.

  5. +++ b/core/themes/seven/css/components/tabs.css
    @@ -155,38 +140,31 @@ li.tabs__tab a {
    -  left: 0; /* LTR */
    +  left: 0;
    ...
    -  float: left; /* LTR */
    +  float: left;
    
    @@ -195,33 +173,27 @@ li.tabs__tab a {
    -  margin-left: -1px; /* LTR */
    +  margin-left: -1px;
    ...
    -  border-radius: 4px 0 0 0; /* LTR */
    ...
    +  border-radius: 4px 0 0 0;
    ...
    -  border-radius: 0 4px 0 0; /* LTR */
    ...
    +  border-radius: 0 4px 0 0;
    

    The /* LTR */ comment still applies, so it should not be removed.

deepakaryan1988’s picture

Issue tags: -SprintWeekend2015

Removing sprint weekend tag!!
As suggested by @YesCT

Anonymous’s picture

Issue tags: +Novice

Adding novice tag as there's a clear what to do left in comment #242

manjit.singh’s picture

Assigned: Unassigned » manjit.singh
manjit.singh’s picture

Assigned: manjit.singh » Unassigned
Status: Needs work » Needs review
Issue tags: -Novice
StatusFileSize
new21.24 KB
new4.75 KB

changes as suggested in #242.

emma.maria’s picture

Issue tags: +Bartik

Tagging with Bartik as this issue contains it's files and I want to keep an eye on changes and any visual regressions that may occur.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new25.9 KB
new4.66 KB

I applied the changes in #246 to the tests to make them (hopefully) pass.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new25.9 KB
new4.66 KB

One was remaining

lewisnyman’s picture

Status: Needs review » Needs work
Issue tags: +Seven
  1. +++ b/core/includes/menu.inc
    @@ -33,8 +33,10 @@ function template_preprocess_menu_local_task(&$variables) {
    +  $variables['attributes']['class'][] = 'tabs__tab';
    +
    ...
    -    $variables['is_active'] = TRUE;
    +    $variables['attributes']['class'][] = 'active';
    

    We are adding these classes in the preprocess, but we should be added these in the template. Also 'active' should he 'is-active'

  2. +++ b/core/modules/system/css/system.theme.css
    @@ -417,20 +417,16 @@ ul.links a.is-active {
    +.tabs__tab {
       display: inline-block;
       margin-right: 0.3em; /* LTR */
     }
    -[dir="rtl"] .tabs > li {
    -  margin-left: 0.3em;
    +[dir="rtl"] .tabs__tab {
       margin-right: 0;
     }
    

    We are removing the margin right here but we aren't setting margin left for rtl

  3. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -1,13 +1,31 @@
    +.tabs--primary .tabs__tab a {
    

    We can reduce this selector to .tabs--primary a

  4. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -21,92 +39,72 @@ div.tabs {
    -.tabs ul.primary li.is-active a {
    -  background-color: #ffffff;
    +.tabs--primary li.active a {
    

    This selector should use .tabs__tab.is-active

  5. +++ b/core/themes/bartik/css/components/tabs.css
    @@ -21,92 +39,72 @@ div.tabs {
    +  .tabs--primary .tabs__tab a {
    

    This can also be reduced to .tabs--primary a

lewisnyman’s picture

Status: Needs work » Postponed
mgifford’s picture

Status: Postponed » Needs work
Related issues: +#2542582: Clean up the "Tabs" component in Bartik

It's in now.

subhojit777’s picture

Assigned: Unassigned » subhojit777
Issue tags: +Novice

Novice because its quite clear what needs to be done in #256

subhojit777’s picture

Issue tags: +Needs reroll
subhojit777’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new25.12 KB

Just rerolling the patch. Have not applied the changes in #256

subhojit777’s picture

Issue tags: -Novice
StatusFileSize
new24.97 KB
new2.21 KB
subhojit777’s picture

Assigned: subhojit777 » Unassigned
mgifford’s picture

@subhojit777 can you improve the issue summary a bit? It's very vague right now.

emma.maria’s picture

Tabs in Bartik have a lot of visual regressions with the patch in #262.
 

 

 

emma.maria’s picture

Status: Needs review » Needs work
subhojit777’s picture

Issue summary: View changes
subhojit777’s picture

Issue tags: +Novice
emma.maria’s picture

Issue tags: -Novice
rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new24.39 KB

Because there has been so much change since this patch was started, I basically redid the patch line by line so I could really see what was going on. I removed preprocess from the system templates so that classes are added in Classy, as we've been doing. Since Classy is now the default theme for WebTestBase, that gets rid of some of the earlier weirdness. The markup template in the issue summary uses is-active on tabs__tab, not active for the class, so I went with that in the CSS and markup.

There's a lot of refactoring going on in the CSS for Seven and Bartik that makes this patch harder to review and understand than I think is maybe necessary, but who knows, maybe I'm wrong with that. I took out a few really odd things going on in there (like seemingly arbitrary removals of RTL styles), but each line of these CSS changes bears close examination, probably by both LewisNyman and emma.maria. Maybe they wrote some of these changes, and if so, and the changes have good reasons, then great. But at first glance, some were confusing.

Anyhow, would be nice to get this in if we can, although time is short. Hopefully a few good reviews can take care of any remaining nits.

subhojit777’s picture

@mdrummond Thanks for working in this issue. An interdiff could have helped here to see what changes have been made.

rainbowarray’s picture

StatusFileSize
new14.29 KB

#271: I would have done so, but the patch in #262 no longer applied.

I just did a reroll of 262 and then did a diff of that against 270. That may not give a full picture of all the changes, but may be helpful.

lewisnyman’s picture

Status: Needs review » Needs work
StatusFileSize
new510.05 KB
new292.26 KB

Only time for a quick review but there are a few regressions in seven. Mobile isn't too bad though.

gints.erglis’s picture

Patch #270 does not work.
error: core/modules/system/css/components/tabs.theme.css: No such file or directory

prabhurajn654’s picture

Assigned: Unassigned » prabhurajn654
prabhurajn654’s picture

Patch #270 does not work, becaue while resolving other bugs or issues following file might be removed or replaced with other name core/modules/system/css/components/tabs.theme.css

prabhurajn654’s picture

prabhurajn654’s picture

Assigned: prabhurajn654 » Unassigned
prabhurajn654’s picture

Status: Needs work » Needs review
gints.erglis’s picture

StatusFileSize
new22.68 KB
new22.68 KB
gints.erglis’s picture

mgifford’s picture

@Gints Ērglis what are those two files? How are they different? Is one with the tests?

gints.erglis’s picture

@mgifford The first file accidentally posted. The dream-markup-for-tabs-1999182-280.patch contains css fixes for tabs.

jaxxed’s picture

scheduled for testing again because the test failures were inconsistent (different tests failed) and both failures correspond to a DrupalGet() returned 0 bytes.

lewisnyman’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new500.55 KB
new42.38 KB

I tested Bartik and Seven and found a few visual regressions.

gints.erglis’s picture

Fixed tab style in the Bartik theme. Could not get regression in Seven theme.

nlisgo’s picture

Status: Needs work » Needs review

Triggering testbot

Bojhan’s picture

The regression seems clearly visible in Seven, just installing it with Simplytest.me shows it.

manjit.singh’s picture

@Bojhan I have test the latest patch manually on simplytest.me but i am not getting any regression on Seven, Can you please attach some screenshots.

aschiwi’s picture

I will review this again right now.

aschiwi’s picture

After more than a year, I found it hard to review this issue again. The summary isn't really clear on what needs to be done or what is still open to do. I applied the patch to today's 8.x and will post screenshots from my tests in Chrome here.

Testing environment:

* Mac OSX Yosemite 10.10.3
* Chrome 45.x
* Screenshots taken in Chrome developer tools toggle device mode
* Seven theme as admin theme thoroughly (see screenshots)
* Bartik as admin theme (looks fine, added two more screenshots to show this)
* Classy as admin theme (result: not testable - Classy comes without tabs at the moment)

Also tested with (found no issues in):
* Safari
* Firefox
* Xcode iOS Simulator (iPad mini, iPhone 4-6s)

Also checked:
* scanned through code changes to look for obvious errors

Did NOT check:
* Code style / class names (don't know enough about how Drupal does it)
* Any version of Internet Explorer

Summary
I think it looks great and this deserves to finally be committed :) Any new small issues coming up could always be fixed later. I say this because I have been following this issue for a year and it's a relatively small change. I would be happy to finally see this be committed.

aschiwi’s picture

aschiwi’s picture

Added two more screenshots for Bartik as addition to #296

aschiwi’s picture

StatusFileSize
new41.71 KB

we found one more issue with certain sizes when the administration menu is on the left.

* Mobile: landscape
* Tablet: portrait and landscape

Steps to reproduce

* use mobile or tablet in portrait mode
* Go to /admin/structure/types/manage/article/display
* have menu open
* at this point, everything looks good still
* close menu by clicking on "Manage" in the toolbar
* Go to /admin/structure/types/manage/article/fields
* open menu by clicking on "Manage" in the toolbar
* it should look like the screenshot on this comment

Suggestion for solution by my colleague hctom:

* Currently only the window.resize() event is bound to trigger resize handling. You should also bind toolbar events like drupalToolbarOrientationChange and drupalToolbarTrayChange (see modules/toolbar/js/toolbar.js lines 121 and following), because the toolbar in vertical mode changes the actual width of the site content.

aschiwi’s picture

Status: Needs review » Needs work

Forgot to change the status.

emma.maria’s picture

Version: 8.0.x-dev » 8.1.x-dev

Let's get this issue rolling again! :)

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new23.4 KB

Rerolled the patch. This doesn't take any of the classy / stable stuff in account but just applies the same way as the last one.

lauriii’s picture

lewisnyman’s picture

Status: Postponed » Active

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Should it went to starterkit theme?

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -

This issue this was postponed on was fixed 9 years ago. Since, then there has been no discussion here for 9 years. Perhaps this has been resolved?

I am setting the status to Postponed (maintainer needs more info) to find out if this is still needed. If confirmation that this is needed is not given, this may be closed after three months.

smustgrave’s picture

Wanted to bump 1 more time, also bartik and seven are no longer in core :)

liam morland’s picture

Version: 11.x-dev » main
Status: Postponed (maintainer needs more info) » Active

I think it is settled that the most desirable markup for navigation lists is a nav element containing a list element, which is what Drupal currently uses. So, I suggest this be closed "works as designed".

smustgrave’s picture

Status: Active » Closed (won't fix)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.