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

[5.0] Smart Search: Add debugging features #36753

Merged
merged 58 commits into from May 29, 2023

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 20, 2022

Summary of Changes

In order to gain wider adoption from third party developers, we need to provide them with improved development tools. This PR implements a few features, which become visible when the debug mode is enabled.

Display indexed item

First of all we want to be able to see what has been indexed for an item. When you enable debugging, the list of entries in the index will now be linked and clicking on such an entry will give you a view which displays the common data from indexed items, the type specific items, the indexed terms and the associated taxonomies. This allows you to understand if the content was indexed the way you expected it, as well as with the weighing you expected.

Debug indexing of one specific item

Again, when debugging is enabled, a new dropdown button in the index view appears with "Index debugging". This button goes to a new view, where you can select a finder plugin and type in an ID to index and it will then run that plugin for that ID. It will then either return what has been prepared to be indexed by the indexer in the result object or whatever output the plugin generated. This should allow a developer to better write a new finder plugin to index their content.

Testing Instructions

  1. Install Joomla and provide some sample data. Please note that this PR requires "npm i" to be run again after it has been applied!
  2. Enable debugging mode in global configuration
  3. Go to Smart Search and click on an entry in the list to display the data in the index for this item
  4. Click on "Index > Index debugging" and select a finder plugin from the list.
  5. Type in an ID, for example "60" in case you are using the testing sample data, and click on "Index"

Notes

  1. The dropdown button seems to have a styling error when using a modal button as first entry. The spacing is wrong and I couldn't find out why.
  2. The Javascript is most likely "not optimal". I'm happy for corrections.
  3. I'm open for better language strings.
  4. Since 4.1 is in RC, this will have to go into 4.2. Since there is no 4.2-dev branch yet, I'm pointing this towards 4.1-dev for now.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.1-dev labels Jan 20, 2022
Hackwar and others added 7 commits January 20, 2022 21:19
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
@Quy Quy added PR-4.2-dev and removed PR-4.1-dev labels Jan 24, 2022
@joomla-cms-bot joomla-cms-bot removed Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester labels Mar 28, 2023
….2-finder-debug

# Conflicts:
#	administrator/language/en-GB/install.xml
#	administrator/language/en-GB/langmetadata.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	api/language/en-GB/install.xml
#	api/language/en-GB/langmetadata.xml
#	composer.json
#	composer.lock
#	installation/language/en-GB/langmetadata.xml
#	language/en-GB/install.xml
#	language/en-GB/langmetadata.xml
#	libraries/src/Version.php
#	plugins/system/webauthn/src/MetadataRepository.php
@Quy Quy removed the PR-4.4-dev label Mar 28, 2023
….2-finder-debug

# Conflicts:
#	composer.json
#	composer.lock
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester labels Apr 3, 2023
@HLeithner
Copy link
Member

I would mark all debuging functions/class "@internal" since it's not intended to be used by 3rd party developer.

@Hackwar Hackwar added the Feature label Apr 6, 2023
Copy link
Member

@HLeithner HLeithner left a comment

Choose a reason for hiding this comment

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

I would like to merge this in to j5 do we already have documentation?

@Hackwar
Copy link
Member Author

Hackwar commented Apr 17, 2023

I would like to merge this in to j5 do we already have documentation?

No, I need to write the complete documentation for Smart Search still.

@Hackwar Hackwar closed this Apr 18, 2023
@Hackwar Hackwar reopened this Apr 18, 2023
@HLeithner HLeithner merged commit 7476510 into joomla:5.0-dev May 29, 2023
3 checks passed
@HLeithner
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.0-dev
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet