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

feat: early adopter UI #1959

Merged
merged 19 commits into from
Sep 29, 2022
Merged

feat: early adopter UI #1959

merged 19 commits into from
Sep 29, 2022

Conversation

cmunns
Copy link
Contributor

@cmunns cmunns commented Sep 27, 2022

  • Added TOS to free tier pre-upload
  • Updated enterprise plan form inputs
  • Added plan information to account page and removed default limit labels
  • Added ui blocking overlay to tiers when tier is early adopter
  • Updated tooltip text for tier table
  • Remove first and last name boxes from Enterprise Query Form
  • Early Adopters Account Page: their current storage limit will displayed and will stay the same as it was before and the progress bar will remain the same
  • (Nice to have) Early Adopters Account Page Account Page remove: orange add you cc payment warning above the matrix (Free Tiers continue to see this warning)
  • As a new user, on the payments page, when I select Lite or Expert, I must tick yes to “I have read and agree to the web3.storage Terms of Service" before being able to confirm (bolded text is linked to https://web3.storage/terms/).
  • As a new user, on the accounts page, when I go to upload my first file, I must tick yes to “I have read and agree to the web3.storage Terms of Service" before being able to upload my file (bolded text is linked to https://web3.storage/terms/)

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2022

@cmunns cmunns temporarily deployed to production September 28, 2022 22:06 Inactive
@cmunns cmunns temporarily deployed to production September 28, 2022 22:46 Inactive
@cmunns cmunns temporarily deployed to production September 28, 2022 22:59 Inactive
@cmunns cmunns marked this pull request as ready for review September 28, 2022 23:23
import { userBillingSettings } from '../lib/api';
import { plansAll } from '../components/contexts/plansContext';

export const usePayment = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

will you add a comment explaining what this is intended to be used for? How would another dev look at this and decide whether or not it's appropriate for their use case in another part of the codebase?

@yusefnapora
Copy link
Contributor

I haven't run the project locally for a while, so I'm not sure if this is related to this branch or not, but I get this after login:

2022-09-29_11-39

I'm also not seeing the TOS popup, which I think is because my currentPlan is null, but the check for popping up the TOS is currentPlan?.id === 'free'. This is with the API running locally from this branch, BTW, so LMK if I should be targeting staging or something instead.

@yusefnapora
Copy link
Contributor

I think the TOS thing from my last comment is caused by not setting up the stripe secrets locally. Will try that and do some more poking...

@yusefnapora
Copy link
Contributor

Got things working locally - my existing account shows up as "early adopter" and a new address shows "Free" and gives me the TOS prompt 👍

Copy link
Contributor

@yusefnapora yusefnapora left a comment

Choose a reason for hiding this comment

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

I played around a bit, and everything seems to work as described when I run locally and nav to /account/payment with an "early adopter" account and a "free" account.

I left a couple suggestions, but I don't think there's anything blocking or unsafe to merge in. BTW, the runtime error about pinning access shows up for me on main also, so I don't think it's related to this branch.

};
useEffect(() => {
const acceptedTermsLocalStorage = localStorage.getItem('acceptedTerms');
console.log(acceptedTermsLocalStorage);
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably rm this console.log or add some context so it's not just a random timestamp or null

<Dropzone
className="file-uploader-dropzone"
className={`file-uploader-dropzone ${
!hasPaymentMethod && currentPlan?.id === 'free' && !hasAcceptedTerms && 'disabled'
Copy link
Contributor

Choose a reason for hiding this comment

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

not a blocker at all, but when conditional chains get this long I like to pull them out into local vars, e.g. const dropZoneEnabled = thing && otherThing.

@cmunns cmunns merged commit 1affae3 into main Sep 29, 2022
@cmunns cmunns deleted the feat/early-adopter-ui branch September 29, 2022 16:41
drewdelano pushed a commit that referenced this pull request Sep 29, 2022
🤖 I have created a release *beep* *boop*
---


##
[2.22.0](website-v2.21.2...website-v2.22.0)
(2022-09-29)


### Features

* /account/login?redirect_to=/final/url should redirect to /final/url
after authn
([#1950](#1950))
([2bbe6de](2bbe6de))
* create page for service level agreement
([#1955](#1955))
([6525845](6525845))
* early adopter UI
([#1959](#1959))
([1affae3](1affae3))
* homepage (index) copy for pricing changes
([#1942](#1942))
([f2084a3](f2084a3))
* new users are initialized into free tier
([#1945](#1945))
([ee67c35](ee67c35))
* pricing page (for tiered pricing)
([#1894](#1894))
([3f0db86](3f0db86))
* revert "fix: rm menu item from global account menu"
([#1951](#1951))
([2f84754](2f84754))
* update preview summary metadata
([#1965](#1965))
([a47949c](a47949c))
* update terms of service
([#1964](#1964))
([dd810b9](dd810b9))
* update the web3storage product page (for tiered pricing)
([#1957](#1957))
([03a6422](03a6422))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants