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

Solution for long dropdown submenu #14300

Closed
wants to merge 8 commits into from

Conversation

GulomovCreative
Copy link
Contributor

What does it do?

  1. Add new system setting topmenu_submenu_max_items
  2. Check this setting and moves remainings items to new item with label "More"
  3. Add right arrow/triangle for menu items that have children

Process gif

ux

screenshot-revolution-2019 01 20-18-23-00

Why is it needed?

Description from #11939

When there's a long Extras dropdown menu, and not enough screen space, the bottom items get cut off. It's not possible to scroll down or access them.

Related issue

Closes #11939

@JoshuaLuckers
Copy link
Contributor

PR’s with new functionality should target the 3.x branch

@Ruslan-Aleev
Copy link
Collaborator

Ruslan-Aleev commented Jan 20, 2019

@JoshuaLuckers This problem is not relevant for 3.x. I think better in 2.x.
Although PR with an icon in the list is present for 3.x

@GulomovCreative GulomovCreative changed the title Fixed long dropdown submenu #11939 Solution for long dropdown submenu #11939 Jan 20, 2019
@JoshuaLuckers JoshuaLuckers added type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript. pr/review-needed Pull request requires review and testing. labels Jan 21, 2019
manager/controllers/default/header.php Outdated Show resolved Hide resolved
manager/controllers/default/header.php Outdated Show resolved Hide resolved
manager/controllers/default/header.php Show resolved Hide resolved
if(!empty($moreMenu)) {
$output .= '<li><a class="right">'.$this->modx->lexicon('more').'</a>'."\n";
$output .= '<ul class="modx-subsubnav more">'."\n";
$this->processSubMenus($output, $moreMenu);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maximum amount of items should also apply here.

@JoshuaLuckers JoshuaLuckers added blocked Active participation around the pull request or issue required. Consensus is not reached. and removed pr/review-needed Pull request requires review and testing. labels Jan 21, 2019
@Jako
Copy link
Collaborator

Jako commented Jan 21, 2019

It should be relevant for 3.x, too. Scrolling in menus should be made avoidable, if possible.

@Ruslan-Aleev
Copy link
Collaborator

@Jako Yes, literally a couple of hours found the same problem in MODX3, although I had not noticed before. Therefore, it is not clear what to do with PR.

JoshuaLuckers and others added 3 commits January 21, 2019 23:15
Co-Authored-By: GulomovCreative <gulomov@live.ru>
Co-Authored-By: GulomovCreative <gulomov@live.ru>
Co-Authored-By: GulomovCreative <gulomov@live.ru>
@Jako Jako added this to the v3.0.0-alpha milestone Jan 23, 2019
@Mark-H
Copy link
Collaborator

Mark-H commented Jan 24, 2019

So, I see 2 scenarios for this (really cool!) improvement.

We either approve it for 2.x, in its current form, and then when 2.x gets merged into 3.x that'll likely cause weird conflicts that need to be manually resolved.

Or, this PR is updated to target 3.x instead. That probably means a bit more work to get things looking just as nice, but it'll avoid that responsibility falling on the integrators doing a merge (which is typically complicated enough, and those integrators may not always know all the intricacies of individual PRs when doing that).

So (for completely selfish reasons :D), my vote would go to making it ready for 3.x instead. That then also adds another great reason to hurry with finishing that up for a proper release, and we could add a sensible default (maybe 10?) to the setting that controls it so it kicks in automatically :)

@GulomovCreative GulomovCreative changed the title Solution for long dropdown submenu #11939 Solution for long dropdown submenu Jan 25, 2019
@GulomovCreative
Copy link
Contributor Author

So, I see 2 scenarios for this (really cool!) improvement.

We either approve it for 2.x, in its current form, and then when 2.x gets merged into 3.x that'll likely cause weird conflicts that need to be manually resolved.

Or, this PR is updated to target 3.x instead. That probably means a bit more work to get things looking just as nice, but it'll avoid that responsibility falling on the integrators doing a merge (which is typically complicated enough, and those integrators may not always know all the intricacies of individual PRs when doing that).

So (for completely selfish reasons :D), my vote would go to making it ready for 3.x instead. That then also adds another great reason to hurry with finishing that up for a proper release, and we could add a sensible default (maybe 10?) to the setting that controls it so it kicks in automatically :)

@Mark-H I got it. I will make it ready for 3.x. Thx!

@JoshuaLuckers
Copy link
Contributor

@GulomovCreative is this still on your radar? If you need any help please let us know.

@Mark-H
Copy link
Collaborator

Mark-H commented Sep 1, 2019

Closing as the consensus is to recreate this for 3.

@Ruslan-Aleev
Copy link
Collaborator

Guys, maybe it's worth merge this fix into the 2.x after all? On some projects it is not possible to work with the menu in principle.

@Ruslan-Aleev Ruslan-Aleev modified the milestones: v3.0.0-alpha1, v2.8.4 Sep 23, 2021
@Ruslan-Aleev Ruslan-Aleev added the proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. label Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Active participation around the pull request or issue required. Consensus is not reached. proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long Extras menus extend beyond visible page
5 participants