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

Packages search: allow searching for packages on every pages #383

Merged
merged 114 commits into from Feb 25, 2017

Conversation

Projects
None yet
3 participants
@Haroenv
Copy link
Member

Haroenv commented Feb 17, 2017

We want to allow people to search for packages no matter the page they are in, instead of having to click on "Packages" in the header.

Adding the package page will require a fair amount of frontend code and templating. We propose to add babel and React to the yarn website stack and reorganize some already present code in a module way.

To do this, we included React in the process, and used react-instantsearch.

Searching works like this now:

  • you are on a page (for example /docs/getting-started)
  • you search something in the search bar
  • the url becomes /packages?q=something
  • you click the X or erase your search
  • you're now back on your original page (/docs/getting-started)

If you'd refresh the page or share the url, erasing the search would get you to the featured package page, which makes sense.

also improves the webpack build time from sometimes quite long to about a second now.

I noticed that the style we had for docsearch (in /docs) doesn't actually apply, and when I changed the order of the css links, I saw that the custom style didn't really work, so I put it to the default on purpose.

Haroenv added some commits Feb 7, 2017

chore(tooling): Add webpack and babel to allow ES6 code
The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.
fix non-display of initial results on Safari
fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you
put very basic instantsearch-react in there
doesn't work with preact for some reason. Will troubleshoot later
put common.js manually
ensure it doesn't get overwritten
extend bootstrap in our pagination
we can't really add custom classes to the algolia pagination

Haroenv added some commits Feb 21, 2017

style(searchbox): style ":active"
things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image
feat(search): make "search" show up in iOS keyboard
needs a form with action and an inputtype=search with a name
fix(search): don't autocorrect etc. input
this usually causes you to type a certain package name and then it's autocorrected into something irrelevant
feat(search): blur input on submit
this causes the keyboard to disappear on mobile leaving you more place to explore the results
style(search): make input noticeable
use a white background, which is better for a11y, as suggested by @thejameskyle
fix(build): run webpack before jekyll
Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet
fix(pagesize): import directly from react-instantsearch core
this is to save size in the final build
fix(search): put more exact min-height to wrapper to avoid jump
this is only relevant on empty cache where the js isn't loaded yet
active_language: '{{vars_active_language.tag}}',
search_placeholder: '{{ i18n.search_placeholder }}',
search_by_algolia: '{{ i18n.search_by_algolia }}',
search_by_read_more: '{{ i18n.search_by_read_more }}',

This comment has been minimized.

@Daniel15

Daniel15 Feb 25, 2017

Member

I suspect you should be JSON encoding these, as the translations in some languages may have apostrophes in them. We can follow up on that separately.

This comment has been minimized.

@Haroenv

Haroenv Feb 25, 2017

Author Member

Great point, it was encoded earlier but seemed redundant to me.

This comment has been minimized.

@Daniel15

Daniel15 Feb 25, 2017

Member

@Haroenv - It also prevents someone from performing XSS via translations (eg. if someone were to somehow enter the translation as foo'; window.location = 'http://badsite.com/';) 😃

This comment has been minimized.

@Haroenv

Haroenv Feb 25, 2017

Author Member

all right, I updated it just before you merged, so we’re safe for that now

}
}

$image-border-yarn-blue: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAAOCAYAAACPUsFyAAAKxklEQVRoge2b63OdVRXGfyR5c6G5kNL0ArSl3KyggFLFis4weBkVP8g/4Gf/FP4L/eAnv+gHpjqKDjOCxQG00AEKvQxNgKYXCE3SnnNykuqH9TyzV96eND1pDhTtmsmc877v3muv9ay197v3ybNu2/f8oTFgDGgS0gSGgTawQpElffbpc0ifbjMKDKT2TWAb0FLbC7o/ACwn/e43CiwCFdAARtQmy7L+hoEF3atkf0N/vtfW9SDQL32N9Myyoucrqd0AcK7mf136ExbtdM/jVbq3mNr063tfzYasy3jcQcGsmWxb1vWS+gyk8cbSWMv6br+NefbZ39HzIV37+xjwma6vJHsHZZ9zpQnMsz5eI8nOBdnT0vMryS77tSw8jEH22Tpb6mvcLbZlKX13fPK9Tl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yc7vaviTsvCYc+i9pQJWwuXILrwAAAABJRU5ErkJggg==);

This comment has been minimized.

@Daniel15

