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

Show discovery errors in modal instead of tooltip (fixes #2344) #4048

Closed
wants to merge 5 commits into from

Conversation

sacheendra
Copy link
Contributor

Purpose

Previously, the errors relating to discovery were displayed in a tooltip as mentioned in #2344. Apart from being ugly, the errors were could not be copied.

This replaces the tooltip with a modal. Text is added to the tooltip to inform the user that clicking the text will show the errors. The errors are displayed as an unordered list inside the modal.

Questions: Are the title text and tooltip text ok? Is the red colour with the danger icon appropriate for the modal?

Testing

Tested with different viewport sizes by changing the dimensions of the chrome viewport. Checked if the text in the modal can be copied.

Screenshots

screen shot 2017-03-19 at 10 42 13 pm

*The new tooltip*

screen shot 2017-03-19 at 10 42 22 pm

*The discovery errors modal*

@AudriusButkevicius
Copy link
Member

Great addition, thanks.

What's the rationale for changing the text colors? I think having it red/green/etc was fine?

Also, I wonder if we should change the format of the errors so that they describe better which address is failing etc, so we could have a table or some more structured representation in the UI.

@canton7
Copy link
Member

canton7 commented Mar 19, 2017

Nit: Can we call them "failures" or something, rather than "errors"? Not being able to do IPv6 discovery because you don't have an IPv6 connection is not an error, and it's not something the user can fix.

@sacheendra
Copy link
Contributor Author

@canton7 Calling them failures would be better. But, the only way to know wether they are failures or errors would be to do a string match on the errors which doesn't seem very robust. If there is a better way, I can implement that.

@AudriusButkevicius The red and green should still work as intended. Green when all connections are successful and red when none are. The colour change is for the case when some succeed. As I made it into a link, the text would have the light blue colour used for links. I set the colour to black to retain the same look as before.
screen shot 2017-03-19 at 11 44 30 pm
This just looked odd.

@sacheendra
Copy link
Contributor Author

Maybe it is unrelated, but turning my internet off to test wether it goes to red was not possible. When I turned my internet off, it still showed that 1 discovery server was reachable. How is that possible?

@AudriusButkevicius
Copy link
Member

Local discovery happens locally.
Global discovery happens once every X minutes.

@canton7
Copy link
Member

canton7 commented Mar 19, 2017

Depends on what you mean by turning your Internet off. If you were still connected to a network, Syncthing will have done local discovery. If you disconnected from all networks / disabled the network device, no idea...

@sacheendra
Copy link
Contributor Author

I'm not connected to any network. But local discovery was still working I guess. I can produce the case where there are no discovery servers by disabling local discovery in the settings and also disconnecting from the network.

@calmh
Copy link
Member

calmh commented Mar 19, 2017 via email

@sacheendra
Copy link
Contributor Author

The colour for the text is now inherited from the parent instead of being statically set.

@AudriusButkevicius
Copy link
Member

So the errors -> failures would still be nice.

@AudriusButkevicius
Copy link
Member

What does the colors look like now?

@sacheendra
Copy link
Contributor Author

screen shot 2017-03-20 at 12 13 59 am

Red coloured text when all discovery fails.

screen shot 2017-03-20 at 12 14 30 am

Green coloured text when all discovery succeeds.

screen shot 2017-03-20 at 12 18 12 am

Black when there are a few failures.

@sacheendra
Copy link
Contributor Author

@calmh Weirdly, https://example.com actually causes discovery to succeed. But https://foobar.com causes it to fail as expected.

@sacheendra
Copy link
Contributor Author

Testing

screen shot 2017-03-20 at 12 29 42 am

screen shot 2017-03-20 at 12 29 45 am

Notice the text "failures".

@canton7
Copy link
Member

canton7 commented Mar 19, 2017

(Just to make sure: the suggestion isn't to display "errors" or "failures" depending in the content if the dialog. It is to just use the word "failures" (or something else if someone has a better suggestion) instead of "errors")

@canton7
Copy link
Member

canton7 commented Mar 19, 2017

... And great job putting this together. I've been annoyed by that tooltip as well, but too lazy to do anything about it...

@AudriusButkevicius
Copy link
Member

AudriusButkevicius commented Mar 19, 2017

Also, we could add a note at the modal saying that IPv6 failures if you do not IPv6 connectivity is expected etc.

@sacheendra
Copy link
Contributor Author

Testing

screen shot 2017-03-20 at 1 00 38 am

Notice reagrding IPv6 failures.

This doesn't have translations though. Not sure how to add them.

@calmh
Copy link
Member

calmh commented Mar 20, 2017 via email

@calmh
Copy link
Member

calmh commented Mar 20, 2017 via email

@sacheendra
Copy link
Contributor Author

Testing

This is how the info. looks like now.
screen shot 2017-03-20 at 1 32 46 pm

@calmh
Copy link
Member

calmh commented Mar 20, 2017

@st-review lgtm (commit message will need to be tweaked)

@st-review
Copy link

@calmh: Noted! Need another LGTM or explicit merge command.

@AudriusButkevicius
Copy link
Member

@st-review lgtm

gui: Move discovery failures to modal (fixes #2344)

@st-review
Copy link

👌 Merged as ee92ee0. Thanks, @sacheendra!

@AudriusButkevicius
Copy link
Member

Ghrr wrong button

@st-review st-review closed this Mar 20, 2017
st-review pushed a commit that referenced this pull request Mar 20, 2017
GitHub-Pull-Request: #4048
LGTM: calmh, AudriusButkevicius
@st-review st-review added the pr-merged Legacy label used in the past for pull requests merged to the main tree label Jan 15, 2018
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jul 15, 2018
@syncthing syncthing locked and limited conversation to collaborators Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion pr-merged Legacy label used in the past for pull requests merged to the main tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants