Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin menu dropdown in Joomla! 3.6.0 RC1 #10987

Merged
merged 12 commits into from
Jul 6, 2016
Merged

Conversation

cyrezdev
Copy link
Contributor

@cyrezdev cyrezdev commented Jul 1, 2016

Pull Request for Issue #10972.

Summary of Changes

  • Fix missing pointer in dropdown menu
  • Fix sub-menu top placement

Testing Instructions

@cyrezdev cyrezdev changed the title Patch 32 Fix for issue #10972 (3.6.0-rc) Jul 1, 2016
@brianteeman brianteeman changed the title Fix for issue #10972 (3.6.0-rc) Admin menu dropdown in Joomla! 3.6.0 RC1 Jul 1, 2016
@brianteeman brianteeman changed the title Admin menu dropdown in Joomla! 3.6.0 RC1 Fix for issue #10972 (3.6.0-rc) Jul 1, 2016
@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on daa3d4d

All good


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@brianteeman brianteeman changed the title Fix for issue #10972 (3.6.0-rc) Admin menu dropdown in Joomla! 3.6.0 RC1 Jul 1, 2016
@brianteeman
Copy link
Contributor

@JoomliC bad memory I guess I thought the other PR was yours - thanks for fixing it though

@C-Lodder can you confirm

@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 1, 2016

@JoomliC bad memory I guess I thought the other PR was yours - thanks for fixing it though

This what i thought ;-)
Thanks for test!

@StefanSTS
Copy link
Contributor

Tested and works. Applied Commit SHA: daa3d4d with patch tester.

@wojsmol
Copy link
Contributor

wojsmol commented Jul 1, 2016

@StefanSTS
Copy link
Contributor

I have tested this item ✅ successfully on daa3d4d

Thanks for the links. Works as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@brianteeman
Copy link
Contributor

Rtc


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 1, 2016
@brianteeman
Copy link
Contributor

Setting for 3.6 as it fixes a bug introduced in 3.6


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@brianteeman brianteeman added this to the Joomla 3.6.0 milestone Jul 1, 2016
@infograf768
Copy link
Member

Not sure it should be RTC.
RTL needs more care, before as well as after patch.
Position of sub and arrow.

Before patch

screen shot 2016-07-02 at 08 21 37
After patch

screen shot 2016-07-02 at 08 18 08

@infograf768
Copy link
Member

Would already be better imho (although the arrow will not display exactly as it should) without

.navbar .nav > .dropdown.open:after {
    right: 10px;
}

for rtl

@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 2, 2016

@infograf768 you're right, i should have checked on RTL!
I remove the rtl declaration for pointer.
There are issue in RTL not yet reported, and i thought it was ok in RTL as PR #9375 was already merged (but not sure it was tested on RTL...)

So, the position top and arrow not displayed is fixed now.
But 2 other issues in RTL : placement of pointer & placement of sub-menu.

It seems that template.js is not working to get correctly the offset (as i suspected here #10972 (comment) there is maybe something wrong in the script...) @C-Lodder any idea ? (as you did the PR, your help is welcomed, as i don't see yet how to fix it, and keep your auto-scrolling feature...)

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @brianteeman, @StefanSTS


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @brianteeman, @StefanSTS


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@brianteeman
Copy link
Contributor

Removed rtc


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 2, 2016
@Twincarb
Copy link
Contributor

Twincarb commented Jul 2, 2016

I have tested this item ✅ successfully on 8c324ba


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 2, 2016

@Twincarb not to be tested again yet, as still an issue in RTL that should be fixed ;-)

@Twincarb
Copy link
Contributor

Twincarb commented Jul 2, 2016

I have tested this item 🔴 unsuccessfully on 8c324ba

Changed my result having read down to the first successful tests then paged down to the bottom with the extra commits missing infografs input.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @brianteeman, @StefanSTS, @Twincarb


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @brianteeman, @StefanSTS, @Twincarb


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 2, 2016

@infograf768 @Twincarb @brianteeman @StefanSTS i have updated this PR to improve a bit the script, and to fix the issue with submenu placement in RTL reported by @infograf768

If you could test again this PR ? (in LTR and RTL language)

Thanks everybody!

Note: @C-Lodder if you have time to look at code, i have redo a bit your script code in template.js, to set the offset of the submenu with no hardcoded value, and changing a bit the way it is handled. Thanks! ;-)

@dgrammatiko
Copy link
Contributor

I have tested this item ✅ successfully on d7442a8


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@infograf768
Copy link
Member

