Summary:
Add support for secondary indices, to allow for cheap lookups, like a set of events for a specific UI element in the events table:
```
#### getAllRecordsByIndex
Usage: `getAllRecordsByIndex({ indexedAttribute: value, indexAttribute2: value2, .... })`
This method allows fast lookups for objects that match specific attributes exactly.
Returns all items matching the specified index query.
Note that the results are unordered, unless
records have not been updated using upsert / update, in that case
insertion order is maintained.
If no index has been specified for this exact keyset in the indexQuery (see options.indices), this method will throw.
Example:
```
```
const ds = createDataSource([eatCookie, drinkCoffee, submitBug], {
key: 'id',
indices: [
['title']
['id', 'title'],
['title', 'done'],
],
});
// Find first element with title === cookie (or undefined)
const todo = ds.getFirstRecordByIndex({
title: 'cookie',
})
// Find all elements where title === cookie, and done === false
const todos = ds.getAllRecordsByIndex({
title: 'cookie',
done: false,
})
```
Reviewed By: antonk52
Differential Revision: D47396435
fbshipit-source-id: 20c4527be83532863b9b07ab20ebf20a80c3c35d
Summary:
This diff has been automatically generated by the inpage editor.
NOTE: If you want to update this diff, go via the preview link inside the static docs section below.
Ensure you are editing the same page that was used to create this diff.
Reviewed By: mweststrate
Differential Revision: D45996048
fbshipit-source-id: a509d9393d2b61ec044cdf1b749b5b6083070ff3
Summary: It wasn't exported, instead it was consumed by the 'flipper' deprecated module.
Reviewed By: fabiomassimo
Differential Revision: D43872434
fbshipit-source-id: 70a4a525c660f0779f942739311205417cef3834
Summary:
Hoping that this will fix our docs build.
Note that I also had to fix a syntax error in `extending/loading-custom-plugins.mdx` that
broke the build with:
```
SyntaxError: /Users/realpassy/fbsource/xplat/sonar/docs/extending/loading-custom-plugins.mdx: Expected corresponding JSX closing tag for <admonition>. (10:10)
8 | <FbInternalOnly>
9 | <admonition {...{"type":"caution"}}><p parentName="admonition">{`Within Meta, plugins sources are stored and loaded from `}<inlineCode parentName="p">{`~/fbsource/xplat/sonar/desktop/plugins`}</inlineCode>{`, in which case no further configuration is needed.`}</p><p parentName="admonition">{`If your team uses Flipper plugins that are stored outside `}<inlineCode parentName="p">{`fbsource`}</inlineCode>{`, please follow your team specific instructions.
> 10 | ::::`}</p></FbInternalOnly><p parentName="admonition">{`Flipper loads and runs plugins it finds in a configurable location. The paths searched are specified in `}<inlineCode parentName="p">{`~/.flipper/config.json`}</inlineCode>{`. These `}<inlineCode parentName="p">{`pluginPaths`}</inlineCode>{` should contain one folder for each of the plugins it stores.`}</p><p parentName="admonition">{`An example config setting and plugin file structure is shown below:`}</p><p parentName="admonition"><inlineCode parentName="p">{`~/.flipper/config.json`}</inlineCode>{`:`}</p><pre parentName="admonition"><code parentName="pre" {...{"className":"language-bash"}}>{`{
| ^
11 | ...,
12 | "pluginPaths": ["~/flipper-plugins"]
13 | }
client (webpack 5.74.0) compiled with 1 error
```
Reviewed By: ivanmisuno
Differential Revision: D43767006
fbshipit-source-id: 64288d63c305bc9a9c9b797110889a703c7dcfee
Summary: Out of the box the library search has some issues. when search matches it steals focus from the input. Eventually we want to customise the rendering of the tree items anyway so this lays the foundation for taht
Reviewed By: antonk52
Differential Revision: D41336524
fbshipit-source-id: 194f67023edd0675cd9bd8d6134260439c6b2785
Summary: This diff includes minor changes to the pages within the Creating Plugins section of Flipper Docs.
Reviewed By: passy
Differential Revision: D41497503
fbshipit-source-id: 5c5718b63bfff18322b28b547724415ab40a1810
Summary: This change alphabetically sorts the 'Under the Hood' section and adds a 'Meta' parent category for everything that is internal as to add a visual cue of what is internal and whats not.
Reviewed By: passy
Differential Revision: D41273678
fbshipit-source-id: 1acf8da184762d5924bff90b6691be1e4be92c46
Summary: Since there were large refactoring's done to `DataSource` during the milestone for side-by-side panels, wanted to update some of the documentation as well so that the information is accurate and up to date.
Reviewed By: mweststrate
Differential Revision: D38541404
fbshipit-source-id: a6ba472f881fb8cbfa90ff5ac295a0b87c595080
Summary:
This diff has been automatically generated by the inpage editor.
If you want to update this diff, go through the preview link that would be attached to the test plan.
Please ensure you are editing the same page that was used to create this diff.
Reviewed By: passy
Differential Revision: D37853011
fbshipit-source-id: 1d68d5a80b30bb1b1cdf5703272717dadbe3a977
Summary:
Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).
This diff includes a new version of the images:
bg-plugin-lifecycle.png
regular-plugin-lifecycle.png
The old versions have been renamed to:
bg-plugin-lifecycle.bak
regular-plugin-lifecycle.bak
Reviewed By: aigoncharov
Differential Revision: D36630758
fbshipit-source-id: 29922750364e1dd6f959bd297e3b5d5e6cf1a9ac
Summary:
Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).
This diff includes a new version of the image 'flipper-communication-diagram.png'.
The old version has been renamed to 'flipper-communication-diagram.bak'
Reviewed By: aigoncharov
Differential Revision: D36628993
fbshipit-source-id: cb59785777926b4fb8b8bb3be2aa2439d3a580d0
Summary: Required for companion in later diffs
Reviewed By: passy
Differential Revision: D36517737
fbshipit-source-id: ad47ae00cc88f424507284553c7d4eb430691311
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36315001
fbshipit-source-id: 6a628abb9328e1c9dbe38c98fd6a12f84563efd4
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36313447
fbshipit-source-id: 99f94779caefd7f9f64121a40928c2be2d1f3ff4
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: nikoant
Differential Revision: D36312999
fbshipit-source-id: 737a1f8a9dc659c7351ac55e0ccc1d4083393aa5
Summary: remove statically analysable life from typescript guidelines and let eslint handle it
Reviewed By: passy
Differential Revision: D33819891
fbshipit-source-id: 3cc3cb512607c3651cd3a9e48228d83bab5bb64a
Summary:
Adding this to another place that people seem to overlook.
This diff has been automatically generated by the inpage editor.
If you want to update this diff, go through the preview link that would be attached to the test plan.
Please ensure you are editing the same page that was used to create this diff.
Reviewed By: antonk52
Differential Revision: D33528019
fbshipit-source-id: ce6bf60b42161fc409277fb8c62ff38fd91b05cf
Summary:
* Documented `npx flipper-server`
* Documented how to properly interact with the OS from Flipper plugins
Reviewed By: antonk52
Differential Revision: D33361929
fbshipit-source-id: 3028de2bf77a9ee6d9e521c1a53cff2388c936ea
Summary:
1. Add `path` replacement
1. Remove Node's path for all plugins but MobileBuildsPluginContainer (it is probably going to be moved to the server)
Reviewed By: mweststrate
Differential Revision: D32766327
fbshipit-source-id: e636f273842506e752b97cf1b28ce7ac51ce9a12