Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

[instant] Dismissible overlay for mobile errors #1229

Merged
merged 34 commits into from
Nov 9, 2018

Conversation

steveklebanoff
Copy link
Contributor

@steveklebanoff steveklebanoff commented Nov 8, 2018

Description

Shows a dark overlay over the widget when an error occurs in mobile. Upon clicking the overlay, the error is dismissed.

⚠️ Should squash & merge since there are a lot of experimental commits here ⚠️

dismissibleerrorgif

Testing instructions

Types of changes

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Prefix PR title with bracketed package name(s) corresponding to the changed package(s). For example: [sol-cov] Fixed bug.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@coveralls
Copy link

coveralls commented Nov 8, 2018

Coverage Status

Coverage remained the same at 84.721% when pulling 38ed866 on feature/instant/dismissable-mobile-errors into 9e17fca on feature/instant/viewport-specific-errors.

@steveklebanoff
Copy link
Contributor Author

Updated w/ development and ready for review

Copy link
Contributor

@fragosti fragosti left a comment

Choose a reason for hiding this comment

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

Is it a bit too much to have a LatestErrorOverlay? It can't just be part of LatestError?

Also this whole experience feels kind of off to me but that's more of UX / design feedback

import { DisplayStatus } from '../types';
import { errorFlasher } from '../util/error_flasher';

type ConnectedState = Pick<OverlayContainerProps, 'showOverlay' | 'showMaxWidth'>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, I think we could benefit from adopting this pattern for all of our containers. Would help reduce work when interfaces change.

<SelectedAssetBuyOrderStateButtons />
</Container>
</Flex>
<LatestErrorOverlay>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can it just be a sibling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks for calling this out. This hierarchy was a relic of when the overlay was implemented with an :after css selector

@steveklebanoff
Copy link
Contributor Author

@fragosti thanks for the callout about this being able to be done all in LatestError -- a lot of this design originated from the first pass which was before the more generic Overlay, and was based on an :after css effect. I've updated this to just be handled in LatestError and the code feels a lot cleaner now 🎉

I think this overlay would benefit from a fade-in/fade-out, and it looks like that is the way Chris designed it in his mockup, but I would like to get this in as-is, and add the transition as a follow up step

@steveklebanoff steveklebanoff merged commit 2c585bf into development Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants