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

[PWA-458] Checkout - Sign In View #2889

Merged
merged 11 commits into from
Dec 15, 2020
Merged

Conversation

tjwiebell
Copy link
Contributor

@tjwiebell tjwiebell commented Dec 3, 2020

Description

Before starting, check with UX to ensure desired functionality. In particular, the current (10/14) desire is to remove the "sign in" link from the cart page and to update the user flow on the checkout page by including a new CTA that opens a sign in page view that, once complete, redirects back to the checkout page (with new user data). On desktop the CTA appears above the summary on the right. On Mobile the CTA appears above the forms, as the summary is moved below the forms (after payment info step).

Related Issue

  • [PWA-458] Checkout - Sign In View

Acceptance

Verification Stakeholders

Specification

Verification Steps

  1. Add items to a guest cart
  2. Navigate to /cart, verify sign in link no longer there
  3. Navigate to /checkout, verify new style and position of sign in panel
  4. Step through each scenario in this new view (sign-in, forgot password, create account). Sign-in and create account should return you to checkout view. Forgot password is a bit of a dead end but assumed they would continue the journey from an email link
  5. Verify display and positioning on mobile (functionality wise these do not change between mobile and desktop).

Screenshots / Screen Captures (if appropriate)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

@sirugh sirugh added the version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump. label Dec 3, 2020
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Dec 3, 2020

Messages
📖

Associated JIRA tickets: PWA-458.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Generated by 🚫 dangerJS against b3941dd

- Add/remove changes to language file
- Add heading to Create Account form
- Made cancel buttons low priority per UX guidance
- Fixed button layout of Create Account form so it uses rows on mobile
- Move SignIn container above Guest Checkout header on mobile
@schensley
Copy link

@tjwiebell Thanks for all the work. UX Approved.

