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

Menu Items overview - Filter on Component - v2 #28832

Merged
merged 45 commits into from
Jan 12, 2023

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Apr 27, 2020

Pull Request to add a Component filter to the "Menus: Items" overview.

It's PR #24665 re-done for the current Joomla 4.2-dev.

Summary of Changes

This PR adds a Component filter to the menu items overview so that you can filter on specific Components.

Before PR

menu-before-pr2

Testing Instructions

  • Install the PR.
  • Open the Menus: All Menu Items page (Menus > All Menu Items)
  • Create a menu item of type Contact - Single Contact
  • Click on "Search Tools",
  • Select a component (e.g. Contacts)

Expected result

The list of menu items should be filtered to only show menu items to views of that selected Component.

After PR

A new Filter field should be available:
menu-after-pr

The new filter fields enables you to filter on Menu Items of type = Articles (com_content)
menu-after-pr-articles

The new filter fields enables you to filter on Menu Items of type = Contacts (com_contact)
menu-after-pr-contacts

@ChristineWk
Copy link

I have tested this item ✅ successfully on aaf4ce3


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

1 similar comment
@jwaisner
Copy link
Member

I have tested this item ✅ successfully on aaf4ce3


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

@jwaisner
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 30, 2020
@alikon
Copy link
Contributor

alikon commented Apr 30, 2020

@pe7er look at https://github.com/pe7er/joomla-cms/pull/1it use the prepared statement for the new where clause

@wilsonge
Copy link
Contributor

wilsonge commented May 2, 2020

Wouldn't it be more obvious to filter by menu item type than component?

@sere-b
Copy link

sere-b commented May 2, 2020

I have tested this item ✅ successfully on d951e96


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

@richard67
Copy link
Member

Back to pending after recent change for prepared statements. One more tester needed.


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

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 2, 2020
@ChristineWk
Copy link

I have tested this item ✅ successfully on d951e96


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

@richard67
Copy link
Member

richard67 commented May 2, 2020

Back to RTC after 2 good tests. But could you check @wilsonge 's comment "Wouldn't it be more obvious to filter by menu item type than component?"? Seems to be a valid question to me.


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

@richard67 richard67 added the RTC This Pull Request is Ready To Commit label May 2, 2020
@richard67
Copy link
Member

@pe7er Could you check George's comment above? I think it is a valid question. When fitering by the type of menu item we may achieve nearly the same result, because the item types are connected to the component, and it might also be easier.


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

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 9, 2020
@pe7er
Copy link
Contributor Author

pe7er commented May 12, 2020

@richard67 @wilsonge I have changed my PR:

  • added a new Field type MenuItemByComponent to filter by menu item type (instead of component)

Before the change the dropdown would be:
joomla-menu-filter-before

After the change the dropdown looks like:
joomla-menu-filter-3

Note: I've added a ->where($db->quoteName('menu.client_id') . ' = 0') to the query.
Otherwise it would also show menu items from the admin menu in the dropdown:
joomla-menu-filter

@richard67
Copy link
Member

@pe7er Should the label then still be "- Select Component -"?

@pe7er
Copy link
Contributor Author

pe7er commented May 12, 2020

@richard67 yes, I think so. Or do you have a suggestion for something better?

@obuisard
Copy link
Contributor

I would like to add that when a component is uninstalled, the menu items created with that component become 'orphan' and are no longer 'filtrable'. I would assume this as 'normal' behavior.

@pjdevries would you mind recording your test in the issue tracker? Thank you.

@obuisard
Copy link
Contributor

obuisard commented Oct 26, 2022

This PR requires updated documentation for the online help such as the one found at https://help.joomla.org/proxy?keyref=Help42:Menus:_Items

Thank you!

@obuisard obuisard added the UI/UX label Nov 4, 2022
@jwaisner
Copy link
Member

jwaisner commented Nov 8, 2022

I have tested this item ✅ successfully on 40e3f99


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

@jwaisner
Copy link
Member

jwaisner commented Nov 8, 2022

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 8, 2022
@obuisard
Copy link
Contributor

obuisard commented Nov 8, 2022

Great PR, thank you Peter @pe7er for this feature and for all to comment and help make this a good addition. Peter, do you need help with documentation?

obuisard and others added 4 commits November 8, 2022 13:18
…ntField.php

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
…ntField.php

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
…ntField.php

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
…ntField.php

Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
@richard67
Copy link
Member

@jwaisner @obuisard Could at least one of you redo your test because there have been some changes? Just to see if it still works, so we can keep RTC. Thanks in advance.

@richard67 richard67 added Documentation Required UI/UX and removed Updates Requested Indicates that this pull request needs an update from the author and should not be tested. labels Nov 12, 2022
@obuisard
Copy link
Contributor

I have tested this item ✅ successfully on 40e3f99

2nd testing successful


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

@obuisard
Copy link
Contributor

Hello Peter @pe7er, do you need help with documentation? Would love to sere this PR merged soon.

@carlitorweb
Copy link
Member

Documentation added ✔️ (https://docs.joomla.org/Help4.x:Menus:_Items)

@obuisard obuisard added this to the Joomla! 4.3.0 milestone Jan 12, 2023
@obuisard obuisard merged commit f1f4f7d into joomla:4.3-dev Jan 12, 2023
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 12, 2023
@obuisard
Copy link
Contributor

Thank you Peter @pe7er for this PR!

heelc29 added a commit to heelc29/joomla that referenced this pull request Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Required Language Change This is for Translators Maintainers Checked Used if the PR is conceptional useful UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.