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

Add boundary for connection #83

Merged
merged 4 commits into from
Nov 25, 2019
Merged

Add boundary for connection #83

merged 4 commits into from
Nov 25, 2019

Conversation

andyrichardson
Copy link
Collaborator

@andyrichardson andyrichardson commented Nov 25, 2019

Changes

  • On client disconnect / page refresh, context is cleared
  • Message is shown to user when no connection to client (Fix Add message when client connection doesn't exist #52)
  • Fetching state is shown to user in request panel
  • Intermediary states in request panel are no longer possible

Screenshots

Screenshot 2019-11-25 at 13 20 22

<Container>
<Logo alt={"Urql Eagle"} src={image} />
<Header>Waiting for exchange</Header>
<Hint>Make sure {"you're"} using the Urql Devtools exchange!</Hint>
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be nice to add the link to the exchange here!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a good shout!

I'm going to leave it out for now just because I want to avoid giving the user the impression that interaction is required on this page (for most, it's only going to be present for a second or so).

Maybe this is something we can look into though!

<>
<GlobalStyle />
<Container>
<Logo alt={"Urql Eagle"} src={image} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a tiny nit but this doesn't really need an alt since it's not really giving any information/context to a screen reader user

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Gotta disagree with this one. Regardless of whether the image is important or not, it's valuable to the user to know what they're looking at.

Copy link
Contributor

Choose a reason for hiding this comment

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

In general logos like these are considered decorative and are usually supplied an empty alt text so the screen reader will know to skip it.

https://www.w3.org/WAI/tutorials/images/decorative/

Copy link
Contributor

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

This looks so nice, good work Andy. Left some nits but they don't really block the merge so will leave my approve already! Good work 💯

);
};

export const AppRoutes: FC = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally prefer having one component in one file, don't know how you perceive this. (more to spark a conversation about this)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I personally prefer having one component in one file

For the most part we've been taking this approach.

In this case I'm not sure there's much value in breaking it down into separate files - there's only two components and they would be (and were) one if it wasn't for the use of context/hooks.

src/panel/context/Request.tsx Show resolved Hide resolved
@andyrichardson andyrichardson merged commit 3ae9cef into master Nov 25, 2019
@andyrichardson andyrichardson deleted the fix-request-panel branch November 25, 2019 16:06
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.

Add message when client connection doesn't exist
3 participants