Instantsearch.js: Query params should be omitted when possible for cleaner URLs

Created on 7 Jan 2017  路  3Comments  路  Source: algolia/instantsearch.js

This is a followup to https://github.com/yarnpkg/website/pull/322#issuecomment-270567447

Do you want to request a feature or report a bug?

A little bit of both. 鈿★笍 馃悶 鈿★笍

Bug: What is the current behavior?

Conducting a search on yarnpkg.com/search adds unneeded query params to the URL: ?q=fetch&p=0&is_v=1

Bug: What is the expected behavior?

Query should just be q=fetch by default, and only include the p and is_v values when their values are something other than their defaults.

Bug: What browsers are impacted? Which versions?

All browsers. 馃實

Feature: What is your use case for such a feature?

Cleaner URLs are easier to read, edit, and share.

Bug

All 3 comments

actionable items here:

  • [x] remove is_v
  • [ ] consider if index is really necessary in the default urlSync
  • [ ] make p only show up if it鈥檚 > 1 (by saving it as undefined otherwise, which won鈥檛 get shown in the url, and a default value when reading from the url)
  • [ ] make p start at 1

This will be part of #2636

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bobylito picture bobylito  路  3Comments

devwax picture devwax  路  3Comments

mthuret picture mthuret  路  3Comments

ChristopherDosin picture ChristopherDosin  路  4Comments

nicosrugeris picture nicosrugeris  路  3Comments