Daniel15 Feb 25, 2017

Member

Does SASS have a way to inline images like this? I feel like it'd be more maintainable if you had the images in external files, and used a SASS function to inline them.

fix(i18n): json encode translation string
this is the case because some languages or strings could contain ' and break the string.
@Daniel15

This comment has been minimized.

Copy link
Member

Daniel15 commented Feb 25, 2017

This looks good to me! Let's get this in and iterate as needed :)

@Daniel15 Daniel15 merged commit 9a43d48 into yarnpkg:master Feb 25, 2017

1 check was pending

deploy/netlify Deploy preview processing.
Details

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Feb 27, 2017

Packages search: allow searching for packages on every pages (yarnpkg…
…#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Feb 28, 2017

Packages search: allow searching for packages on every pages (yarnpkg…
…#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Feb 28, 2017

Packages search: allow searching for packages on every pages (yarnpkg…
…#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Mar 1, 2017

Packages search: allow searching for packages on every pages (yarnpkg…
…#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Mar 1, 2017

Packages search: allow searching for packages on every pages (yarnpkg…
…#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

Daniel15 added a commit that referenced this pull request Mar 25, 2017

Detail page! (#419)
* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* feat(detail): initial add of package detail page

/package/?whatever is the url for now, but before merging, it should become /package/whatever (with netlify) and change it whether on prod/develop (since it's hard to emulate locally with jekyll).

* move Details component into its own file

* feat(detail): link to the correct detail page

in development it's package?name, in production package/name

* fix(search): use null as fallback

otherwise an empty text node gets inserted

* feat(detail): move components to be more reusable

they're either in util or Hit, depending on the scope.

* feat(Hit): export links

feat(detail): use Links from Hit

* Packages search: allow searching for packages on every pages (#383)

* chore(tooling): Add webpack and babel to allow ES6 code

The JavaScript code of the website itself starts to be bigger than in
the beginings. To allow for a greater dev experience (write modern
JavaScript) and plan next iterations on the search and package detail
pages (use React), this PR propose to add Babel and Webpack to the
toolbet of the website.

The structure of the JS files now is (in my opinion) more reasonable to think about,
and also will allow for faster development for further features.

* fix non-display of initial results on Safari

fixes #4

Safari is more strict about closing brackets in querySelectors than Chrome, which just closes it for you

* use hashes in webpack build

* initial add of preact

* add common.js always

* order of operations

* fix typo and add polyfill

* fix typo

* make webpack work slightly faster on development

* put very basic instantsearch-react in there

doesn't work with preact for some reason. Will troubleshoot later

* some jsx filling in

* move html structure

* search inside different file

* initialising instant search

* use classname; clean

* add icons

* put common.js manually

ensure it doesn't get overwritten

* move order of operations

* not every item has a license

* move Search to folder to be able to split up

* move to separate files per component

* extend bootstrap in our pagination

we can't really add custom classes to the algolia pagination

* cleanup

* add possible faceting

* add placeholder mixin

* put placeholder

* style searchbox

* border images

* add container around results

* hide comment

* switch out moment for date-fns

* make the hero not float down on small sizes

* center pagination

* update react-instantsearch

* make <main> and reset appear/disappear

* don't do the redirect yet

* don't link to /packages yet

* no packages page yet

* no dedicated search page

the /packages will later be occupied by the detail page

* add very light to the colors

* wip: make active color darker

* active background

* add homepage

* update dependencies

* make urls work

* in 3.2.0 key for configure became not necessary

bug/feature was fixed in react-instantsearch

* wip of keywords

* don't show faceting

* remove preact alias (didn't work)

* only update location when needed, otherwise it makes the UI slow

* save newPush when it's pushed

this will fix the updating while you're typing fast, but doesn't catch it if it's the last character typed

* keywords doesn't matter

* no connectedToggle

issue is still open with nested widgets

* don't show refinementlist

* add packages page

same as what used to be done in /search, but now in React

* make search be on the packages url

* separate component for HasResults

* don't mess with the react state for things that don't change rendering

* chore(dev): webpack build speed optimization

* fix(keys): fix react keys

* fix(url): good url sync handling

* "static rendering" of search component

* no log

* add "key" to lists of components

* put back margin on hero

* don't override docsearch style

this didn't get applied on the version that's now live, but for some reason it does count now. It doesn't really work, so I'm going back to the defaults

* use prettier

settings:

* with single-quotes
* with trailing comma

* query -> q

* run prettier on webpack

* stub out the featured packages so they don't "jump in"

* put page in url

* add title to history

* no results "screen"

* make the cross icon take up place regardless of state

suggested by @cpojer in chat

* make sure input doesn't have border-radius

iOS is naughty and gives us radii all the time

* small css fixes

* chore(prettier): use precommit hook from prettier docs

* style(searchbar): be more precise about position

there seems to be an iOS Safari bug where the buttons don't show up on the right place. This should fix that

* chore(dev): add vendor, start i18n in js

* chore(pagesize): avoid babel-polyfill

since the only place this is needed now is to iterate of this NodeList, we can replace it safely and save a considerable abount of space

* chore(build): fix production build

* chore(build): fix production build

* bootstrap fix

* build optimization

* build optimization

* remove bundle analyze

* remove lodash optimizations, failing

* feate(i18n): use i18n values for searchbar cue

* chore(bundle): include bootstrap collapse

this is needed for the 🍔menu

* nit(search): don't put a default in the code for placeholder

* feat(searchbox): use own searchbox component

the way to go for react-instantsearch is to make sure that our widgets are reusable and "copy-paste"able. This is an experiment of how this is done.

The reason a custom SearchBox is necessary is because we need events to add a class around the root when it's focused

* style(searchbox): style ":active"

things needed for this:

1. different way of referencing the border-images
2. custom searchbox
3. other image

* fix(search): add pointer cursors to buttons

* fix(explore): list /packages under language

it should be fully i19d

* feat(search): internationalise search by algolia

* fix(search): url is internationalised too

* fix(search): same margin left and right

* fix(search): only show keywords when not empty

* feat(search): no pagination when there's only one page

* fix(searchbar): color with mix instead of darken()

cc @LukyVj

* feat(search): make "search" show up in iOS keyboard

needs a form with action and an inputtype=search with a name

* fix(search): don't autocorrect etc. input

this usually causes you to type a certain package name and then it's autocorrected into something irrelevant

* feat(search): blur input on submit

this causes the keyboard to disappear on mobile leaving you more place to explore the results

* style(search): make input noticeable

use a white background, which is better for a11y, as suggested by @thejameskyle

* style(search): give searchbar a bit more margin

suggested by @LukyVj

* fix(build): run webpack before jekyll

Jekyll doesn't rebuild the files when the `webpack.json` doesn't exist yet

* fix(pagesize): import directly from react-instantsearch core

this is to save size in the final build

* fix(search): put more exact min-height to wrapper to avoid jump

this is only relevant on empty cache where the js isn't loaded yet

* fix(i18n): json encode translation string

this is the case because some languages or strings could contain ' and break the string.

* feat(Detail): don't reuse Links

* feat(details): create components for links

* feat(detail): add links to other sites (wip)

* fix(url): put detail page under the url base

also made the `packageURL` a function accepting a package name.

* chore(lock): regenerate lockfile

* feat(search): promote exact matches

* feat(detail): add jsonld

* fix(details): styling of links

* feat(search): don't show keywords when empty

* feat(details): add necessary sections

* feat(detail): add redirect

* feat(detail): add runkit link

* fix(detail): pretty urls

redirects depend on the language

* explicit link

* fix(detail): correct prod url matching

* feat(detail) only use lite version of algolia-js

* Revert "feat(detail) only use lite version of algolia-js"

This reverts commit d6b8d57.

* feat(detail) truncate links

* fix(style) separate scss file for details

* feat(detail): add runkit

* wrap in tag

* feat(details) extract components

* fix(search): only add optionalFacetFilter when defined

This is used for boosting exact matches even more

* fix(style) don't give default size to #search

this isn't needed (restant from old commit)

* feat(details) ordering and styling of sidebar

* feat(detail) make install copyable

* feat(details) correct icons for copy

* feat(details) style copyable

* chore(details) move into separate components

* nit(detail) hide full json

* feat(details) parse readme

* nit(detail) reuse readme fetching for contributing

* feat(detail) custom renderer

* feat(detail) move markdown rendering

* fix(Copyable) wrap better

* feat(search) retrive only necessary attributes

* feat(details) switch to react solution

* add git head to schema

see algolia/npm-search#23

* feat(detail) setup function to prefix with raw.git

* feat(detail) add border

* feat(details) parse links in readme correctly

* feat(detail) add readMore component

* feat(detail) add shadow for ReadMore

* feat(detail) style for readmore button

* fix(details) fetch readme from github if undefined

* fix(details) don't let images overflow

* fix(keywords) link to packages page

* fix(details) make urls work with path and without

* feat(details) add description

* feat(detail) style readme and changelog

* fix(detail) margin in readMore

* feat(details) show version

* feat(detail) style heading in readme/changelog

* fix(detail) smaller fontsize for heading in aside

* fix(detail) margin on description

* feat(detail) ponyfill fetch with unfetch

* feat(details) add activity chart

use react-sparklines

* feat(pagesize) switch react to preact

* revert 614ff43

* fix(detail) explicitly set chart

* chore(style) move .copyable into own file

* style(readmore) overflow

* feat(detail) add popularity

* feat(detail) add activity data

* fix(detail) correct retry strategy

* wrap readme+changelog in article

* feat(detail) show last 3 instead of 12 mo of activity

* feat(details) render markdown using marked

* feat(detail) externalise markdown component

* feat(detail) handle scoped packages in prod

* chore(detail) move fetching helper into util

* feat(detail) render badly formed gfm

* style(detail) descrition is lead

* nit(style) use bootstrap breakpoint natively

* style(detail) align sidebar

* don't show json debug

* feat(detail) show placeholder html

* nothing

* style(detail) add divider between title and value

* chore(build) use source-map all the time

* feat(detail) retry github api calls

* style(detail) ellipsis of "copy to install"

used to be "wrap"

* feat(ReadMore) don't allow collapsing if it's small enough

it doesn't make much sense to do anything at all if the size is less than what it would go to if the height would be open

* style(detail) smaller graph

* feat(detail) use changelog filename if possible

* update schema

* feat(detail) add default for activity log

so that it doesn't flash when it shows up

* chore(detail) use article for readme/changelog

* feat(detail) move and add images

* fix(search) no useless import

* feat(details) add usage section

* fix(details) use timeout on github stats

* feat(detail) add more info

* feat(details) don't show activity if you're rate-limited

* style(details) add images

* fix(detail) rename image

* feat(detail) add images to aside

* style(detail) no margin on readmore button

* fix(detail) clearer logic for "weeks ago"

* style(details) aside font size

* nit(details) save space

* feat(pagesize) use lodash-webpack-plugin

saves ±10kb gzipped

* feat(detail) mark all strings as i18n

* fix order of i18n in script

* undo lodash-webpack-plugin, breaks things

* add check for popularity metrics

* feat(detail) catch if package doesn't exist

* feat(search) use Algolia SearchBox instead of fork

* chore(detail) regenerate default page

* style(detail) specific hero for detail page

* chore(detail) don't use object-fit contain

buggy and unsupported

* style(detail) spacing of titles

* fix(i18n) undo switching of strings

* chore(detail) change layout page location

* fix(detail) add `key` to deps

* chore(version) depend on beta react-instantsearch

* chore(version) update dependencies

* style(detail) use pointer cursor for copyable

* chore(images) indent svgs

since cloudflare minifies the files at serve-time, having them indented properly in the source code is a better solution

* nit(detail) explicitly return null in Activity

* nit(detail) format default package page

more legible

* nit(style) indent flexbox rule properly

* i18n(detail) mark strings with variable in it as such

* fix(i18n) mark {} explicitly as string

* fix(detail) typo in end comment

* fix(detail) don't show error message for readme too fast

only show it when loading fails.

* nit(detail) avoid magic number for three months

* style(code): add comment on package id retrieval

* fix(i18n) fix capitalisation of npm & GitHub

* chore(webpack) use cheap source map when in dev

this one actually works

* docs(jsonld) explain json ld in a comment

* docs(detail) explain why GitHub 202 needs a retry

* fix(activity) normalize on last three months

The graph used the last year as base, but now the splitting into last three months is reused.

* feat(activity) show link to github and byline

* fix(detail) use bold instead of font weight to accent

this is for the sidebar

* nit(activity) style chanes

* fix(activity) no caption

* fix(detail) no special font size on dt

it messes up the alignment for no visual improvement

* fix(copyable) fix behaviour of success icon

* fix(details) clean and fix readme fetching logic

* fix(details): only render Activity when there's a github repo

@Haroenv Haroenv deleted the algolia:use-instantsearch-react branch Apr 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment