Commit Graph

328 Commits

Author SHA1 Message Date
Benjamin Elo
c4a89da960 Automatically filtler out optional parameters from uri
Summary:
When a user enters a uri with optional parameters in the nav bar, I chose to automatically filter these out, yet still show the parameters in the nav bar.

The device receive uri's with no optional parameters, but the user will still see the parameters in the UI.

Reviewed By: danielbuechele

Differential Revision: D16762529

fbshipit-source-id: e3bbdf886dca7fba793b140b5fb303c4a77926ba
2019-08-12 07:17:02 -07:00
Benjamin Elo
13fc0bec27 Minor improvements to Timeline view
Summary: Fixed issue with the timeline not having a key prop, and added some text when there are no navigation events.

Reviewed By: jknoxville, passy

Differential Revision: D16762034

fbshipit-source-id: 8f4618c8365c1a8b5a18b6176e1d80fc401f3ca5
2019-08-12 06:13:29 -07:00
Benjamin Elo
12704269d7 Migrate DetailSidebar from js to tsx
Summary: Migrated DetailSidebar.js to DetailSidebar.tsx

Reviewed By: passy

Differential Revision: D16708503

fbshipit-source-id: 13090d6d44dbd01b162194c66724059d8e86a4c8
2019-08-12 06:06:39 -07:00
Benjamin Elo
0d5850d723 Added URI validation functions and UI for correcting errors
Summary:
Some uris parsed from the device contain required parameters. Here we parse the uri and check if there is a required parameter on navigation. If there is we alert the user to correct the error.

In the next diff, I will strip away non-required parameters if they are present but not filled in.

Reviewed By: danielbuechele

Differential Revision: D16710944

fbshipit-source-id: ea32cfe60e2bb5e4f395caebf585ba1b220dcefe
2019-08-12 03:17:22 -07:00
John Knox
ce34c20506 Convert utils/pluginUtils to TS
Reviewed By: danielbuechele

Differential Revision: D16710689

fbshipit-source-id: 8da309810f633af27759286521c784ac665531b9
2019-08-12 03:11:16 -07:00
John Knox
a522afd64f Convert utils/textContent.tsx to TS
Summary: Convert utils/textContent.tsx to TS

Reviewed By: danielbuechele

Differential Revision: D16710386

fbshipit-source-id: 225d66965d915fc1c36e382e3c06c7b2dad5d973
2019-08-12 03:11:15 -07:00
Pritesh Nandgaonkar
47a55b0f26 Migrate BaseDevice from js to tsx
Summary: As per the title

Reviewed By: passy

Differential Revision: D16687261

fbshipit-source-id: a9d85424fb0a08fada7edd0355c356907518d366
2019-08-09 06:56:54 -07:00
Pascal Hartig
36a1c0046c Migrate createPaste
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16649018

fbshipit-source-id: c30d4ec390946e4b6de49ffeccc452d0a55c1e7a
2019-08-09 03:25:05 -07:00
John Knox
3bfb7faf0a Convert plugin.js to plugin.tsx
Summary:
* Deletes plugin.js
* Adds plugin.tsx
* Adds plugin flow-typed module that has the old flow types

Reviewed By: passy

Differential Revision: D16668067

fbshipit-source-id: b2f0ce47c4cf7125b4e352821e921b97675d12a9
2019-08-08 12:06:11 -07:00
Daniel Büchele
5f53087c7e client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript

Reviewed By: passy

Differential Revision: D16687855

fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
2019-08-08 11:00:38 -07:00
Pritesh Nandgaonkar
53c1eee641 Change the implementation of fresco plugin on android
Summary: This updates the implementation of the export of the fresco plugin on the android side. Initially we used to send all the images info in one call, but its not scalable, as the images increase, the payload size of the rsocket can increase which will lead rsocket to drop messages. This diff updates the implementation of android side to match the one on the iOS side.

Reviewed By: passy

Differential Revision: D16627823

fbshipit-source-id: 563bf5fb20595c198b6447bb4e41f04af6e46644
2019-08-08 09:16:41 -07:00
Chun-Ho Ng
fe56c8471c Frontend improvements for Databases plugin
Summary:
Specs here: https://fb.quip.com/aPPOAWMraRMT

