Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to the new UI for first time users #5334

Merged
merged 11 commits into from
Nov 21, 2018

Conversation

whymarrh
Copy link
Contributor

@whymarrh whymarrh commented Sep 24, 2018

Closes #4971

This PR is the start of the new UI switch, showing the new UI by default for first time users.

We won't be merging this PR for a while, FYI. This PR is ready for review.

Changes:

  • Remove instances of "beta" from the old&new UIs
  • Hide the main announcement for users actively switching back to the old UI
  • Update end-to-end tests to reflect new defaults

@whymarrh whymarrh added the DO-NOT-MERGE Pull requests that should not be merged label Sep 24, 2018
@whymarrh
Copy link
Contributor Author

I'm torn about what we should do with the old UI e2e tests here as updating the e2e tests would require going through the new UI on-boarding to be able to switch back to the old UI. We could delete the old UI e2e tests? It's a non-zero risk though.(Is it really? They're pretty flaky anyhow tbf.)

Similar story for the old UI integration tests. Maybe this PR represents the end of the road for all old UI tests?

@tmashuang
Copy link
Contributor

All for deleting the old oldUi e2e tests and integration tests. For the new Ui.

@@ -32,7 +32,9 @@ class PreferencesController {
tokens: [],
suggestedTokens: {},
useBlockie: false,
featureFlags: {},
featureFlags: {
betaUI: true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of ironic to push people toward the new UI and still call it betaUI here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the flag is called "betaUI" and is references throughout the pull request.

when the reality is that it will become the production UI, by nature of being the primary one people get to see and is the natural progression of it.

the idea being that some OTHER unforeseen design become the new betaUI, or the community itself is leveraged to provide skins for metamask

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow, sorry. This is a feature flag that is now permanently enabled as the first step to us removing its usages. It is called betaUI because that's what the feature it was. We will be removing it because, yes, it is becoming the default UI. I don't think that's ironic/unexpected, that's the progression of a feature flag.

If you're interested in community skins, feel free open up a new issue detailing those ideas!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get it, that's funny. With hindsight, we could have named this parameter something like "ui2" instead. It's like finding an old can of soap in your basement that says "new improved formula!". How new? How beta?

Not a big deal, we can just remove this flag when it's no longer a beta.

@whymarrh
Copy link
Contributor Author

Looks like we'll need to remove update our GH branch settings if we're gonna remove the old UI tests:

@tmashuang
Copy link
Contributor

Should we remove the tests in a separate PR?

@whymarrh
Copy link
Contributor Author

Should we remove the tests in a separate PR?

If we make the integration tests non-required we could leave them as failing, yeah? Would that be a better option?

package.json Outdated Show resolved Hide resolved
package.json Outdated
@@ -13,8 +13,6 @@
"watch:test:unit": "nodemon --exec \"npm run test:unit\" ./test ./app ./ui",
"test:unit": "cross-env METAMASK_ENV=test mocha --exit --require test/setup.js --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\" && dot-only-hunter",
"test:single": "cross-env METAMASK_ENV=test mocha --require test/helper.js",
"test:integration": "npm run test:integration:build && npm run test:flat && npm run test:mascara",
"test:integration:build": "gulp build:scss",
Copy link
Contributor

@tmashuang tmashuang Sep 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this is that the test:ingeration:build is also used for test-integration-mascara

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks

@danfinlay
Copy link
Contributor

Interesting Q about the test suite. It's mostly fine to remove old UI tests, except that we could catastrophically break it, and we probably wouldn't notice, since manually testing is just as tedious as it automatically clicking through just to enable the old UI.

That said, the things we are changing right now are just background + new UI, and anything in background that would break the old UI would probably break the new UI too, so maybe we can just be very mindful about breaking background API changes during this interim?

Lastly, how hard would it be for us to copy the new-ui setup to the beginning of the old-UI tests, so we can get the app to a state where they make sense? @tmashuang could you briefly review those files and see if they might compose at all? The old UI tests will probably need some of their first time flow tests removed, since it is no longer exactly possible to encounter.

@whymarrh
Copy link
Contributor Author

whymarrh commented Oct 2, 2018

Interesting Q about the test suite. It's mostly fine to remove old UI tests, except that we could catastrophically break it, and we probably wouldn't notice

That's a risk, certainly. I would argue that the risk is small though as a lot of functionality/actions are shared and breaking changes would likely be clear during review. I think it's possible to go a single release cycle without old UI e2e tests and without regressions.

@kumavis
Copy link
Member

kumavis commented Oct 10, 2018

Maybe we can run a command from the test to switch to old ui even though there is not a ui option to do it

@whymarrh
Copy link
Contributor Author

@kumavis to follow-up to my suggestions above, I'm thinking we can remove test-integration-flat-chrome and test-integration-flat-firefox from the set of required checks for PRs. I don't think it's worth hacking the old UI tests just to get a green check. The plan is to have the old UI remove completely the release after the one this is is so we're talking about a single release without test coverage for the old UI (which has historically not been a particularly good indicator of anything).

@whymarrh whymarrh force-pushed the ui-switch branch 2 times, most recently from 23d9324 to 2980059 Compare October 26, 2018 09:20
danjm
danjm previously approved these changes Oct 30, 2018
@@ -2,7 +2,7 @@ const fs = require('fs')
const path = require('path')
const pump = require('pump')
const browserify = require('browserify')
const tests = fs.readdirSync(path.join(__dirname, 'lib'))
const tests = fs.readdirSync(path.join(__dirname, 'lib')) // .filter((filename) => filename.match(/send/))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😅

@whymarrh whymarrh force-pushed the ui-switch branch 3 times, most recently from 2446bbf to 39faa35 Compare November 20, 2018 17:20
@whymarrh whymarrh added needs review and removed DO-NOT-MERGE Pull requests that should not be merged labels Nov 20, 2018
Copy link
Contributor

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for it. It's very much time!

@whymarrh whymarrh merged commit 66e0de7 into MetaMask:develop Nov 21, 2018
@whymarrh whymarrh deleted the ui-switch branch November 21, 2018 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants