realm / realm-browser-osx

DEPRECATED - Realm Browser for Mac OS X has been replaced by realm-studio which is cross platform.
https://realm.io
502 stars 54 forks source link

Improve usability and feedback of server URL entry #269

Closed AndyDentFree closed 7 years ago

AndyDentFree commented 7 years ago

The Server URL field currently has a faint grey placeholder realm:// but if you quickly type into that field it vanishes and there is no longer any prompt to remind you that protocol must be used.

There is no error message if you enter a different protocol such as http - just the Connect button failing to be enabled.

As we have a default port 9080 used too, it makes sense to allow a simple IP address to be entered and then display that defaulted port as the user tabs out of the field.

Relying on placeholder text for important form information is highly discouraged, for example in this article.

einsteinx2 commented 7 years ago

+1

I just wasted 10 minutes or so figuring this out today. Also if you try to connect directly to one of the other non-proxy ports it either crashes the app or just closes the window. First I had to figure out to type realm:// (which should be implied when nothing is entered, as well as you mentioned there's no error message for using http:// which I did), then I had to figure out to use the 9080 port after trying the other 2 and no port.

einsteinx2 commented 7 years ago

Also worth noting that when reading the docs for the Object Server and seeing the usage of http to connect, I'm not quite sure why the Realm Browser even requires the use of realm:// anyway. I certainly would assume, based on the documentation, that http would be perfectly valid.

let serverURL = URL(string: "http://my.realmServer.com:9080")!

Then actually, browsing slightly further down that same page, I see the following:

// Create the configuration let syncServerURL = URL(string: "realm://localhost:9080/~/userRealm")! let config = Realm.Configuration(syncConfiguration: SyncConfiguration(user: user, realmURL: syncServerURL))

Both of these examples are in the same Sync section of the Recipes section in the docs. Confusing for a new user to say the least.

einsteinx2 commented 7 years ago

Actually the issue I had earlier was connecting using the "Connect to Object Server" option, which I finally got to work.

For the life of me, I cannot get the Open button to enable when using the "Open Sync URL..." option. I have my correct realm:// url, and the correct username and password the works in my app, but I just can't get the Open button to enable. I've tried all kinds of other random things like using an email in the username field, trying various urls, etc, and nothing I do gets it to enable when using the Username option.

Edit: So I built from source to use the debugger to see what was going on, and it turns out the problem was I didn't add the realm path to the end. Definitely having the Open/Connect buttons always clickable and then having it tell you what you're doing wrong would be infinitely more useful than the current behavior. Then on top of that, I'm getting an invalid credentials error trying to actually connect even though the credentials are correct, but that's something for another issue.