Screenshots:
https://pxl.cl/Gngf
https://pxl.cl/Gngg
https://pxl.cl/Gngd
https://pxl.cl/GxQr
https://pxl.cl/Gngh
https://pxl.cl/Gngk
https://pxl.cl/Gngl
https://pxl.cl/Gngm

Reviewed By: quanturium

Differential Revision: D16266093

fbshipit-source-id: a5408b974875dcabcbd6055ccbb2818d0c1b25f6
2019-08-07 21:09:49 -07:00
Sidharth Guglani
d0a3cb5f74 Add button to navigate to Yoga Performance Plugin from Layout Inspector
Summary:
Add button in layout inspector to navigate to yoga performance plugin for analyzing a particular component.
We send component id in payload to yoga plugin which then uses to highlight the corresponding component in yoga plugin

Reviewed By: davidaurelio

Differential Revision: D16561301

fbshipit-source-id: 950fb3ea501283fec0a3036fb2796c178014f1f5
2019-08-07 06:17:24 -07:00
Pascal Hartig
6a43b0cc88 Revert D16648356: Migration of Basedevice from js to tsx
Differential Revision:
D16648356

Original commit changeset: 12954532acf9

fbshipit-source-id: 76754f427e7ccac0f0b0030c3a0af02d036c1a8b
2019-08-06 08:50:32 -07:00
Pritesh Nandgaonkar
3b31e54b6e Get all image data for iOS
Summary:
We just implemented the sending of the required metadata of the images plugin for the android, but not for iOS. Due to which we get the following error.

{F173807861}

I tried to implement `getAllImageData` first for iOS in which we send all the information in one message for the images plugin in iOS. But there were lot of images and due to which it exceeded the max payload of the rsocket. That is why I had to implement this bit for iOS in a little different way. We fetch all the image Ids first and then loop over it to get image data.

Due to this the android and iOS implementations are different. I plan to change the android part in the next diffs and make it similar to iOS, as it is more scalable.

Reviewed By: jknoxville

Differential Revision: D16606748

fbshipit-source-id: e98c2bd5db7ec247b45a7cde304d4f51053ea6fe
2019-08-06 06:59:08 -07:00
Pritesh Nandgaonkar
604e6d761f Migration of Basedevice from js to tsx
Summary: Converted BaseDevice from js to tsx

Reviewed By: passy

Differential Revision: D16648356

fbshipit-source-id: 12954532acf91930ab8c5f995bb94f6f9fe44015
2019-08-06 05:12:20 -07:00
Benjamin Elo
fe5df63d41 Added AppMatchPatterns provider to nav bar
Summary:
This commit adds the match patterns that were parsed from the app into the nav bar.

Planned for next commit: Alerting the user if they havn't filled in required parameters, and automatically excluding non-required parameters if not filled in.

Reviewed By: danielbuechele

Differential Revision: D16646774

fbshipit-source-id: 0f9130d659b6b635bfa1240dbd05c5956c6756ce
2019-08-06 03:10:47 -07:00
Benjamin Elo
c3b266c925 Parse match patterns from static directory into Flipper
Summary:
Here I parse in the match patterns belonging to the Facebook app into Flipper. In order to keep things generalized, we can add match patterns for other apps here also e.g. Instagram.

These functions are internal only, but I cannot hide them as we do not have dynamic imports. Instead, the match patterns file is hidden, and I plan to have the file read fail silently for external use.

Reviewed By: danielbuechele

Differential Revision: D16646444

fbshipit-source-id: c7978f61e5e9cfc137552777a9ed53b264184293
2019-08-06 03:10:47 -07:00
Benjamin Elo
5aadbde4b9 Added missing key props
Summary: This was an error appearing in the console that was bugging me. About how arrays of React nodes should have a key prop.

Reviewed By: passy

Differential Revision: D16646487

fbshipit-source-id: b61841c001eb4a93f0a071557b921ca7365e2ac3
2019-08-05 09:39:06 -07:00
Benjamin Elo
ea8a6546c9 Added providers to the auto complete sheet
Summary:
Okay so the main changes here are integrating the providers into the auto complete sheet and getting the search bar to work with it also.

