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

[autocomplete-css] Sort completions.json #552

Merged
merged 6 commits into from
Jun 11, 2023

Conversation

confused-Techie
Copy link
Member

@confused-Techie confused-Techie commented May 21, 2023

In this PR I've added two new features to the script that generates the completions.json.

  • lengthSort(): This runs right after the file has been fully generated. Sorting every property key by it's length, moving the shortest values to the top of the list.
  • popularSort(): This runs next, sorting all keys based on popularity, according to Chrome Platform CSS usage metrics.

The completions.json file doesn't seem to have any other changes other than now being sorted.

Additionally, you can see in my first commit here I simply moved all relevant files into an update folder, so for the sake of reviewing I wouldn't suggest looking much at that first commit, but it contained zero other changes. (EDIT: nevermind, GitHub recognizes the file was moved, so the diff isn't difficult to read. Ignore that)

Also, I've gone ahead and removed the no longer used request dependency, and replaced it with superagent which we do now need. I've already done the same exact thing over on #474. This was just now relevant to what I was doing, as I needed a way to download the Chrome usage metrics.


Resolves #541

Copy link
Contributor

@mauricioszabo mauricioszabo left a comment

Choose a reason for hiding this comment

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

Sounds solid, an easy 👍 :)

@confused-Techie confused-Techie merged commit 5eceece into master Jun 11, 2023
100 checks passed
@confused-Techie confused-Techie deleted the autocomplete-css/sort-completions branch June 11, 2023 19:48
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-css] Suggestions are ordered strangely
3 participants