algolia/doc-code-samples

Angular samples don't use instantsearch.css styles directly

Closed this issue · 6 comments

This makes them inconsistent with the rest of our samples
https://github.com/algolia/doc-code-samples/blob/master/Angular%20InstantSearch/getting-started/angular.json#L26

we should probably remove the bundle alltogether

Agree,
but that would be a breaking change.
I think it should be done as part of making instantsearch.css a peerDependency of angular-instantsearch.

Btw, I see Vue IS has

I forgot what was the plan: make them both peer dependencies?

InstantSearch.js as a dependency or peerDependency (I'm not convinced of either, both can go bad)

InstantSearch.css as no dependency or as an optionalDependency

I think Instantsearch.js as a dependency is better. To me the only libs that belong to it peer dependencies are those that might be required by other libs the user might be using, typically to have a single copy of it (eg. lodash, react). It's unlikely with Instantsearch.js. WDYT?

I might be missing something but to me optionalDependencies are for system specific dependencies and doesn't apply to instantsearch.css

InstantSearch.css isn't required, so it isn't a peerDependency. It's either nothing at all, or an optional one.

There's still use cases where something can be imported from InstantSearch.js directly (router, connectors e.g.), but in that case we can just assume that they know too make sure it's the same version

the samples use InstantSearch.css now as far as I can tell