For instance, in the search bar, I want to update the value string to whatever the user has highlighted in the auto complete sheet, without executing a new query. So thus, I had to create a new state variable in the search bar component for this.

I've also moved the custom hook into its own file to keep the component short in size. It had to be mainly rewritten to support providers instead of only bookmarks. Same goes for the entire AutoCompleteSheet component.

The bookmarksProvider is stored in the persisted state as to not regenerate every-time on render. It is only updated if the bookmarks are updated which are also now stored in the persistedState for the same reason.

Lastly, a DefaultProvider object was also made for the initial persisted state object.

Reviewed By: danielbuechele

Differential Revision: D16581644

fbshipit-source-id: 88723a4081d96250f723a4cd7b1ade101bf3e8f3
2019-08-02 01:58:02 -07:00
Sara Valderrama
f591475f85 A few mini-fixes for the accessibility layout inspector
Summary:
- fix mutual selection of elements in ax and non-ax tree (simplifies linkedNode logic as well)
- remove unneeded extraInfo attributes (focused, nonAXwithAXchild, & hasAXNode were not/no longer being used)
- use 50/50 fixed width view for trees when both are visible

Reviewed By: jknoxville

Differential Revision: D16390355

fbshipit-source-id: bbf9ea887f8f1035df8b4b0562ddcc4de291f004
2019-08-01 22:03:26 -07:00
Benjamin Elo
7a55fbc8dd Added auto complete provider utility functions
Summary:
These are a series of utility functions for the auto complete system in the nav bar.

Essentially, the auto complete system will gather information from Providers. Providers provide auto complete information from various sources i.e. bookmarks, recently viewed, or uri match patterns from the build.

There are two main functions in this commit. The first is to turn the bookmarks Map into a Provider (bookmarksToAutoCompleteProvider). This runs in O(n) time where n is the number of bookmarks. A provider has an associated icon and matchPatterns to match what the user types to a uri. Here I concatenate the commonName and the uri of the bookmark together for the match pattern so that the user can search for both.

filterProvidersToLineItems takes an Array of providers and returns line items. These are objects that will be displayed by the nav bar auto complete system. This has a little bit of a longer running time. O(mnop). Where m is the number of providers, n is the number of items in the largest provider, o is the length of the query and p is the length of the line items. This may seem bad, but I've tested the performance using 364 entries and it completes the function in less than a millisecond.

The Providers will have precedence in the final auto complete box. With the most recent provder taking the most precedence, followed by bookmarks, followed by match patterns.

Reviewed By: danielbuechele

Differential Revision: D16568500

fbshipit-source-id: 00b043d51051ee86b3dbe18564e6f582b19e5359
2019-07-31 10:18:55 -07:00
Roman Gorbunov
00e8f43e37 Improvement of live editing
Summary:
Live editing is now working faster.
We had an issue that it took about 5 seconds to see the view changed and 10 seconds to see tha value in the flipper, now it's done immidiately

Reviewed By: priteshrnandgaonkar

Differential Revision: D16500961

fbshipit-source-id: 742ce628a887bab06c1b883d9710c477af2508e7
2019-07-31 03:13:38 -07:00
Benjamin Elo
0609811224 Added dropdown sheet for nav bar
Summary:
Here I've added a drop down sheet for the nav bar. Currently it only supports showing the first five bookmarks with no filtering.

I use a custom hook to handle navigation with the keyboard in the nav bar, so that works well.

So you can use the arrow keys to select a uri from the dropdown, or by using the mouse.

Reviewed By: danielbuechele

Differential Revision: D16542218

