Open
Conversation
f2c6c54 to
9117f65
Compare
9117f65 to
b289d21
Compare
Collaborator
zoltan-dulac
left a comment
There was a problem hiding this comment.
Just a few things to look at here.
js/modules/es4/search.js
Outdated
|
|
||
| //import data from "./search.json"; | ||
| const search = new (function() { | ||
| //const FlexSearch = require('flexsearch'); |
Collaborator
There was a problem hiding this comment.
Is there an es6 version of this file?
| } | ||
|
|
||
| this.init = () => { | ||
| body.addEventListener('click', this.handleClick); |
Collaborator
There was a problem hiding this comment.
Have you made sure this works with a keyboard (I am not sure this works in that case, so I thought I'd ask).
When I used this with a keyboard a few weeks ago, there was a problem. Can you double check?
| } | ||
| } | ||
|
|
||
| export default search; No newline at end of file |
Collaborator
There was a problem hiding this comment.
Not something to correct, but a comment: your code is very easy to understand. I may put you on PRs of other people's work to help with code quality.
| @@ -1,3 +1,5 @@ | |||
| <link rel="stylesheet" type="text/css" href="css/form.css" > | |||
| <link rel="stylesheet" type="text/css" href="css/site-search.css" > | |||
Collaborator
There was a problem hiding this comment.
- These should be in the file
common-head-tags.php, since they should be inside the<head>tag. - Since you are probably not going to be the only one to make this mistake, we should add documentation in the README.md about adding global JS and CSS for all pages. (The global JS isssue is covered in another comment of this code review). Can you please add that as part of this PR?
| import search from '../../js/modules/site-search.js'; | ||
| search.init(); | ||
| </script> | ||
|
|
Collaborator
There was a problem hiding this comment.
- I would like to ensure any external scripts involved are not included via CDN (If there is another case of this outside of your PR, we should remove that). Let's include this in our package.json. Please follow the instructions in the documention when adding a front-end NPM package to our project. (I have noticed the formatting of the bolded text in the glider example in the docs is wanting -- let's discuss in the next standup how to fix that as part of your PR).
- The
<script>tags should be in end offooter.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Pictures/Videos