-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.0] Sidebar - switch to vertical collapsing #22587
Conversation
opacity: 1 !important; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files should end with a trailing newline
visibility: visible !important; | ||
opacity: 1 !important; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace
transition-delay: 0s !important; | ||
.sidebar-item-title, | ||
.has-arrow::after { | ||
display: none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declaration should be terminated by a semicolon
visibility: hidden; | ||
transition-delay: 0s !important; | ||
.sidebar-item-title, | ||
.has-arrow::after { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening curly brace {
should be preceded by one space
transform: rotate(-135deg) translate(0, -50%); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace
cursor: text; | ||
background: none; | ||
a { | ||
padding: 4px 5px 4px 2px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered display, padding
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace
outline: 0; | ||
box-shadow: inset 0 0 0 1px #78aeda; | ||
&::before { | ||
content: ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered position, top, bottom, left, width, content, background-color
Prefer double-quoted strings
background-color: $sidebar-sub-bg; | ||
} | ||
> a { | ||
padding: 10px 6px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered display, padding
&:first-of-type { | ||
border-top: 1px solid rgba($black, .15); | ||
&:hover { | ||
color: white; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color white
should be written in hexadecimal form as #ffffff
bottom: 0; | ||
left: 0; | ||
width: 3px; | ||
content: ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings
opacity: 1; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace
Does this mean the quick link for New Item has been abandoned? |
I have no idea. I haven't been part of any conversation on the topic. I'm guessing if there is no one to implement, it probably is. |
So now I am confused because I thought that the only problem with the existing menu was that it didnt support that |
When used with the menu bar toggled to collapsed
From an accessibility perspective
|
Very nice! But i also feel the lack of "New Item"... |
I honestly can't comment on that.. it wasn't from me you heard it. My reasoning for changing this to an accordion is I find the current menu gimmicky at best. Imo accordions work in almost every instance (device, number of items, expected behavior, expandable, industry standard ... ). It is fair to say we have tried everything else.
Personally, I have always found the icons too big in J4. I'll increase the size slightly although I would like to avoid increasing the height of each menu item. A downside to accordions is the need to scroll on larger menus, increased menu item heights would increase this probability.
I presume you are referring to when an item is opened? The menu should stay open on the 'current' menu item? I'll update the PR regarding the accessibility issues presuming I get any indication that this is deemed an improvement and might actually get merged. Regarding the 'new item' option there is no reason why it can't be added to this menu after. There are both a11y and PHP considerations on how best it should be done. Neither of which are areas I am skilled in. |
Point taken about the menu item height
Sorry something got lost as I was editing the report. There are two different issues
|
Do we really need the option to toggle the menu down to just the icons? It complicates this no end and also bordering on being a bit of a gimmick. |
Personally it is essential. For me it was the thing that convinced me a vertical menu was a good choice. In all the time I have been working with J4 I have not had it expanded at all. As for it being a gimmick it is a very common design pattern. |
text-align: center; | ||
vertical-align: middle; | ||
.menuitem-group { | ||
text-transform: uppercase; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered margin-top, font-size, text-transform, letter-spacing, list-style
@@ -124,9 +126,10 @@ Joomla = window.Joomla || {}; | |||
allLinks[i].classList.add('active'); | |||
// Auto Expand First Level | |||
if (!allLinks[i].parentNode.classList.contains('parent')) { | |||
mainNav.classList.add('child-open'); | |||
mainNav.classList.add('CIARAN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄 Lucky really.. they are usually a lot more offensive
My thoughts are with you Ciaran. Probably the 6th time you've revisited this and it's now back to square 1 :D Much better using an accordion:
One thing I will say it just ensure that when you have an expanded menu item, ensure you can still scroll through the menu if there are too many items. |
current and toggle now working as expected although I would add some styling to <a active similar to the styling on the active parent
there are still a lot of a11y errors |
@C-Lodder You have said accordions are the way to go from day one... we should have listened 😄 |
letter-spacing: 1px; | ||
} | ||
.divider { | ||
background-color: $sidebar-text-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered height, margin, list-style, background-color, opacity
|
||
a::before { | ||
display: none; | ||
&::before { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nesting should be no greater than 4, but was 5
> span { | ||
color: rgba($white, .4); | ||
&::before { | ||
font-family: 'FontAwesome'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered position, top, left, font-family, font-size, color, content
Prefer double-quoted strings
|
||
&:hover { | ||
background-color: rgba(0,0,0,.4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered color, background-color
I have amended the styling per your a11y suggestions.
The above I am not really sure where/how to change. Could you possibly create issues and hopefully someone with the smarts can fix them. The issues are present regardless of this PR. |
I have tested this item ✅ successfully on c053ed5 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22587. |
Second levels will now open if active |
I have tested this item ✅ successfully on d69c02c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22587. |
LGTM lets merge and then I can fix the a11y |
@@ -136,10 +137,17 @@ | |||
} | |||
} | |||
|
|||
.divider, | |||
.menuitem-group { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be just menuitem not menitem-group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the separator element as seen under Menus ('Site'). Class name is there since Joomla 3. Shall I change it? Not sure 'menuitem' is suitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops commented in the main thread
small css change required https://github.com/joomla/joomla-cms/pull/22587/files#r225589673 |
You can ignore that. Chrome lists default values set by the browser as 'user'. That CSS is not in the template. |
ok - maybe it is something else causing the error I am hearing with a11y - I will look into that when I do the a11y pr |
Is the screenreader reading something it shouldnt? |
yes - it is saying white bullet |
I have tested this item ✅ successfully on d69c02c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22587. |
PR ready to submit to address accessibility once this is merged This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22587. |
Thanks, makes working with components usable. |
@brianteeman @laoneo @C-Lodder Thanks for the help on this |
Pull Request for Issue # .
Summary of Changes
Redesign of the sidebar with vertically collapsing/expanding menu.
Testing instructions
Can't be tested with patchtester.
Documentation Changes Required