refactor issue finder to replace vue with plain js and update html#868
Conversation
…dated issue-finder.html
|
Hi @TimidRobot Progress So Far
|
|
@Queen-codes, response inline:
Sounds good!
My expectation is that it should only need to be included from Putting it in
Yes! I'm looking forward to decreasing the JavaScript complexity/requirements!
I'm not aware of any, either. I would follow strategy of keeping HTML and removing site-specific CSS. |
|
Hi @TimidRobot and @possumbilities . I hope you're both doing well. I've encountered some issues after moving the
I'd appreciate any help and guidance on how I can resolve this, or if there's anything I'm missing. thank you. |
I think we've encountered the limits of my node/NPM knowledge. @possumbilities, please advise. |
|
@Queen-codes @TimidRobot I'll look into it further, but one thing I noticed immediately is that this may not be the entire issue, but is definitely one of them:
Serving modules directly absent a bundler is not an entirely new thing, but it is more newly "stable" in a lot of environments. That said, octokit itself provides a useful example of the difference of inclusion between utilizing something like npm vs direct script tags. I'd suggest starting there if you are to avoid the use of Webpack here. However, their use of a direct module is pulling it via a CDN, which means it hasn't been localized to the project. Also, once you use "in script tag imports" you are entering the territory of how browser's have implemented ES6 Module imports and errors may occur differently depending on the browser + operating system, since the "transpilation steps" are not happening prior to page load, but within the browser itself. There's a lot more on ES6 module imports here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules See also the GitHub Repo of octokit, where it also has similar inclusion instructions. I'll keep looking to see if there's something I've missed that might be more helpful. If your JS is going to depend on another JS file, and its just one file then avoiding the use of a package manager/bundler is usually a good idea. However, if your file is going to depend on a file that depends on other files and so on you start to get into territory where historically something like npm or yarn becomes worthwile to keep up with all that. ES6 modules provide a means (should browsers support it) to skip something like Webpack and instead let the browser "transpile" the dependency chain, but that means the files need to live somewhere; often the default assumption is that they'll live on a cdn (with some form of import map there). This may not be ideal if you want to localize all the files in a semi-hermetic way. To do that you'd need the files, and all the downstream dependencies to exist within the project somewhere, so then you're back to needing some kind of package manager in the chain to keep things up to date, track dependency chains, etc. Generally, the cdn route let's you bypass this, BUT at the cost of having to download something from a third-party instance at page load; and that can increase security surface area in ways that might not be desired. |
|
@Queen-codes Coming back to say that I think the most direct route at the moment is to remove Vue.js, but not try to escape Webpack at the moment. It might be worthwhile exploring later in this project or as a future sub-project; but given the complexity it might require to pull it off in a stable way I think the larger concern should be prioritizing removing Vue.js, and correcting the HTML to be both in line with the spirit and direction of Vocabulary. So I would say to not move the |
|
okay, thank you. this was helpful |
Fixes
Description
This pull request refactors the Issue Finder by removing Vue.js and simplifying the codebase to use plain js. the
issue-finder.htmlfile was updated to align with the refactored JavaScript codeChecklist
Update index.md).mainormaster).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin