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

Auto add in region to usage stats query with the specified region in the parameter #444

Closed
wants to merge 5 commits into from

Conversation

sashachabin
Copy link
Collaborator

@sashachabin sashachabin commented Aug 19, 2022

It seems to me that a rather particular scenario, when the user writes >0.1, selects a region. And we need to automatically add the in region to users query.

Now deepEquals: 
    await getBrowsers('>0.1% and <10%, dead', 'FR'),
    await getBrowsers('>0.1% in FR and <10% in FR, dead', 'FR')
  • Added getQueryWithRegion(query, region) for modify query. Convert popularity expressions to popularity_in_place
  • Added getQueryFromQueryParsed. It's browserslist.fromParse for browserslist.parse
  • Added a test to check the query conversion
  • Return updated query in JSON response

Additionaly

  • Update test different coverage statistics for another regions
  • Replace unused alias Global to alt-ww

BugCloses #443
https://browsersl.ist/?q=%3E1%25&region=alt-as

image

@sashachabin sashachabin requested a review from ai August 19, 2022 21:23
@ai
Copy link
Member

ai commented Aug 19, 2022

>1% should show the same browsers list on any region value. Otherwise, user will not understand that we change their input.

@sashachabin
Copy link
Collaborator Author

New idea
#446

@ai ai deleted the auto-region-add branch March 17, 2023 01:21
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.

Auto add in region to usage stats query with the specified region in the parameter
2 participants