gatsbyjs/gatsby 47640
Build blazing fast, modern apps and websites with React
enaqx/awesome-react 39951
A collection of awesome things regarding React ecosystem
dmnd/dedent 525
⬅️ ES6 string tag that strips indentation from multi-line strings.
For when you don't like jQuery. Embed this script on every page.
MAKE THE WEB GREAT AGAIN
dervondenbergen/giphy-gitter 13
get the perfect gif in your gitter activity feed
Accessibility is important, even if you live on the wrong side of the globe!
THE ultimate javascript function to parse strings (or even objects) to integers!
A very fast clock, accuracy guaranteed
push eventFCCghent/ikhaat
commit sha 85e2c69a3aa0cae9a2bbb3e323aef00cd93c58cf
Built from commit 271ccbc101e6ea8072bbcb32932b47a39595c9c3
push time in 10 hours
Pull request review commentalgolia/instantsearch.js
feat(rating-menu): implement `getRenderState` and `getWidgetRenderState`
describe('ratingMenu()', () => { it('toggles the refinements with another facet', () => { helper.getRefinements = jest.fn().mockReturnValue([{ value: '2' }]);- widget._toggleRefinement('4');+ widget+ .getWidgetRenderState({ state: helper.state, helper, results, createURL })+ .refine('4');
great workaround now that this is public api!
comment created time in a day
issue commentalgolia/vue-instantsearch
Allow preservation of user specified high/low range value when out of bounds
Before jumping to making a PR, we'll discuss this with the team so we can find possibly a different solution. I'll get back to you once we've discussed it, but otherwise it's just making two separate PRs, yes. In
comment created time in a day
Pull request review commentalgolia/instantsearch.js
feat(panel): provide widgetRenderState to panel
const panel: PanelWidget = widgetParams => { return undefined; }, render(...args) {- const [options] = args;+ const [renderOptions] = args;++ const options = {+ ...renderOptions,+ widgetRenderState: (widget.getWidgetRenderState?.(renderOptions) ||+ {}) as any,
at the end of the day, I think the user types are more important than the internal ones in the library; we can always improve them later
comment created time in a day
Pull request review commentalgolia/instantsearch.js
feat(panel): provide widgetRenderState to panel
const panel: PanelWidget = widgetParams => { return undefined; }, render(...args) {- const [options] = args;+ const [renderOptions] = args;++ let widgetRenderState;
in https://github.com/algolia/instantsearch.js/pull/4558 I had to move it out again, since this ?. didn't exclude the undefined from the condition somehow (in typescript 4+ it did work though :D)
comment created time in a day
Pull request review commentalgolia/instantsearch.js
feat(panel): provide widgetRenderState to panel
const panel: PanelWidget = widgetParams => { return undefined; }, render(...args) {- const [options] = args;+ const [renderOptions] = args;++ const options = {+ ...renderOptions,+ widgetRenderState: (widget.getWidgetRenderState?.(renderOptions) ||+ {}) as any,
I made this pr to help: https://github.com/algolia/instantsearch.js/pull/4558
comment created time in a day
push eventalgolia/instantsearch.js
commit sha 9a8b4db4ff68e20c900ca5a34ad699238cd2a883
gotta be more generic
push time in a day
push eventalgolia/instantsearch.js
commit sha 881562c883eddae257c9969660929fe865bec741
revert for lower ts used here
push time in a day
issue commentalgolia/vue-instantsearch
Allow preservation of user specified high/low range value when out of bounds
I think since you've already looked so much into the details, you can create your forked version without issue, although I'd love to see what you create in a sandbox / repo or something like that. An example of a full custom widget would be for example ais-state-results here
I think a better name for this parameter would be enforceRange, although we should discuss with the team whether this makes sense this way or something more custom.
Thanks for opening an issue!
comment created time in a day
issue commentalgolia/autocomplete.js
Is the cache option working as expected?
You could use the cache (now exposed separately in v4) of algoliasearch or write your own using one of the many cache / memoize solutions which exist :)
comment created time in a day
Pull request review commentalgolia/instantsearch.js
storiesOf('Basics/Panel', module) withHits( ({ search, container }) => { const breadcrumbInPanel = panel<typeof breadcrumb>({- collapsed({ widgetRenderState }) {- return widgetRenderState.canRefine;+ collapsed({ canRefine }) {+ return canRefine === false;
your example used to be wrong
comment created time in a day
Pull request review commentalgolia/instantsearch.js
const panel: PanelWidget = widgetParams => { const [renderOptions] = args; const options = {+ ...(widget.getWidgetRenderState?.(renderOptions) || {}),
possible since I reuse the type for TWidget for widgetFactory
comment created time in a day
PR opened algolia/instantsearch.js
this kinda works @eunjae-lee, although some parts still seem to be inferred as any. The public API works though
I also made a small change: not using widgetRenderState as key, but spreading the renderer. This way the usage is so much smoother (and you can use it for the templates too, which comes up from time to time)
pr created time in a day
push eventalgolia/instantsearch.js
commit sha aa6fc62e6842865575c7cebc317a9ec493bae420
now it works
commit sha e923fa177f0c6161815789cac451b5bc82818d26
better example
push time in a day
create barnchalgolia/instantsearch.js
branch : chore/ehhh-doesnt-really-work
created branch time in a day
Pull request review commentalgolia/instantsearch.js
feat(panel): provide widgetRenderState to panel
export type PanelTemplates = { collapseButtonText?: Template<{ collapsed: boolean }>; }; -export type PanelWidgetOptions = {+export type PanelWidgetOptions<TWidget extends WidgetFactory<any, any, any>> = { /** * A function that is called on each render to determine if the * panel should be hidden based on the render options. */- hidden?(options: RenderOptions): boolean;+ hidden?(+ options: RenderOptions & {+ widgetRenderState: ReturnType<+ Exclude<ReturnType<TWidget>['getWidgetRenderState'], undefined>
export type PanelRenderOptions<
TWidget extends WidgetFactory<any, any, any>
> = RenderOptions & {
widgetRenderState: ReturnType<TWidget>['getWidgetRenderState'] extends (
renderOptions: any
) => infer TRenderState
? TRenderState
: unknown;
};
I think this is a little simpler maybe?
comment created time in a day
Pull request review commentalgolia/instantsearch.js
feat(panel): provide widgetRenderState to panel
export type PanelTemplates = { collapseButtonText?: Template<{ collapsed: boolean }>; }; -export type PanelWidgetOptions = {+export type PanelWidgetOptions<TWidget extends WidgetFactory<any, any, any>> = {
ah yeah that does make sense. Might be better even to type it with unknown :) I don't know if we can find a place to document when and why to add the generic though
comment created time in a day
push eventFCCghent/ikhaat
commit sha cbafc77b59041595cd3f133d1d51da5c8fa737eb
Built from commit 271ccbc101e6ea8072bbcb32932b47a39595c9c3
push time in a day
push eventalgolia/instantsearch.js
commit sha 5ce9a1c9274dba8922be48b3b4403cd552970597
chore(yarn): clean lockfile (#4556) * chore(yarn): clean lockfile I used https://github.com/atlassian/yarn-deduplicate and ran yarn install again afterwards (https://github.com/atlassian/yarn-deduplicate/issues/5) Basically what this does is remove a bunch of overlappign versions of dependencies, which will result in a faster install & smaller node modules * upgrade terser, downgrade uglify
push time in 2 days
PR merged algolia/instantsearch.js
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
Summary
<!-- Explain the motivation for making this change. What existing problem does the pull request solve? Are there any linked issues? -->
I used https://github.com/atlassian/yarn-deduplicate and ran yarn install again afterwards (https://github.com/atlassian/yarn-deduplicate/issues/5)
Result
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
You will be able to test out these changes on the deploy preview (address will be commented by a bot):
- the documentation site (/)
- a widget playground (/stories) -->
Basically what this does is remove a bunch of overlappign versions of dependencies, which will result in a faster install & smaller node modules
pr closed time in 2 days
Pull request review commentalgolia/instantsearch.js
feat(voice-search): implement `getRenderState` and `getWidgetRenderState`
const connectVoiceSearch: VoiceSearchConnector = function connectVoiceSearch( language, onQueryChange: query => (this as any)._refine(query), onStateChange: () => {- render({- isFirstRendering: false,- instantSearchInstance,- voiceSearchHelper: (this as any)._voiceSearchHelper,- });+ renderFn(+ {+ ...this.getWidgetRenderState(initOptions),+ instantSearchInstance,+ },+ false+ ); }, }); - render({- isFirstRendering: true,- instantSearchInstance,- voiceSearchHelper: (this as any)._voiceSearchHelper,- });+ renderFn(+ {+ ...this.getWidgetRenderState(initOptions),+ instantSearchInstance,+ },+ true+ ); }, - render({ instantSearchInstance }) {- render({- isFirstRendering: false,- instantSearchInstance,- voiceSearchHelper: (this as any)._voiceSearchHelper,- });+ render(renderOptions) {+ const { instantSearchInstance } = renderOptions;+ renderFn(+ {+ ...this.getWidgetRenderState(renderOptions),+ instantSearchInstance,+ },+ false+ );+ },++ getRenderState(renderState, renderOptions) {+ return {+ ...renderState,+ voiceSearch: this.getWidgetRenderState(renderOptions),+ };+ },++ getWidgetRenderState() {+ const {+ isBrowserSupported,+ isListening,+ startListening,+ stopListening,+ getState,+ } = (this as any)._voiceSearchHelper;
Ideally we wouldn't need this (maybe connectorState), but since the PR didn't change it, it's ok to keep as is I think.
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
feat(voice-search): implement `getRenderState` and `getWidgetRenderState`
See documentation: https://www.algolia.com/doc/api-reference/widgets/voice-searc }); }); + describe('getRenderState', () => {+ it('returns the render state', () => {+ const { widget, helper } = getInitializedWidget();++ const initOptions = createInitOptions({ state: helper.state, helper });++ const renderState = widget.getRenderState({}, initOptions);++ expect(renderState.voiceSearch).toEqual({+ isBrowserSupported: true,+ isListening: false,+ toggleListening: expect.any(Function),+ voiceListeningState: undefined,+ widgetParams: {},+ });+ });+ });++ describe('getWidgetRenderState', () => {+ it('returns the widget render state', () => {
Can we add another test with a custom createVoiceSearchHelper so we can check the output?
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
feat(voice-search): implement `getRenderState` and `getWidgetRenderState`
See documentation: https://www.algolia.com/doc/api-reference/widgets/voice-searc }); }); + describe('getRenderState', () => {+ it('returns the render state', () => {+ const { widget, helper } = getInitializedWidget();++ const initOptions = createInitOptions({ state: helper.state, helper });
Why not inline to the init call?
comment created time in 2 days
delete branch algolia/instantsearch.js
delete branch : feat/render-state-numeric-menu
delete time in 2 days
push eventalgolia/instantsearch.js
commit sha 13d132e3c37524785c5a05d7e39cda9a6a2e6371
feat(renderState): add connectNumericMenu (#4550) * feat(renderState): add connectNumericMenu DX-204 * Apply suggestions from code review Co-authored-by: Yannick Croissant <[email protected]> * Apply suggestions from code review Co-authored-by: Yannick Croissant <[email protected]>
push time in 2 days
PR merged algolia/instantsearch.js
DX-204
pr closed time in 2 days
push eventalgolia/instantsearch.js
commit sha bfd66e0a4e833c93fc092b226dfff48dfcd15d02
feat(poweredBy): getWidgetRenderState (#4551) * feat(poweredBy): getWidgetRenderState DX-206 * fix jsdoc
commit sha a4fee7f0e19e1fc01f7c44bbbf7cd837c8a8d847
feat(menu): implement `getRenderState` and `getWidgetRenderState` (#4540) * feat(menu): implement `getRenderState` and `getWidgetRenderState` * Removed duplicated declaration of `jsHelper`, moved `cachedToggleShowMore` binding to `init` to avoid it happens more than once
commit sha a538255f81320826a4fef49c3d33401467a624e0
Merge branch 'feat/render-state' into feat/render-state-numeric-menu
push time in 2 days
issue commentalgolia/autocomplete.js
Is the cache option working as expected?
If you want the correct cache behaviour in current version of autocomplete / algoliasearch v3, you set autocomplete's cache to false, and algoliasearch' to algoliasearch(xxx, yyy, { _useRequestCache: true })
comment created time in 2 days
issue commentalgolia/autocomplete.js
Is the cache option working as expected?
the cache option in datasets is something we are removing in the next version of autocomplete, since it causes more confusion than anything. if you are using algoliasearch, it has a better cache mechanism, which will store all previous searches, not just the very last one.
It's best to disable the cache for autocomplete :)
comment created time in 2 days
pull request commentalgolia/instantsearch.js
the bundlesize change was because of uglify, they must have released something weird in 3.7.x that wasn't yet behaving like this in 3.6.0. I didn't want to do a deep investigation, so I forced the older version
comment created time in 2 days
push eventalgolia/instantsearch.js
commit sha 48b9a4b8c74db0072f54e5de1d3075b75957b28c
upgrade terser, downgrade uglify
push time in 2 days
delete branch algolia/algoliasearch-helper-js
delete branch : chore/metalsmith-in-place
delete time in 2 days
push eventalgolia/algoliasearch-helper-js
commit sha 3eb8d39c4598bbf0a19ab85a9d07e2cc1e474be8
chore(dev): replace github dependency metalsmith-in-place (#796) * chore(dev): replace github dependency metalsmith-in-place I've checked and the exact npm version (1.4.4) seems to miss 'exposeConsolidate' which we use. * patch package for the small change in the github version * add comment
push time in 2 days
PR merged algolia/algoliasearch-helper-js
- replace GitHub dependency with npm dependency
- use patch-package to make the small GitHub changes
pr closed time in 2 days
push eventalgolia/algoliasearch-helper-js
commit sha 31fe80e5447e25ef9bc4804fa1e0d290406f31c2
add comment
push time in 2 days
pull request commentalgolia/algoliasearch-helper-js
chore(dev): replace github dependency metalsmith-in-place
try this PR out by running yarn doc
comment created time in 2 days
Pull request review commentalgolia/algoliasearch-helper-js
chore(dev): replace github dependency metalsmith-in-place
+diff --git a/node_modules/metalsmith-in-place/lib/index.js b/node_modules/metalsmith-in-place/lib/index.js
you can test that this diff is correct by checking https://codeload.github.com/superwolff/metalsmith-in-place/tar.gz/7cb06e54142b8843f35178ceb5560946ae356049 which still exists today
I looked into updating to a newer version of metalsmith-in-place, but they added a bunch of dependencies that seemed hard to migrate towards
comment created time in 2 days
push eventalgolia/algoliasearch-helper-js
commit sha 81f885db8cb46cd113eda65c550003504b114bba
patch package for the small change in the github version
push time in 2 days
push eventalgolia/algoliasearch-helper-js
commit sha c6f639a601087aca326a5ca93d782c561e7a5c30
patch package for the small change in the github version
push time in 2 days
PR opened algolia/algoliasearch-helper-js
- replace GitHub dependency with npm dependency
- use patch-package to make the small GitHub changes
pr created time in 2 days
push eventalgolia/algoliasearch-helper-js
commit sha 7127a6eb0279ec5527f5ed8e55c78c90f4b2688c
patch package for the small change in the github version
push time in 2 days
create barnchalgolia/algoliasearch-helper-js
branch : chore/metalsmith-in-place
created branch time in 2 days
delete branch algolia/instantsearch.js
delete branch : feat/render-state-poweredby
delete time in 2 days
push eventalgolia/instantsearch.js
commit sha bfd66e0a4e833c93fc092b226dfff48dfcd15d02
feat(poweredBy): getWidgetRenderState (#4551) * feat(poweredBy): getWidgetRenderState DX-206 * fix jsdoc
push time in 2 days
PR merged algolia/instantsearch.js
DX-206
pr closed time in 2 days
pull request commentalgolia/instantsearch.js
feat(poweredBy): getWidgetRenderState
in https://github.com/algolia/instantsearch.js/pull/4551/commits/0435d689bf8764f855a0cf01029846862a455613#diff-57893d658ec377d112dce456273d95a8dbdd6968bef10c1c65eb6d1b4272fcf1 you can see most of the changes to the connector, the test was only additive
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
fix(configure): pass the latest state to onStateChange
+import { getByText, fireEvent } from '@testing-library/dom';
ah I didn't notice that, fine for me then 👍
comment created time in 2 days
PR opened algolia/instantsearch.js
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
Summary
<!-- Explain the motivation for making this change. What existing problem does the pull request solve? Are there any linked issues? -->
I used https://github.com/atlassian/yarn-deduplicate and ran yarn install again afterwards (https://github.com/atlassian/yarn-deduplicate/issues/5)
Result
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
You will be able to test out these changes on the deploy preview (address will be commented by a bot):
- the documentation site (/)
- a widget playground (/stories) -->
Basically what this does is remove a bunch of overlappign versions of dependencies, which will result in a faster install & smaller node modules
pr created time in 2 days
startedatlassian/yarn-deduplicate
started time in 2 days
Pull request review commentalgolia/autocomplete.js
describe('autocomplete-js', () => { </div> </form> <div- class="aa-Dropdown"+ class="aa-ListContainer"
ListsContainer or ResultsContainer seems best to me. Maybe also something like Suggestions, Collections or Sources, since you renamed that?
comment created time in 2 days
Pull request review commentalgolia/autocomplete.js
describe('autocomplete-js', () => { </div> </form> <div- class="aa-Dropdown"+ class="aa-ListContainer"
panel maybe?
comment created time in 2 days
issue commentalgolia/gatsby-plugin-algolia
Algolia records deleted on every build/deploy with or without enablePartialUpdates
Hmm, this is confusing! Do you have a reproduction on GitHub or somewhere where I can run it fully? The Shopify credentials don't need to be real ones, but I should be able to run it. Does it also fail with out of the box Gatsby plugins?
comment created time in 2 days
pull request commentalgolia/instantsearch.js
fix(configure): pass the latest state to onStateChange
You don't seem to have changed anything related to search state, how does this fix work?
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
fix(configure): pass the latest state to onStateChange
+import { getByText, fireEvent } from '@testing-library/dom';+import instantsearch from '../../index.es';+import { configure } from '../../widgets';+import { connectConfigure } from '../../connectors';+import { createSearchClient } from '../../../test/mock/createSearchClient';++describe('InstantSearch integration', () => {+ it('renders', () => {
test name should be about configure & onStateChange
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
fix(configure): pass the latest state to onStateChange
+import { getByText, fireEvent } from '@testing-library/dom';
I think this file should just be called InstantSearch-integration, it's already in a tests folder
comment created time in 2 days
Pull request review commentalgolia/autocomplete.js
describe('autocomplete-js', () => { </div> </form> <div- class="aa-Dropdown"+ class="aa-ListContainer"
I think something with "results" could also work
comment created time in 2 days
Pull request review commentalgolia/autocomplete.js
describe('autocomplete-js', () => { </div> </form> <div- class="aa-Dropdown"+ class="aa-ListContainer"
I don't think dropdown is really a bad name
comment created time in 2 days
issue commentalgolia/jekyll-algolia
Ah I guess this is because the dry run doesn't actually index, and thus doesn't use that part of the configuration. We'd love a PR where the types of the remaining unused settings are tested during dry run too
comment created time in 2 days
Pull request review commentalgolia/autocomplete.js
type ClassNames = { input?: string; completion?: string;
prediction is a better one!
comment created time in 2 days
push eventFCCghent/ikhaat
commit sha 85b949438752d6043e1381c90459bbce377f597d
Built from commit 271ccbc101e6ea8072bbcb32932b47a39595c9c3
push time in 2 days
issue commentfacebook/jest
[pretty-format] make it easier to copy-paste the output of a snapshot to JS again
I see what you mean @jeysal. My use case is like a snapshot pretty much, except I'm not expecting it to change after I initially commit, which I made clear with a toExpect. For me the solution in #9890 is definitely a better solution, which I wasn't aware of until after I opened the issue.
I guess other cases could also be more like a constructor, but at that point you'll need multiple breaking changes, and finally end up pretty much at #9890
comment created time in 2 days
Pull request review commentalgolia/autocomplete.js
type ClassNames = { input?: string; completion?: string;
I think this one still needs a better name. Maybe hint or magic-placeholder?
comment created time in 2 days
pull request commentalgolia/instantsearch.js
feat(poweredBy): getWidgetRenderState
making a separate commit won't help here since we're in a batch PR which will be squashed at the end unfortunately @eunjae-lee
comment created time in 2 days
issue commentalgolia/react-instantsearch
"Error: [ssr]: no widgets were added " - A breaking change in v6.8.0, not properly documented.
Were you calling findResultsState on the client too maybe?
comment created time in 2 days
issue closedyarnpkg/website
Hi there,
rss feed not working, there is template but server returns 404 page not found
https://yarnpkg.com/feed.xml
closed time in 2 days
OzzyCzechissue commentyarnpkg/website
Hey @OzzyCzech, the feed here was posted for https://classic.yarnpkg.com/feed.xml (which still worked), but since the new site doesn't have a feed, it's best to delete the one here: https://github.com/yarnpkg/website/commit/390d8595c1d7f3991cec0ddb7ae3f1ec3f143546
If you want a feed for the new blog, please open an issue on yarnpkg/berry
Thanks!
comment created time in 2 days
push eventyarnpkg/website
commit sha 390d8595c1d7f3991cec0ddb7ae3f1ec3f143546
Delete feed.xml
push time in 2 days
issue commentalgolia/react-instantsearch
"Error: [ssr]: no widgets were added " - A breaking change in v6.8.0, not properly documented.
could you show this bug in a sandbox perhaps @alexvandervegt? This doesn't seem to happen with the demo: https://codesandbox.io/s/github/algolia/react-instantsearch/tree/master/examples/next?file=/pages/index.js
comment created time in 2 days
push eventalgolia/instantsearch.js
commit sha b93d21cf9edb44891c43f4af0f31452efb73a03f
Apply suggestions from code review
push time in 2 days
Pull request review commentalgolia/instantsearch.js
feat(renderState): add connectNumericMenu
See documentation: https://www.algolia.com/doc/api-reference/widgets/numeric-men ); }); - test('returns the `SearchParameters` with the value from `uiState` (range)', () => {+ test('returns the `SearchParameters` with the value from `uiState` (numeric)', () => {
test('returns the `SearchParameters` with the value from `uiState` (range)', () => {
comment created time in 2 days
Pull request review commentalgolia/instantsearch.js
feat(renderState): add connectNumericMenu
See documentation: https://www.algolia.com/doc/api-reference/widgets/numeric-men }); }); - test('returns the `uiState` with a refinement (range)', () => {+ test('returns the `uiState` with a refinement (numeric)', () => {
test('returns the `uiState` with a refinement (range)', () => {
comment created time in 2 days