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

Add a non minified version of autoComplete.js #1008

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Conversation

mgautierfr
Copy link
Member

Fix #819

Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

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

I think it's time to define the procedure of how parts from other open source projects must be imported into OpenZIM &/| Kiwix projects. Questions to consider:

  1. How and where attribution should be made? Is a mention in README enough or we have to include it in every imported file? If more than one file is imported maybe we should place them under their own subdirectory and only add a single ATTRIBUTION.md file? Should there be any difference between files that are only used during build vs those files that are exposed to the end-user?
  2. Similar questions for the license of imported files.
  3. Regarding sources (autoComplete.js in this case) and end-user-artifacts (autoComplete.min.js in this case) - having both files without the process that produces the latter from the former doesn't fully meet the justification for preserving the original sources in our own project/repository. In the light of that argument, do we really have to import the sources too? If yes, in which situations?

@@ -1,3 +1,4 @@
/* Modified from https://github.com/TarekRaafat/autoComplete.js (version 1.2.6)*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. The version string should be 10.2.6
  2. If attribution is going to be embedded into imported files it must be added to autoComplete.js and autoComplete.min.js too.
  3. This change should result in changed KIWIXCACHEIDs - the unit tests must be updated.

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. Done
  2. autoComplete.css is modified from original autoComplete.css so the small header. Other files (js) are not modified and so I prefer not change them.
  3. Done

Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

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

It seems we should also put the license of this piece of code

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.92%. Comparing base (d2c031e) to head (bcbdce6).
Report is 209 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1008   +/-   ##
=======================================
  Coverage   38.92%   38.92%           
=======================================
  Files          58       58           
  Lines        3990     3990           
  Branches     2201     2201           
=======================================
  Hits         1553     1553           
  Misses       1090     1090           
  Partials     1347     1347           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42 kelson42 merged commit e89f4e2 into main Nov 7, 2023
13 of 14 checks passed
@kelson42 kelson42 deleted the autocomplete_no_min branch November 7, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autoComplete.min.js is already minified in the code repository
3 participants