GithubHelp home page GithubHelp logo

Comments (9)

 avatar commented on July 17, 2024

I'm torn on this. On the one hand, I like how clean Andrew's session code is; very elegant. On the other hand, the usability perspective, I like showing the user that they are going to be redirected. Because we already frustrated the user by redirecting them to the log in page instead of where they were trying to go, so by showing the destination in the URL we can let the user know that they will redirected to where they had wanted to go, which seems respectful.

https://www.twilio.com/login?g=%2Fuser%2Faccount
https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faccount%2Fprofile
https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Fsettings

from confide.

andrew13 avatar andrew13 commented on July 17, 2024

Personally, I like the clean look and feel like a majority of people do not pay attention to the query string anyway. What they care about is logging in and then being redirected to where they were going. So lets make the redirect a little magical and handle it all behind the scenes.

from confide.

 avatar commented on July 17, 2024

It's a debate worth having. I think the example URLs provide useful info, which as a user, lessens the frustration of being redirected to the login page instead of where I wanted to go. I don't think it's an accident that the big players chose to go that way. There is a real usability benefit to doing so.

I'm all for clean URL's, but I don't think removing potentially useful information is necessarily a good trade off. (Speaking of clean URLs... ;), do you guys think that maybe Confide should default to /login and /signup, instead of /user/login and /user/create?)

p.s. @andrew13 I wish Github still had messaging... I've been playing with LaravelBootstrapStarter, it looks pretty cool. I have a view composer, unit tests for it, and basic master.blade.php that I'm going to post soon. The view composer handles logic used by the master template such as automatically setting the HTML language direction based on the current language, passing a page title and setting a default if unspecified, passing a meta description, meta robots, etc.

from confide.

andrew13 avatar andrew13 commented on July 17, 2024

@j20 I certainly get the idea that keeping the url param there may reduce the frustration that a user might feel. However, I would argue that frustration would be better negated by messaging on the login page itself. Relying on the user to look at the url to confirm that the redirect is going to happen is bad UX in my opinion.

I look forward to seeing a pull request coming my way. I was just getting around to setting up unit tests for it, so if you save me from doing so, that would be great.

Also if you have twitter follow and DM @andrewelkins

@Zizaco I would second the notion that /user/login and /user/signup would be better verbiage for those two actions.

from confide.

Zizaco avatar Zizaco commented on July 17, 2024

Both of you have solid arguments. But don't forget that this would be simply the "default" behavior from the generated controller code. The developer will be able to easily change it.

I will implement the redirection using sessions, to make it cleaner. But @j20, remember that you can customize this with ease.

from confide.

Zizaco avatar Zizaco commented on July 17, 2024

About the routes login & signup routes. I would say that the objective of the generated routes are to be kind of an informative template.
The user will (and should) replace the user/create by join/us,signup,create_account or anything else. I don't believe we have to care much about this.

from confide.

 avatar commented on July 17, 2024

Okay. Sounds good.

I don't have Twitter. But I just followed you guys on Github.

If you're indifferent to the route names, I highly recommend /login, /signup, and /logout as the defaults. One less thing to change out of the box. I promise I won't mention it again though. ;) lol

@andrew13, The unit tests are for my View Composer. Not for the starter package. ;) That'd be a lot of work. When I get the view composer posted, I'll give you a heads up (I guess by opening an issue, since Github killed their messaging feature). If it looks intriguing you're welcome to use it or integrate anything from it.

from confide.

andrew13 avatar andrew13 commented on July 17, 2024

@j20 Sounds good. Off I go to write the test cases that I should have started with :)

@Zizaco At the routes, changing them now would be a bit of a change for devs that are already using it. Further, if a developer wants to change it is fairly simple to do. They would need to maintain the post routes (where the form posts to), but changing the get routes is trivial. On intuitiveness, I'd agree with @j20 though. Signup / register / join are more likely to match a developers implementation then create.

from confide.

Zizaco avatar Zizaco commented on July 17, 2024

Done: 938fbba

I just followed both of you.

About routes, I agree with you, but user/create are more informative and didatic for a newcomer (first time using Confide). I don't worry much if 100% of the users would change it to signup or anything else. This kind of tweak is not a bad thing, I guess.

from confide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.