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: add updated error UI + custom error rendering #705

Merged
merged 10 commits into from
Jun 5, 2024
Merged

Conversation

tinaszheng
Copy link
Contributor

@tinaszheng tinaszheng commented Jun 4, 2024

This PR updates the error rendering to the new design where it's above the card + also adds an external hook, useError, that allows consumers to customize their own error handling logic.

Custom error Default error
image image

Pull Request Checklist


PR-Codex overview

The focus of this PR is to enhance the authentication and error handling experience in the Alchemy application.

Detailed summary

  • Added new background color variants for success, warning, and error.
  • Updated error handling in authentication components.
  • Improved error display in the authentication flow.
  • Introduced a Notification component for displaying different types of notifications.
  • Refactored context and hooks for better error handling and authentication flow.

The following files were skipped due to too many changes: packages/alchemy/src/react/context.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jun 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:55pm

@tinaszheng tinaszheng changed the title feat: add error boundary by id [wip] feat: add updated error UI + custom error rendering Jun 4, 2024
moldy530
moldy530 previously approved these changes Jun 4, 2024
Copy link
Collaborator

@moldy530 moldy530 left a comment

Choose a reason for hiding this comment

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

LGTM had one nit

*
* @returns the current Error object
*/
export function useError(): UseErrorResult {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: maybe useAuthError?

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 call

@tinaszheng tinaszheng merged commit 0b23625 into main Jun 5, 2024
5 checks passed
@tinaszheng tinaszheng deleted the tina/errors branch June 5, 2024 15:56
Dan-Nolan pushed a commit that referenced this pull request Jun 6, 2024
* feat: add error boundary by id

* fix: remove unused classnames

* feat: use error from hook

* fix: remove unused variables

* fix: remove console log

* fix: add new colors to test

* feat: rename to useAuthError
moldy530 added a commit that referenced this pull request Jun 6, 2024
* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: adds streamlined quick start

* docs: drops the file extension on local quick start links

* docs: fix relative routes across quick start

* feat: run store hydration on window focus (#695)

* run store hydration on window focus

* remove logs

* feat: update button colors (#696)

* feat: update button colors

* fix: update test

* fix: plugins were missing mainnet config (#692)

* fix: account hydration was missing state (#693)

* chore: enable version syncing when publishing (#694)

* chore(release): publish v3.18.0 [skip-ci]

* fix: fix paymaster override for multisig plugin (#676)

* fix: allow nonzero paymaster override

* refactor: update to use Hex type for paymasterAndData/paymasterData override

* fix: add checks for paymasterData and paymaster field nonzero overrides

* fix: add paymaster address override type

* feat: gas manager only bypasses paymaster middleware when the UserOp paying for its own gas

* fix: add signatures and overrides to fix 3/3 msig test and add paymaster test

* chore: rename button "type" to "variant"  (#699)

* feat: switch type => variant and use type submit

* fix: add custom focus state

* fix: update the version of the store so that we don't have clashes (#703)

* chore(release): publish v3.18.1 [skip-ci]

* chore(release): publish v3.18.2 [skip-ci]

* feat: add updated error UI + custom error rendering  (#705)

* feat: add error boundary by id

* fix: remove unused classnames

* feat: use error from hook

* fix: remove unused variables

* fix: remove console log

* fix: add new colors to test

* feat: rename to useAuthError

* docs: add vercel json (#700)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json

* docs: add build script

* docs: add rewrites for .html`

* docs: try cleanUrls

* docs: remove rewrites

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>

* chore: remove the docs publishing github action

* docs: run locally meets dashboard quickstart

* chore: update the gh actions to checkout submodules

* chore: add embedded accounts submodule

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: Zer0dot <zer0dot.dev@gmail.com>
Co-authored-by: Cody McCabe <cmccabe524@gmail.com>
moldy530 added a commit that referenced this pull request Jun 6, 2024
* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: adds streamlined quick start

* docs: drops the file extension on local quick start links

* docs: fix relative routes across quick start

* feat: run store hydration on window focus (#695)

* run store hydration on window focus

* remove logs

* feat: update button colors (#696)

* feat: update button colors

* fix: update test

* fix: plugins were missing mainnet config (#692)

* fix: account hydration was missing state (#693)

* chore: enable version syncing when publishing (#694)

* chore(release): publish v3.18.0 [skip-ci]

* fix: fix paymaster override for multisig plugin (#676)

* fix: allow nonzero paymaster override

* refactor: update to use Hex type for paymasterAndData/paymasterData override

* fix: add checks for paymasterData and paymaster field nonzero overrides

* fix: add paymaster address override type

* feat: gas manager only bypasses paymaster middleware when the UserOp paying for its own gas

* fix: add signatures and overrides to fix 3/3 msig test and add paymaster test

* chore: rename button "type" to "variant"  (#699)

* feat: switch type => variant and use type submit

* fix: add custom focus state

* fix: update the version of the store so that we don't have clashes (#703)

* chore(release): publish v3.18.1 [skip-ci]

* chore(release): publish v3.18.2 [skip-ci]

* feat: add updated error UI + custom error rendering  (#705)

* feat: add error boundary by id

* fix: remove unused classnames

* feat: use error from hook

* fix: remove unused variables

* fix: remove console log

* fix: add new colors to test

* feat: rename to useAuthError

* docs: add vercel json (#700)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json

* docs: add build script

* docs: add rewrites for .html`

* docs: try cleanUrls

* docs: remove rewrites

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>

* chore: remove the docs publishing github action

* docs: run locally meets dashboard quickstart

* chore: update the gh actions to checkout submodules

* chore: add embedded accounts submodule

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: Zer0dot <zer0dot.dev@gmail.com>
Co-authored-by: Cody McCabe <cmccabe524@gmail.com>
moldy530 added a commit that referenced this pull request Jun 13, 2024
* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: adds streamlined quick start

* docs: drops the file extension on local quick start links

* docs: fix relative routes across quick start

* feat: run store hydration on window focus (#695)

* run store hydration on window focus

* remove logs

* feat: update button colors (#696)

* feat: update button colors

* fix: update test

* fix: plugins were missing mainnet config (#692)

* fix: account hydration was missing state (#693)

* chore: enable version syncing when publishing (#694)

* chore(release): publish v3.18.0 [skip-ci]

* fix: fix paymaster override for multisig plugin (#676)

* fix: allow nonzero paymaster override

* refactor: update to use Hex type for paymasterAndData/paymasterData override

* fix: add checks for paymasterData and paymaster field nonzero overrides

* fix: add paymaster address override type

* feat: gas manager only bypasses paymaster middleware when the UserOp paying for its own gas

* fix: add signatures and overrides to fix 3/3 msig test and add paymaster test

* chore: rename button "type" to "variant"  (#699)

* feat: switch type => variant and use type submit

* fix: add custom focus state

* fix: update the version of the store so that we don't have clashes (#703)

* chore(release): publish v3.18.1 [skip-ci]

* chore(release): publish v3.18.2 [skip-ci]

* feat: add updated error UI + custom error rendering  (#705)

* feat: add error boundary by id

* fix: remove unused classnames

* feat: use error from hook

* fix: remove unused variables

* fix: remove console log

* fix: add new colors to test

* feat: rename to useAuthError

* docs: add vercel json (#700)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json

* docs: add build script

* docs: add rewrites for .html`

* docs: try cleanUrls

* docs: remove rewrites

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>

* chore: remove the docs publishing github action

* docs: run locally meets dashboard quickstart

* chore: update the gh actions to checkout submodules

* chore: add embedded accounts submodule

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: Zer0dot <zer0dot.dev@gmail.com>
Co-authored-by: Cody McCabe <cmccabe524@gmail.com>
moldy530 added a commit that referenced this pull request Jun 13, 2024
* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json (#700)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json

* docs: add build script

* docs: add rewrites for .html`

* docs: try cleanUrls

* docs: remove rewrites

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>

* chore: remove the docs publishing github action

* docs: adds streamlined quick start (#697)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: adds streamlined quick start

* docs: drops the file extension on local quick start links

* docs: fix relative routes across quick start

* feat: run store hydration on window focus (#695)

* run store hydration on window focus

* remove logs

* feat: update button colors (#696)

* feat: update button colors

* fix: update test

* fix: plugins were missing mainnet config (#692)

* fix: account hydration was missing state (#693)

* chore: enable version syncing when publishing (#694)

* chore(release): publish v3.18.0 [skip-ci]

* fix: fix paymaster override for multisig plugin (#676)

* fix: allow nonzero paymaster override

* refactor: update to use Hex type for paymasterAndData/paymasterData override

* fix: add checks for paymasterData and paymaster field nonzero overrides

* fix: add paymaster address override type

* feat: gas manager only bypasses paymaster middleware when the UserOp paying for its own gas

* fix: add signatures and overrides to fix 3/3 msig test and add paymaster test

* chore: rename button "type" to "variant"  (#699)

* feat: switch type => variant and use type submit

* fix: add custom focus state

* fix: update the version of the store so that we don't have clashes (#703)

* chore(release): publish v3.18.1 [skip-ci]

* chore(release): publish v3.18.2 [skip-ci]

* feat: add updated error UI + custom error rendering  (#705)

* feat: add error boundary by id

* fix: remove unused classnames

* feat: use error from hook

* fix: remove unused variables

* fix: remove console log

* fix: add new colors to test

* feat: rename to useAuthError

* docs: add vercel json (#700)

* docs: revert revert to use vocs for docs

* docs: address some of the broken things on the site (#689)

* docs: update the logos for AK

* docs: add vercel json

* docs: add build script

* docs: add rewrites for .html`

* docs: try cleanUrls

* docs: remove rewrites

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>

* chore: remove the docs publishing github action

* docs: run locally meets dashboard quickstart

* chore: update the gh actions to checkout submodules

* chore: add embedded accounts submodule

---------

Co-authored-by: moldy <michael.moldoveanu@alchemy.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: Zer0dot <zer0dot.dev@gmail.com>
Co-authored-by: Cody McCabe <cmccabe524@gmail.com>

---------

Co-authored-by: Cody McCabe <cmccabe524@gmail.com>
Co-authored-by: Dan Nolan <dan.nolan@alchemy.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: Zer0dot <zer0dot.dev@gmail.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.

2 participants