NPM Resource Changed Information Required ? Pending

User tests: Successful: Unsuccessful:

avatar sakiss
sakiss
5 Jul 2021

Pull Request for Issue # .

Summary of Changes

The finder.js depends on "awesomplete" but this dependency relies on the layouts to load it.

Testing Instructions

Run npm install to re-create the media folder.
Test the suggestions in the smart search module and the search form in the results page.

Actual result BEFORE applying this Pull Request

The smart search suggestions to work.

Expected result AFTER applying this Pull Request

The smart search suggestions to work.

Documentation Changes Required

No

avatar sakiss sakiss - open - 5 Jul 2021
avatar sakiss sakiss - change - 5 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jul 2021
Category Repository NPM Change Front End com_finder Modules
avatar sakiss sakiss - change - 5 Jul 2021
The description was changed
avatar sakiss sakiss - edited - 5 Jul 2021
avatar Fedik
Fedik - comment - 6 Jul 2021

... but this dependency relies on the layouts to load it.

This was made for purpose. When show_autosuggest is disabled then we do not need to load "Awesomplete".

This PR can be closed.

avatar Fedik
Fedik - comment - 6 Jul 2021

Or

You can make an additional asset (copy of existing com_finder.finder), that have Awesomplete dependency, com_finder.finder-autocomplete

Then in layout do switch:

if show_autosuggest
  use 'com_finder.finder-autocomplete'
else
  use 'com_finder.finder'
avatar sakiss
sakiss - comment - 6 Jul 2021

This was made for purpose. When show_autosuggest is disabled then we do not need to load "Awesomplete".
Yes but it is error prone.

Given that in the majority of the cases the suggestions will be enabled and the "Awesomplete" script is 7.5KB, i find the pros more than the cons in accepting that. Any feedback is welcome from other developers.

You can make an additional asset (copy of existing com_finder.finder), that have Awesomplete dependency, com_finder.finder-autocomplete

Interesting approach. But pretty much the only thing that the finder.js does, is the auto-complete. I am not sure that has to be loaded at all if the auto-complete is off.

avatar Fedik
Fedik - comment - 6 Jul 2021

But pretty much the only thing that the finder.js does, is the auto-complete. I am not sure that has to be loaded at all if the auto-complete is off.

It is doing something, check the script. It not only for Autocomplete.
Otherwise it would be loaded only when show_autosuggest is "On"

avatar Quy Quy - change - 27 Jan 2022
Labels Added: ? NPM Resource Changed Information Required
avatar sakiss sakiss - change - 22 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-22 14:53:20
Closed_By sakiss
Labels Added: ?
Removed: ?
avatar sakiss sakiss - close - 22 Mar 2022

Add a Comment

Login with GitHub to post a comment