packages/venia-ui/i18n/en_US.json Show resolved Hide resolved
if (view === 'SIGNIN') {
content = (
<SignIn
classes={{ modal_active: undefined, root: classes.signInRoot }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice way to handle this 😅 .

Looking at SignIn,

    if (isBusy) {
        return (
            <div className={classes.modal_active}>
                <LoadingIndicator>
                    <FormattedMessage
                        id={'signIn.loadingText'}
                        defaultMessage={'Signing In'}
                    />
                </LoadingIndicator>
            </div>
        );
    }

I'm guessing we just don't care if its busy getting the user's info or signing them in?
Why don't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still block on these operations, I just needed a slightly different UX while this was happened. Without the override I got this full page indicator, when I wanted something in context of my view.

No good:

Better:

@supernova-at
Copy link
Contributor

supernova-at commented Dec 9, 2020

Works great!

Nice re-use, love to see code being deleted, and great tests 👍

A couple questions for clarification and maybe some minor changes.

@fooman fooman removed their assignment Dec 9, 2020
@dpatil-magento
Copy link
Contributor

QA Approved.

@dpatil-magento dpatil-magento merged commit 81043d7 into develop Dec 15, 2020
@dpatil-magento dpatil-magento deleted the tommy/checkout-signin branch December 15, 2020 18:23
revanth0212 added a commit to revanth0212/pwa-studio that referenced this pull request Feb 9, 2021
* [PWA-893] My Account: Order History - Remove @client directive (magento#2786)

* Remove client directive and work through errors from using live data

* Fixup region display so its not rendering ids

* Fix payment method display and remove extra comma in addresses

* Additional tweaks from UX feedback

* Fixup failing tests

* Fix couple tests failing after gql move

* Fix bug where tracking information doesn't exist for shipped order

* Updated Intl FormattedMessage component mock. (magento#2792)

* Updated FormattedMessage component mock.

* div -> mock-FormattedMessage

* div -> mock-FormattedMessage

* Resetting price mock.

* Price component snap rollback.

* - Adjust item grid based on UX feedback
- Add context for providing product url suffix that is missing from graphql response

* Fixup failing tests

* Address PR feedback

* Cover new context with tests

* Address QA feedback

* Fixup tests and hide incomplete features

* Address additional edges found in QA

* Dependently render discount row

* Update snaps with new mock

* Allow empty string as quantity value to support backspace

Co-authored-by: Revanth Kumar Annavarapu <35203638+revanth0212@users.noreply.github.com>

* fix: Service Worker caching for home page routes w/ store code (magento#2856)

* Fix regex for html file type. Previous regex matched incorrect

* Use available store views in SW home route check

Signed-off-by: sirugh <rugh@adobe.com>

* Update tests

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* issue-2743-function-retreiveAvailableShippingMethods-spelling-change- changed the function name in both the occurences (magento#2807)

Co-authored-by: Stephen <sirugh@users.noreply.github.com>

* Update index.md (magento#2865)

Co-authored-by: Stephen <sirugh@users.noreply.github.com>

* [docs]: Add info about RAIL model (magento#2761)

* Update index.md

* Update pwa-devdocs/src/technologies/overview/index.md

Co-authored-by: Stephen <sirugh@users.noreply.github.com>

Co-authored-by: Stephen <sirugh@users.noreply.github.com>
Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com>

* [Doc] extensibility framework overview (magento#2863)

* Add TOC entry

* Add new topic file and outline

* Add how it works section

* Add interceptor pattern section and image

* Add content for Targets section

* Add content for Intercept files

* Finish Declare file content

* Add content for Targets in PWA Studio packages

* Add list of extension examples

* Add extensibility overview diagram

* Apply suggestions from code review

Co-authored-by: Andy Terranova <13182778+supernova-at@users.noreply.github.com>

* Fix links

* Fix linting issues

* Add example intercept file content

Co-authored-by: Andy Terranova <13182778+supernova-at@users.noreply.github.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [feature]: Display "no payment method available" message if no allowed or configured payment methods are present (magento#2855)

* Filtered payment method radios.

Filtered payment method radios array because it was coming like [undefined, undefined]

* Showing "No Payment method available." message

Showing "No Payment method available." message when there are no supported payment methods available.

* Created class to add padding to no payment method message

Created class to add padding to no payment method message

* Fixed formatting using prettier

* Formatted with prettier

* Fixed typo suggested by @sirugh

* Added plain string to i18n

* Added string to translations

* Fixed Typo

* Fixed typo

* Update packages/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js

Co-authored-by: Stephen <sirugh@users.noreply.github.com>

* Update packages/venia-ui/i18n/en_US.json

Co-authored-by: Stephen <sirugh@users.noreply.github.com>

* Fixed suggested changes given by sirugh

* Added missing dep react-intl

* Updated error messages and added global error color to it.

* Added error test.

Co-authored-by: Stephen <sirugh@users.noreply.github.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>
Co-authored-by: Revanth Kumar <revanth0212@gmail.com>

* [PWA-633] My Account: Address Book: Main View (magento#2857)

* Stub out address card functionality based on new mocks

* - Address some missed AC and hide dead links
- Cover changes in tests

* Update snaps and cleanup

* - Sort addresses so default comes first
- Add full page loading indicator on cold cache render
- Add phone number
- Add full country name display

* Use country data from backend until DisplayNames is more widely supported

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Move product detail GraphQl fields to fragment (magento#2868)

* move product detail graphql fields to fragment

* move gql from venia-ui to peregrine

* update test case

* Use ApolloClient for MagentoRoute (magento#2859)

* Use Apollo for MagentoRoute

* Move queries to the talon

* Adjust category page loading

* Refactor to avoid repeat calls

* Fixup

* Remove getRouteComponent

* Start tests

* Rewrite unit tests

* Lift state up to context

* @brendanfalkowski

* Remove old query

* Inline response objects

* Update snapshots

* Update category snapshots

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Fix apiBase URL in resolveUnknownRoute.js (magento#2877)

* Fix apiBase URL in resolveUnknownRoute.js

Fix URL used by `resolveUnknownRoute.js` so it takes `apiBase` into account when constructing URL to GraphQL server

* Add test for store base

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: sirugh <rugh@adobe.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Use async version of act() (magento#2880)

* Added feature to pick from multiple sample backends. (magento#2853)

* Initial work

* Added magento backend validation.

* Updated intercept to fetch backends.

* Fetching sample backends while creating a pwa app.

* Minor.

* Added try catches.

* Updated docs.

* Minor.

* Added node-fetch peer dep.

* Minor pretty print stuff.

* Added lodash and node-fetch deps.

* Updated extension desc.

* Updated tests.

* Minor.

* Updated remaining tests.

* Added runEnvValidators.js tests.

* Fixed linter issues.

* Minor.

* Added intercept tests.

* Using debug instead of console.error.

* Moving backend related code to run after configureWebpack.

* Updated the skipped test.

* Update ENV error reporting message.

* Minor.

* Minor.

* Updated error snapshot test.

* Minor.

* Minor.

* Added or condition for path variable in tests.

* Minor.

* Updated tests to use snapshots.

* Mock everything, lets get this working.

* Removed unecessary mocks.

* Updated tests.

* Using try catch to avoid prj creations.

* Reporting different message if otherBackends is empty.

* Updated tests.

* Prettier fix.

* Added console warning for production deployment.

* Updated production launch checklist docs.

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [PWA-1128] fix(buildpack): Stop apicache from overriding good cache headers. (magento#2870)

* fix(buildpack): Stop apicache from overriding good cache headers. Fixes PWA-1128.

* fix(venia-ui): add cache headers to upward.yml staticFromRoot resolver

* fix: add simple max-age behavior to upward DirectoryResolver

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* magento/magento2-page-builder/magento#637: Form field/field group viewport scope (magento#2881)

- collect only desktop styles

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [doc] update cloud deployment topic (magento#2871)

* Add new sections in the beginning

* Revise steps and adding required extensions step

* Add section about setting environment variables

* Remove optional and unneeded steps

* Add build, commit, and deploy sections

* Add more details on finding the correct UPWARD path value

* Update based on feedback

* Minor content update

* Changes based on review feedback

* Clarify env variables section

* Minor fixes

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Handle array of paths as route pattern (magento#2893)

* Handle array of paths as route pattern

* JSON.parse route pattern when applying to Route path prop

* Add tests to makeRoutesTarget

* Fix missing projectConfig in create-custom-origin (magento#2897)

* Fix missing projectConfig in create-custom-origin

* Update examples in docs

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Improve RootComponents talons test coverage (magento#2896)

* Refactor useCategory tests

* Refactor useCategory test file

* Add test to useCategory.spec.js

* Add location search filter test to useCategory.spec.js

* Add test for error on useCategory.spec.js

* Finish test coverage for useCategory

* Write tests for useNoProductsFound() talon

* Add tests for useCategoryContent() talon

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Address Book - Add & Edit (magento#2879)

* Initial layout of add / edit form

* Adds unit tests

* Adding address full flow. Stubs out edit address.

* Country field to use country_code

* Properly formats FormErrors

* Absolute imports

* Seeds and sets the form properly

* Implements edit flow end to end

* Disable dialog buttons while saving

* Updates unit tests and snapshots

* Implements default address checkbox

* Smoothing out edges around default addresses

* Attempt to fix broken test

* Determinant sorting for default addresses

* Update packages/venia-ui/lib/components/AddressBookPage/addressBookPage.js

Co-authored-by: Jimmy Sanford <jimbo@users.noreply.github.com>

* Remove auto-defaulting of addresses

* Remove query result fields from add mutation

* Adds query result fields to upadte mutation

* Adds AddEditDialog classes to propTypes

* Simplify passing parameter to edit callback function

* Adds address fragments

* Wait for refetchQueries to complete before finishing mutation

* Waits for refetchQueries before closing dialog. Renames props.

* Updates unit tests based on prop rename

* Binds edit address function at creation time

* Updates unit tests

* Adds middle name to AddressCard display

* Dialog to properly unmount on hide

* Updates unit tests

* Fixes new address bug

* Simplifies seeding the form in useAddressBookPage talon

* Adds JSDocs

Co-authored-by: Jimmy Sanford <jimbo@users.noreply.github.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [feature] Use root category id from gql (magento#2902)

* Use storeConfig query to obtain root category id instead of hardcoding.

* Update tests

* Lint

Signed-off-by: sirugh <rugh@adobe.com>

* Set the root category once it resolves

Signed-off-by: sirugh <rugh@adobe.com>

* prettier

Signed-off-by: sirugh <rugh@adobe.com>

* Query for root category id for fallback on cms

* Protect against null id

* fix tests

Signed-off-by: sirugh <rugh@adobe.com>

* Use id in storeConfig query

Signed-off-by: sirugh <rugh@adobe.com>

* magento#2797. Re-factor Edit Product to use Dialog (magento#2824)

* Re-factor Edit Product to use Dialog (magento#2797)

* Re-factor Edit Product to use Dialog - CR fixes

* Fixed QTY update on cart editing

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [PWA-458] Checkout - Sign In View (magento#2889)

* Remove sign-in link from CartPage

* Apply new style and positioning to sign in container

* - Implement view switcher similar to how the account menu works
- Tweak some styles in mobile view

* - Order imports consistently
- Add/remove changes to language file

* - Reset view state when you return to checkout
- Add heading to Create Account form
- Made cancel buttons low priority per UX guidance
- Fixed button layout of Create Account form so it uses rows on mobile
- Move SignIn container above Guest Checkout header on mobile

* Update existing tests

* Cover new component with tests

* Add propTypes to new component

* Make callback optional and remove noop function prop

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Allow self signed certs for backend validation and only attach to scaffold sample (magento#2891)

* Allow self signed certs for backend validation

Signed-off-by: sirugh <rugh@adobe.com>

* remove log

Signed-off-by: sirugh <rugh@adobe.com>

* Only copy the extension to scaffolded apps

Signed-off-by: sirugh <rugh@adobe.com>

* Only include sample backend validator if scaffold selection is sample

Signed-off-by: sirugh <rugh@adobe.com>

* Add lodash as dependency to venia-concept

Signed-off-by: sirugh <rugh@adobe.com>

* update lockfile

Signed-off-by: sirugh <rugh@adobe.com>

* Make createProjectFromVenia async

Signed-off-by: sirugh <rugh@adobe.com>

* Update test

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Wait to render confirmation until details return (magento#2850)

* Add Adobe client data layer (magento#2852)

* Add Adobe client data layer

* Clean up

* Update package description

Co-authored-by: deloreyj <deloreyjmi@gmail.com>

* Move definition to the effect

* Don't parse acdl minified code

* Include react as peerDep

* Bump peregrine peerdep to a caret

* Revert eb59d1c

Revert to tilde. Release script doesn't handle carets well, and this isn't significant.

Co-authored-by: deloreyj <deloreyjmi@gmail.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>
Co-authored-by: Dev Patil <depatil@adobe.com>

* Saved payment methods main view. (magento#2882)

* Enabled saved payments link.

* Added payment skeleton.

* Moved stuff around.

* Snapshot update.

* Added other card types.

* Cleaned up some css.

* Using INTL.

* Minor.

* Minor css change.

* Changed name of payments target to checkoutPagePaymentTypes.

* Added savedPaymentTypes target.

* Updated target docs.

* Minor.

* Hide delete text in mobile view.

* Address PR feedback

* Snapshot updates.

* Updated snapshots.

* Updated tests.

* Added new tests.

* Minor

* Hiding delete button till PWA-638 comes in.

* Added new tests.

* Minor.

* Rendering no payments message.

* Clear CustomerPaymentTokens on signout.

* Rendering fullpageindicator when data is loading.

* Snapshot update.

* Removing unnecessary piece of code.

Co-authored-by: Tommy Wiebell <twiebell@adobe.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* [Doc] Refactor tutorials section (magento#2907)

* Archive css modules topic in tutorials

* Archived Using Component Props topic

* Archive Manage State topic

* Archive Work with GraphQL topic

* Remove links to archived pages in overview topic

* Archive Hello UPWARD tutorials

* Various updates

* Add Next Steps to project structure

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Add props to nav query to render root category links (magento#2911)

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Relative import for local custom loader (magento#2912)

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Delete Address from Address Book (magento#2888)

* Initial delete implementation

* * Binds delete function
* Waits to dismiss overlay
* Cancel button is low priority styled

* * Stabilizes sorting
* Consistent spacing between confirm buttons
* Updates unit tests and snapshots

* Fixes confirmation button spacing for mobile

* Remove max-width on confirmation buttons

* Responsive delete confirm buttons

* Updates unit tests to include new output properties

* Address UX feedback

* Added addressCard tests.

* Added addressBookPage tests.

Co-authored-by: Revanth Kumar <revanth0212@gmail.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Hide links (magento#2918)

* v9.0.0-alpha.1

* v9.0.0-alpha.2

* Order History Page Search (magento#2916)

* Initial work.

* Lil better with loading states.

* Using debounce to fetch order number.

* Re arranging useEffects.

* Updated CSS.

* Order search useEffect logic change.

* Using onCompleted instead.

* Final touchups.

* Minor.

* Addressed UX review.

* Using submit button to search for orders.

* Minor.

* Minor.

* Added orderHistoryPage tests.

* Using fragments.

* Using fuzzy search.

* Added useOrderHistory tests.

* Using single query for order and orders data.

* Fetch all orders if search text is empty.

* Allowing button submit even if the search field is empty to fetch all orders.

* Test update.

* [PWA-887] My Account: Order History - Pagination (magento#2928)

* Working PoC of moving form context to just wrap search inputs

* Add simple pagination logic

* - Fix rendering of reset button
- Add Load More button and wire up to orders query

* Increase page size to UX requirement and remove unnecessary currentPage argument

* Add page info label to top of page

* Cover changes with tests

* - Use token for font size
- Make callback optional and document

* [fix] offline cached search and category pages (magento#2929)

* Moves getPageSize query to talon default operation

Signed-off-by: sirugh <rugh@adobe.com>

* Only show search page error if there is no data.

Signed-off-by: sirugh <rugh@adobe.com>

* Only render errors when error AND no data

Signed-off-by: sirugh <rugh@adobe.com>

* Update tests

Signed-off-by: sirugh <rugh@adobe.com>

* Make sure we only do the page reset if there is no data

Signed-off-by: sirugh <rugh@adobe.com>

* Test page setting effect

Signed-off-by: sirugh <rugh@adobe.com>

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* v9.0.0-beta.1

* [doc] release notes 9.0.0 (magento#2935)

* Clear out old 8.0.0 content

* Add link references

* Add page 1 PR entries

* Add page 2 entries

* Add page 3 entries

* Add page 4 and 5 entries

* Add details to highlights

* Update compatibility table

* Update highlight and known issue

* Update Top Community Contributors

* Update content based on feedback

* Fix capitalization

* Add missing entries

Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>

* Bump hastily dependency (magento#2963)

* v9.0.0-beta.2

* v9.0.0-rc.1

* Add known issue about watcher running out of memory (magento#2977)

* Add known issue about watcher running out of memory

* Add link

* Update note about watcher duration

* v9.0.0

* Remove lodash from create-pwa

* Fix bug

* Extend fix to venia-concept

* Using map instead of set.

Co-authored-by: Tommy Wiebell <twiebell@adobe.com>
Co-authored-by: Stephen <sirugh@users.noreply.github.com>
Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>
Co-authored-by: Sathiya Prakash <50226394+sathiyaaa@users.noreply.github.com>
Co-authored-by: Hiren Patel <hirenpatelmail@gmail.com>
Co-authored-by: Abrar Pathan <abrarkhan@krishtechnolabs.com>
Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com>
Co-authored-by: Andy Terranova <13182778+supernova-at@users.noreply.github.com>
Co-authored-by: Ankur Raiyani <ankurvr7003@gmail.com>
Co-authored-by: Huy Kon <huykon225@gmail.com>
Co-authored-by: Jimmy Sanford <jimbo@users.noreply.github.com>
Co-authored-by: Sergey Kolodyazhnyy <sergey.kolodyazhnyy@gmail.com>
Co-authored-by: sirugh <rugh@adobe.com>
Co-authored-by: James Zetlen <jzetlen@adobe.com>
Co-authored-by: Oleksandr Miroshnichenko <miroshni@adobe.com>
Co-authored-by: Papilion Dániel <papiliond.94@gmail.com>
Co-authored-by: Kristof, Fooman <kristof@fooman.co.nz>
Co-authored-by: Marcin Kwiatkowski <contact@frodigo.com>
Co-authored-by: deloreyj <deloreyjmi@gmail.com>
Co-authored-by: Dev Patil <depatil@adobe.com>
Co-authored-by: devops-pwa-codebuild <magento-devops-github-pwa-int@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:peregrine pkg:venia-ui Progress: done version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants