? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
31 Dec 2017

Pull Request for Issue # .

Summary of Changes

This PR removes the inline JS for the smart search highlighter and also removes 90% of the jQuery.

There's still a couple more lines of jQuery left to rewrite, however I wasn't sure how to test that specific function.

Testing Instructions

  1. Create a smart search module and assign it to a page.
  2. Type a word in the input field and press Enter.
  3. Ensure the words on the results page are highlighted
avatar C-Lodder C-Lodder - open - 31 Dec 2017
avatar C-Lodder C-Lodder - change - 31 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Dec 2017
Category Libraries JavaScript
37904f5 31 Dec 2017 avatar C-Lodder cs
avatar C-Lodder C-Lodder - change - 31 Dec 2017
Labels Added: ?
avatar dgt41
dgt41 - comment - 31 Dec 2017

@C-Lodder please check: https://codepen.io/dgt41/pen/ZaKLbg this removes 100% of jquery and it's a custom element ;)

avatar C-Lodder
C-Lodder - comment - 31 Dec 2017

1000 lines?

This could really be done in less than 100 lines. No idea why the scripts try to over complicate something so simple.

avatar dgt41
dgt41 - comment - 31 Dec 2017

1000 lines?

I'm using an ES5 script specific for highlighting, most of the code is not mine there (not more than 100 lines, the ce part)

Why use an external script for that? Better check the possibilities in their site: https://markjs.io

avatar dgt41
dgt41 - comment - 31 Dec 2017

@C-Lodder can you move this to custom element, here is something I was working on (based on markjs):1dd6004#diff-be30cdb278d8422fc9a70a5067ebf1bd

avatar C-Lodder
C-Lodder - comment - 31 Dec 2017

Yeah can do. Not doing any CE stuff till your PR to remove Grunt is merged though

avatar C-Lodder C-Lodder - change - 2 Feb 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-02-02 10:45:04
Closed_By C-Lodder
avatar C-Lodder C-Lodder - close - 2 Feb 2018

Add a Comment

Login with GitHub to post a comment