fbshipit-source-id: 4c242fd3097297fc599b36523bb4821bbc172f88
2019-07-29 10:13:37 -07:00
Pascal Hartig
2dd580f24a Fix flow errors (#502)
Summary:
We had a brief moment without Flow coverage, where this must have snuck
in. Not sure if there's a better type for `node` given the current
structure, but the rest should be obvious.
Pull Request resolved: https://github.com/facebook/flipper/pull/502

Test Plan: flow

Reviewed By: jknoxville

Differential Revision: D16533248

Pulled By: passy

fbshipit-source-id: 51e493208050e4af531e161fb49eda77fdf2494e
2019-07-29 06:08:37 -07:00
Benjamin Elo
4372fccacc Alphabetize bookmarks
Summary: The bookmarks would appear in different order upon reloading the app. Here I have a fixed order.

Reviewed By: jknoxville

Differential Revision: D16540496

fbshipit-source-id: ebc3e1065dbd2ae76b919a943c2cc7f81d857ca8
2019-07-29 04:29:46 -07:00
Benjamin Elo
fc28b904a0 Added ability to remove bookmarks
Summary: Here I add the ability to remove bookmarks. If a bookmark already exists, a different dialouge menu appears.

Reviewed By: danielbuechele

Differential Revision: D16540394

fbshipit-source-id: 5d6737e1efb1a9663519bf17084ef3b55a6ba28e
2019-07-29 04:29:45 -07:00
Benjamin Elo
292efb0bb3 Moved NavPlugin types into seperate file
Summary: Moved Flow types into their own file. I will be adding more types as part of the auto complete for the navigation bar and this is to keep the code more organized.

Reviewed By: danielbuechele

Differential Revision: D16540279

fbshipit-source-id: d69ac0d05f91e9d92fcda37325c791ddc83a52c9
2019-07-29 03:47:49 -07:00
Benjamin Elo
84f9a1d8b5 Added ability to save bookmarks in Nav Plugin
Summary:
This is a glue commit that glues all the components I've added in the past together.

Favouriting a page (i.e. clicking on the star) adds it as a bookmark.

There's four main parts to make your rreview easier:
1. Add bookmarks and favouriting to all the components that support it, including their parents. (NavigationInfoBox, SearchBar, Timeline)

2. Persist bookmarks using the indexedDB. (index.js)

3. Add saving to db through the SaveBookmarksDialog

4. Various other changes due to a changed architecture. i.e. moving bookmarks from persistedState to state.

Still to come.

1. Removing bookmarks.

2. Pressing enter to save the bookmarks when the SaveBookmarksDialog pops up.

3. Alphabetizing bookmarks? Order seems to jump around.

Reviewed By: jknoxville

Differential Revision: D16518013

fbshipit-source-id: 2e0cef14123c611db43cca360bc66dc4c05b11ed
2019-07-28 12:50:31 -07:00
Benjamin Elo
e4601a89f3 Added IndexedDB utility functions for reading and writing bookmarks
Summary:
These are utility function for reading from the IndexedDB and writing to it. This will be used for persistant storage of bookmarks.

The reason I chose IndexedDB over local storage is due to the poor efficiency of stringifying and parsing a long list of bookmarks everytime we read and write to local storage.

With IndexedDB we can modify a single value at a time.

Bookmarks are passed around as a Map, with the key being the uri's and the common names being the values. This allows me to check if a specified uri is in the Map in O(1) time, so that I can highlight the star icon in the UI with gold.

Reviewed By: jknoxville

Differential Revision: D16498744

fbshipit-source-id: 7c7af28bf4eb3fcc985a71dfd61ffbdb8481b6a6
2019-07-28 12:50:31 -07:00
Benjamin Elo
dbfc7ae416 Added SaveBookmarkDialog component
Summary: This adds a dialog box component that allow saving of bookmarks.

Reviewed By: jknoxville

Differential Revision: D16491842

fbshipit-source-id: fc8332bba491ad0583564fd6a85b5ad225bbd461
2019-07-25 06:54:39 -07:00
Benjamin Elo
66bed16333 Added navigation ability to bookmarks sidebar
Summary: I've added the ability to navigate to different pages in the app via the bookmarks sidebar. Still no way to add bookmarks yet.

Reviewed By: jknoxville

Differential Revision: D16438415

fbshipit-source-id: f7dcda1add701eba8655518fba7cb9a82cf49ca1
2019-07-23 09:52:21 -07:00
dependabot[bot]
5283bf5ada Bump lodash from 4.17.5 to 4.17.13 in /src/plugins/shared_preferences (#496)
Summary:
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.5 to 4.17.13.
<details>
<summary>Commits</summary>

- [`e371828`](e37182845f) Bump to v4.17.13.
- [`357e899`](357e899e68) Rebuild lodash and docs.
- [`fd9a062`](fd9a062d57) Bump to v4.17.12.
- [`e77d681`](e77d68121f) Rebuild lodash and docs.
- [`629d186`](629d186579) Update OpenJS references.
- [`2406eac`](2406eac542) Fix minified build.
- [`17a34bc`](17a34bc585) Fix test bootstrap for core build.
- [`53838a3`](53838a38f8) Fix tests in older browsers.
- [`29e2584`](29e258497b) Fix style:test lint nits.
- [`8f4d3eb`](8f4d3eb018) Update deps.
- Additional commits viewable in [compare view](https://github.com/lodash/lodash/compare/4.17.5...4.17.13)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lodash&package-manager=npm_and_yarn&previous-version=4.17.5&new-version=4.17.13)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/496

Reviewed By: jknoxville

Differential Revision: D16417041

Pulled By: passy

fbshipit-source-id: 8e6f08761b0478184569588eec786e577508e058
2019-07-23 06:23:47 -07:00
Benjamin Elo
a262d22399 Added BookmarksSidebar component
Summary:
This is another WIP. Here I construct a skeleton functional component which currently just displays that there is no bookmark information.

I have also placed the component into the layout.

Reviewed By: jknoxville

Differential Revision: D16419794

fbshipit-source-id: fe1722255bde2b8363e5514c284a242f077e5185
2019-07-23 03:35:42 -07:00
Benjamin Elo
c6f9d1cb18 Added FavoriteButton component
Summary: I've added a favorite button component. The FavoriteButton is a toggle button that has a gold favorited state and an outlined non-favorited state. This is passed in as a prop.

Reviewed By: jknoxville

Differential Revision: D16418215

fbshipit-source-id: b695ea223d5a543df6bf1e588dc6756f9e84e8e1
2019-07-23 03:35:41 -07:00
Benjamin Elo
eeeb32efa9 Created Timeline component
Summary: This is a WIP component that displays the timeline of nav events to the user.

Reviewed By: jknoxville

Differential Revision: D16417087

fbshipit-source-id: 45a4bcdc271941d413c78fab2424628499c6d5ea
2019-07-23 03:35:41 -07:00
Benjamin Elo
f4e4dccd63 Added word wrap and navigation to nav info box
Summary: What happens in NavInfoBoxes stays in NavInfoBoxes i.e. the text now wraps instead of leaking out of the container. Also the eye icon works for navigation.

Reviewed By: jknoxville

Differential Revision: D16416974

fbshipit-source-id: 029b1c7e56db9fdf6499a52296080cd340078353
2019-07-23 03:35:41 -07:00
Benjamin Elo
f313d5edcb Added full screen flex column
Summary: The original flex colum that came as standard did not flex to fill the remainder of the screen. Adding this component allows for a full screen flex column so that the scroll bar in the timeline looks correct.

Reviewed By: jknoxville

Differential Revision: D16416933

fbshipit-source-id: bd296aea85730f192778ed0aca4b226893b2829d
2019-07-23 03:35:41 -07:00
Benjamin Elo
aeee96c050 Reversed order of incoming nav events
Summary: Since events will be displayed in a timeline view with a flex-cloumn, it is more efficient to have the events be added to the event array in reverse order; that is the newest events at the front of the array.

Reviewed By: passy

Differential Revision: D16379893

fbshipit-source-id: c85a2cca118e2d4ae990f69134f5d5770c360fbd
2019-07-22 03:07:00 -07:00
Benjamin Elo
9b82dc5025 Added IconButton Component
Summary: Added IconButton component with a ripple effect. I also placed it into the components where it will be used.

Reviewed By: passy

Differential Revision: D16378064

fbshipit-source-id: 6b677ec4a43adf94eb38136a9c607c85919c0176
2019-07-19 11:50:41 -07:00
Pritesh Nandgaonkar
0c0f0d4a90 Fix fresco fetch bug
Summary: Before this diff the "getAllImageData" wasn't triggered as the it used to early exit, because persistedState was not null. That check was unnecessary and not needed.

Reviewed By: jknoxville

Differential Revision: D16377134

fbshipit-source-id: 61ee49fbd908733798086206a82e38890ecd0af6
2019-07-19 07:30:30 -07:00
Benjamin Elo
df725de674 Added NavigationInfoBox component
Summary:
Here I added an info box to display the info of the incoming navigation events.

The component is currently missing interaction (navigating to uris and favoriting), but I will add that in my next diff.

While I was here, I modified the component file structure a tiny bit to make importing components easier.

Reviewed By: jknoxville

Differential Revision: D16357204

fbshipit-source-id: 70b137e052181559a2fda02b091a71e54cb1ade0
2019-07-18 08:15:03 -07:00
Benjamin Elo
beb656c84e Added Nav Plugin tests
Summary:
Here I added two tests to test the persisted state reducer in the navigation pliugin.

I uncovered that my state reducer is not pure, as it calls the Date constructor, but I will fix this in a future update by passing the date recorded on the Android device when the nav event occurs and sending that via the socket connection.

For now I have modified the state reducer to take a date as part of the payload on a nav_event, or if none exists record the date as before. Also, if a page has no uri, but we want to record a nav event, I send null uri from the Android side. This doesn't send the uri as null to flipper; the uri object property simply doesn't exist. In this case I explicitly cast the undefined value for uri to null.

Reviewed By: jknoxville

Differential Revision: D16330958

fbshipit-source-id: fe338ea3a244df6ef33356bc7fdef8da9291dc68
2019-07-18 02:54:34 -07:00
Mihaela Ogrezeanu
11198e003e Display data model in side panel
Summary:
This displays the data models passed to the Sections in the side panel when a data node is clicked. This does not change the collapse behaviour when a Section node is clicked.
To make it easier to associate a section with its changesets, appended the global indexes a Section is responsible for to the node label.

Reviewed By: passy

Differential Revision: D16283820

fbshipit-source-id: f1149f47dff448de05d919f7f8d16a2aba53bbb0
2019-07-17 06:29:22 -07:00
Benjamin Elo
a9e90aa9b2 Receive navigation events and persist them
Summary: After setting up the navigation event emitter on the android side, we must now receive them on the client side and persist them in the Redux store.

Reviewed By: passy

Differential Revision: D16280944

fbshipit-source-id: 3dc4c5c6add41388469c801700974eb0ccd9a56b
2019-07-17 03:00:50 -07:00
Mihaela Ogrezeanu
42c887e634 Add more fields on the Tree nodes
Summary:
Add fields for colouring the changeset operation that was performed on a node in the tree.
Changesets are not ordered by type of operation, they need to be displayed in order

Reviewed By: danielbuechele

Differential Revision: D16121158

fbshipit-source-id: 411557170b16ada9d1d72fb617b1aaf583e0f0e7
2019-07-16 07:33:12 -07:00
Benjamin Elo
9f1f34bd99 Added search bar to navigation plugin
Summary:
Here I've started work on a search bar for the top of my plugin. Currently it supports navigation in a device by typing in an app uri and pressing the enter key or by pressing the send icon.

More features will be added as other components for this plugin are added. I have added a function stub for the bookmark button for now and the drop down icon is purely cosmetic at the moment.

Reviewed By: jknoxville

Differential Revision: D16183223

fbshipit-source-id: 0313d8c6e3a967c9400b9e9d3f24960e6a021a8c
2019-07-11 07:48:47 -07:00
Pascal Hartig
e831743132 Harden lint rules
Summary: Taking another stab at adding some lint rules to make it harder to shoot yourself in the foot. Hopefully nothing too controversial. Preferring spread and rest should lead is more readable and there's no downside when using ES6. The "useless" rules are just things like renaming imports to the original name which should only happen during refactors.

Reviewed By: jknoxville

Differential Revision: D16180453

fbshipit-source-id: 1cf6851b7726c0aee953ec7cf7dd6fa0aca32253
2019-07-10 12:06:39 -07:00
Pascal Hartig
c588b650ae Prefer const wherever possible
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.

This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.

Used `eslint --fix` to change all existing cases.

Reviewed By: jknoxville

Differential Revision: D16131329

fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
2019-07-10 03:28:25 -07:00
Pascal Hartig
662db20948 Disallow var
Summary: We're ES6 and `var`s scoping rules are weird. Let's block this.

Reviewed By: jknoxville

Differential Revision: D16131290

fbshipit-source-id: ba67d16bb8a185a4bb59a657a97b00230dbacafe
2019-07-10 03:28:25 -07:00