Commit Graph

11 Commits

Author SHA1 Message Date
Michel Weststrate
12e59afdc6 Remove non-Sandy UI
Summary:
This removes the Non-Sandy UI from the Flipper codebase. It is a pretty rough scan for unused components, over time when converting more advanced components to Ant design probably even more code can be removed.

Partially used `npx ts-purge` to reveal never imported source files.

Changelog: It is no longer possible to opt out of the new Sandy UI

Reviewed By: jknoxville

Differential Revision: D25825282

fbshipit-source-id: 9041dbc7e03bce0760c9a0a34f1877851b5f06cf
2021-01-25 04:48:45 -08:00
Michel Weststrate
2ad81f2c63 Reduce sign in errors
Summary:
A lot of the errors in our monitoring / logs are mere sign in errors. Many of them are unnecessary as they are features triggered automatically even when the user isn't logged in.

This diff improves error handling and prevents requires from being made / features from being used by introducing a `<RequireLogin>` component that will hide an underlying feature if the user isn't logged in.

This also prevents the support request form from failing after the user has filled in all details.

This also fixes an issue where mobilebuilds plugin didn't refresh after the user did log in.

From our monitoring error 1,9 and 10:

{F350458668}

Reviewed By: jknoxville

Differential Revision: D25494356

fbshipit-source-id: 95701381bb74c27b9ea9658dc4df678e5f0710e0
2020-12-14 02:01:27 -08:00
John Knox
0f51ae4b82 Fix ITSR repeated requests bug
Summary:
I converted the rating button to a functional component, and mistakenly moved the effect in the constructor into the render function.

This puts it into an effect with no dependencies so it should only happen once, instead of every render.

Reviewed By: mweststrate

Differential Revision: D25185514

fbshipit-source-id: 48203b01bbd85f3b9ed4dbbb416768c0d5524f70
2020-11-26 04:34:59 -08:00
John Knox
53ba1a2ad2 Use ant star rating component
Summary: Part of converting ITSR to use ant design. Gets rid of some custom code.

Reviewed By: mweststrate

Differential Revision: D25055728

fbshipit-source-id: 451f8b0b7c2543eea59e74d5ea35761bc8ebeeba
2020-11-18 07:40:25 -08:00
John Knox
9d5ad7d8a8 Move ITSR popup into Sandy LeftRail
Summary:
The title bar is going away, so this needs to be moved somewhere when sandy is enabled.

This moves it into the left rail when sandy is enabled, and converts the icon to use a sandy icon and popover.
The contents of the popover haven't yet been converted to use sandy components.

Reviewed By: mweststrate

Differential Revision: D25055282

fbshipit-source-id: 259ed8312c0d4079433cfa7ffb88385184ae16b2
2020-11-18 07:40:25 -08:00
John Knox
797fd0517f Replace ITSR GK with a new one
Summary:
Michel discovered that the ITSR GK has been dialled down completely since the last bug.

Coming to re-enable it I discovered a bug that has been introduced since then, so have fixed that, but we can't just ramp up the original GK because the current version of flipper will crash if ITSR is used.

So instead, I'm leaving the current GK ramped down, and replacing it with a new one, which is safe to ramp up.

This will mean ITSR is only enabled on versions from the next release onwards.

Reviewed By: nikoant

Differential Revision: D24922822

fbshipit-source-id: 8a6990fd5130bd046c24b0da757492b37e4040f2
2020-11-13 01:20:49 -08:00
Michel Weststrate
ba5f067320 Fix circular imports and lint against them
Summary: When trying to refactor some components, did once again run into circular imports that cause the flipper startup sequence to fail. Added linting rules to make sure this is much less likely to happen in the future, and fixed all resulting errors

Reviewed By: nikoant

Differential Revision: D24390583

fbshipit-source-id: 9b20cf6a4d3555dc68f0069c2950dd7162b17e67
2020-10-20 03:24:47 -07:00
Austin Wang
0d53935b81 Add papercuts link to star rating popup
Summary:
Added papercuts link to the thanks message after user submits a rating within the star rating popup.
Also increased the timeout after submitting ratings from 1500 to 5000, due to the longer thanks message. Also added a dismiss option.

Reviewed By: jknoxville

Differential Revision: D23115320

fbshipit-source-id: 78de3481e5a085949ddbfbdd51ff499b8b567959
2020-08-14 10:35:36 -07:00
John Knox
9ada27526c Change RatingButton to use Popover2
Summary:
The original Popover component doesn't work when the popover goes out of bounds of the current container, and overflow is not visible, which is the case in the title bar.

This changes it to use a new absolutely positioned one instead.

Reviewed By: mweststrate

Differential Revision: D22724110

fbshipit-source-id: f41b6d154ccb66a94b63533fe9c30d2a2c49f1db
2020-07-24 07:13:28 -07:00
Pascal Hartig
fc9ed65762 prettier 2
Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Anton Nikolaev
863f89351e Yarn workspaces
Summary:
1) moved "sonar/desktop/src" to "sonar/desktop/app/src", so "app" is now a separate package containing the core Flipper app code
2) Configured yarn workspaces with the root in "sonar/desktop": app, static, pkg, doctor, headless-tests. Plugins are not included for now, I plan to do this later.

Reviewed By: jknoxville

Differential Revision: D20535782

fbshipit-source-id: 600b2301960f37c7d72166e0d04eba462bec9fc1
2020-03-20 13:37:41 -07:00