@JoomliC
I also made a PR with simpler changes to template.js.
https://www.dropbox.com/s/lmbobjg8rj5ly5v/admin_menu.diff?dl=0

diff --git a/administrator/templates/isis/js/template.js b/administrator/templates/isis/js/template.js
index 28eb4ff..d465088 100644
--- a/administrator/templates/isis/js/template.js
+++ b/administrator/templates/isis/js/template.js
@@ -75,6 +75,7 @@
            var dropdown = $self.next('.dropdown-menu');
            var offset   = $self.offset();
-           var scroll   = $(window).scrollTop() + 5;
+           var scroll   = $(window).scrollTop() + 8;
            var width    = menuWidth - 13;
+           var rtlwidth = menuWidth + 10;

            // Set the submenu position
@@ -83,5 +84,5 @@
                emptyMenu.css({
                    top : offset.top - scroll,
-                   left: offset.left - width
+                   left: offset.left - rtlwidth
                });
            }

I get exactly the same results as your PR, but... in both cases I have issues here with the User Menu and some glitches with the bottom link in each menu with a sub.
Here is a screen recording :
https://www.dropbox.com/s/fhlweqzwmq1s07g/admin_menu_rtl.mp4?dl=0

@Twincarb
Copy link
Contributor

Twincarb commented Jul 3, 2016

I have tested this item ✅ successfully on d7442a8

Checked in several rtl languages, and also across Chrome, IE, Edge, Firefox. No issues found having cleared the browser cache. Unable to replicate the issues infograf768 found in his video.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@infograf768
Copy link
Member

@JoomliC
Ok, I found the culprit. All depends on the length of the lang string value in mod_menu.ini
If the value is more than a certain number of characters/glyphs, it breaks the way I show in my video.
For Farsi, which was the language I used,
we have
MOD_MENU_COM_USERS_ADD_LEVEL="ایجاد سطح دسترسی جدید"
and
MOD_MENU_COM_USERS_NOTE_CATEGORIES="مجموعه یادداشت کاربر"

If the value is more than 19 latin characters (or its equivalent in glyphs), in the menu OR the submenu it pushes the submenu by a number of pixels depending on the longest glyph.

@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 3, 2016

@infograf768 Do you have recorded your video with this PR updated, or with your own changes in template.js ?
If with your own changes, the issue is expected because of submenu width is not a fixed one and change for each submenu (that's the reason i subtract the submenu width dynamically to adjust the offset left. ;-) )

I don't have any issue with Farsi with this PR as it is now. Could you do a test with only this PR applied and no custom changes ?

Note: in the updated PR, to fix RTL, i get dynamically the link width (menu link to open the dropdown) and then get too its padding left (this is currently 10px, so that's the reason for the need of "10", but better to get this padding dynamically than statically ;-) ).
And if you check the left position set in RTL for submenu in my PR, you will see that i get the submenu width dynamically too (this is to fix the issue you have with your custom template.js ;-) ) :
left: offsetLeft - (menuWidth - linkWidth) - submenuWidth

So, maybe an issue in your re-test of this PR after update ? (As i don't have the issue you have recorded here in Farsi : https://www.dropbox.com/s/fhlweqzwmq1s07g/admin_menu_rtl.mp4?dl=0 but with your custom code for template.js, it is "normal" to have this issue ;-) )

Thanks!
Cyril

@infograf768
Copy link
Member

My mistake somewhere among all the tests sites...

RTC. Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 3, 2016
@cyrezdev
Copy link
Contributor Author

cyrezdev commented Jul 3, 2016

You're welcome @infograf768 👍

Thanks everybody for testing!

@infograf768
Copy link
Member

@JoomliC
Please look at #11013
I don't have any test sites here with so many components.

@RonakParmar
Copy link

I have tested this item 🔴 unsuccessfully on d7442a8


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@RonakParmar
Copy link

I have installed latest staging branch in my local and applied this PR, still having same issue.screen shot 2016-07-04 at 01 28 51


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10987.

@infograf768
Copy link
Member

infograf768 commented Jul 4, 2016

I confirm issue
#11013

@RonakParmar
No relation with this PR. Your screenshot is fine and unrelated to the issue you found.
I posted my findings on #11013

@C-Lodder
Copy link
Member

C-Lodder commented Jul 5, 2016

What's happening with this. Do I need to look into anything or is it now RTC

@infograf768
Copy link
Member

It is RTC.
@wilsonge

I suggest this goes into next RC.

@wilsonge wilsonge merged commit 63a4466 into joomla:staging Jul 6, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet