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

My Courses logged out state #2538

Closed
jonathanbossenger opened this issue Jun 14, 2024 · 18 comments · Fixed by #2592
Closed

My Courses logged out state #2538

jonathanbossenger opened this issue Jun 14, 2024 · 18 comments · Fixed by #2592
Assignees
Labels
Dev [Type] Bug Something isn't working on the Learn website.

Comments

@jonathanbossenger
Copy link
Collaborator

When attempting to log in after taking a course, the default Sensei login form is broken on mobile.

  1. Make sure you’re logged out
  2. Go to https://learn.wordpress.org/course/beginner-wordpress-user/
  3. Click on Take Course

You are redirected to the My Courses page at this URL: https://learn.wordpress.org/my-courses/ which renders the Sensei login form.

However, the form is broken on mobile:

learn wordpress org_my-courses__redirect_to=https___learn wordpress org_lesson_planning-content-for-success_

It's possible this used to take you to a WordPress.org login page, but I can't verify this.

It appears that the reason this is currently happening is that the Sensei /includes/class-sensei-frontend.php file wraps the login form inside a div with the class attribute of col-1, which we define in our stylesheet as having a width of 8.3333333333%.

I'm unaware of any recent changes to Learn that might have caused this, so it might be a .org-related or Sensei-related issue.

@jonathanbossenger jonathanbossenger added the Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. label Jun 14, 2024
@jonathanbossenger
Copy link
Collaborator Author

@adamwoodnz or @renintw, could someone please look into this on Monday? Thanks.

@adamwoodnz adamwoodnz self-assigned this Jun 16, 2024
@adamwoodnz adamwoodnz added Dev [Type] Bug Something isn't working on the Learn website. and removed Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. labels Jun 16, 2024
@dd32
Copy link
Member

dd32 commented Jun 17, 2024

Just noting that after noticing this ticket, I've removed the Login & Registration functionality from the My Courses page.

I've replaced these forms with a button to the login page, and most login links on Learn should direct straight to the login form rather than to the My Courses page.

The reason was two fold:

  1. While login was respecting 2FA, it wasn't respecting some other custom functionality we have for logins
  2. The registration form was bypassing the anti-spam functionality we have on the registrations, and user emails were not being validated.

This does mean that the signup process for learn now has a bit more friction in the process, there may be some issues around account creation, if you hear about any of that, let me know in #forums in slack so we can figure out a way forward with that.

The page when logged out is a lot more minimal now, and probably needs some descriptive text added to the page when logged out. That can be worked on with the new Theme I guess.

FYI @jonathanbossenger @bsanevans @adamwoodnz

@jonathanbossenger
Copy link
Collaborator Author

I think this is ok for now, as we're in the middle of the new theme development anyway.

@adamwoodnz I'm not sure if this is something that has been handled in the new theme, but it would probably be ideal if logged-out users were directed straight to the default WordPress login form instead of to the My Courses page first.

@adamwoodnz
Copy link
Contributor

I believe @dd32 had a lot of trouble trying to modify this flow so I'm not sure that will be possible, but I'm planning to work on My Courses this week so we'll explore further.

@adamwoodnz adamwoodnz added this to the Learning Pathways launch milestone Jun 18, 2024
@adamwoodnz adamwoodnz reopened this Jun 18, 2024
@adamwoodnz
Copy link
Contributor

adamwoodnz commented Jun 25, 2024

Current state:

Existing theme New theme
Image Image

Needs copy and styling, or if we can direct to login.wordpress.org and back to My Courses without even displaying this screen that might be better, although it could be a strange experience clicking the navigation item and being taken away.

@adamwoodnz adamwoodnz changed the title Feedback - Course login breaks on mobile. Jun 25, 2024
@dd32
Copy link
Member

dd32 commented Jun 26, 2024

but it would probably be ideal if logged-out users were directed straight to the default WordPress login form instead of to the My Courses page first.

I agree.

I modified the page through an mu-plugin temporarily, that mu-plugin can be open-sourced/migrated into the learn repo quite possibly, but I didn't really have a great time modifying the pages and I was slightly concerned about whether my code could be bypassed.
The main reason for the change was that the Registration form here bypassed all our anti-spam and email-verification logic, and the login didn't respect our SSO flows.

I did originally have links not directing to My Courses, sensei even has a filter for it, but I disabled it with this remark:

/**
 * Disable the Sensei user register page, use the WordPress registration page.
 *
 * DO NOT ENABLE.
 * This causes the 'Take Course' links to direct to the Registration form, rather than a login page.
 * Very poor UX. This is why we don't filter the registration links.
 */
// add_filter( 'sensei_use_wp_register_link', '__return_true' );

If the audience is purely logged in users it's fine, but for logged out users just being dumped on the registration page upon clicking "Start Course" or "Take Course" or whatever it was felt very very weird.

One option to resolve that might be to force Sensei to go to the login form rather than the registration form, and alter login.w.org to have a nicer message for users from learn, for example, for WordCamp-login-requests we explain w.org and wc.org are one and the same: https://login.wordpress.org/?from=wordcamp.org
Happy to add some text there if some text can be suggested.

@kathrynwp
Copy link

Happy to add some text there if some text can be suggested.

Looping in @thetinyl for input on copy.

Here is the text I think @dd32 is referring to that's used elsewhere, which could be used as a base:

WordCamp is part of WordPress.org
Log in to your WordPress.org account to contribute to WordCamps and meetups around the globe.

Screenshot:

WordPress_org_Login___WordPress_org_English_—_Private_Browsing
@adamwoodnz adamwoodnz removed their assignment Jun 27, 2024
@thetinyl
Copy link

I think I'm following. Could use some extra clarification though:

In the Learn user journey, are most of the roads leading to this login going to be from prospective/current learners trying to take a course, see their course page, or view a lesson?

Digging through the test site, this appears to be the case.

@kathrynwp
Copy link

kathrynwp commented Jun 27, 2024

I think so but in terms of "view a lesson" I think that some lessons are still viewable without having registered for the specific course they're part of.

I'll let others clarify further!

@adamwoodnz adamwoodnz self-assigned this Jul 2, 2024
@adamwoodnz
Copy link
Contributor

In the Learn user journey, are most of the roads leading to this login going to be from prospective/current learners trying to take a course, see their course page, or view a lesson?

👍 Correct

@adamwoodnz
Copy link
Contributor

adamwoodnz commented Jul 2, 2024

I've created a PR to do the redirect to login when accessing the My Courses page: #2592

@dd32 please take a look, maybe we can remove some of the mu-plugin code.

I've added a note that we shouldn't merge until the login page copy is in place.

I'm hopeful we can show the copy in the next comment if the redirect_to includes learn.wordpress.org, but if I need to add the from parameter too let me know.

@thetinyl
Copy link

thetinyl commented Jul 2, 2024

@kathrynwp @jonathanbossenger This may not cover all the specific use cases for Learn logins (I purposely left out mention of contribution), but here's a suggestion to start:

Access all of Learn WordPress
Log in to your WordPress.org account to take or continue a course and track your progress.

bazza pushed a commit to WordPress/wordpress.org that referenced this issue Jul 8, 2024
…the login request came from that domain.

See WordPress/Learn#2538


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@13883 74240141-8908-4e6f-9713-ba540dce6ec7
@kathrynwp
Copy link

That looks good to me, but I'd also love to hear what @jonathanbossenger and @westnz think.

@westnz
Copy link
Collaborator

westnz commented Jul 8, 2024

Perfect

@jonathanbossenger
Copy link
Collaborator Author

Yup, that makes sense.

I'd consider adding something about how to create an account if you don't already have one, but I realise that's going to make the text quite a bit longer.

@thetinyl
Copy link

thetinyl commented Jul 9, 2024

how to create an account if you don't already have one

@jonathanbossenger That's a fair point. A quick way could be just to adjust the earlier proposed:

Create or log in to a WordPress.org account to take or continue a course and track your progress.

Ideally, we could make that 'Create an account' link more contextually relevant (basically move it up). Then we could do something like:

Log in to your WordPress.org account to take or continue a course and track your progress.
Don’t have one? Create a new account

@adamwoodnz
Copy link
Contributor

We've shipped the initial copy to improve the experience on the current site, so the current state is:

Ideally, we could make that 'Create an account' link more contextually relevant (basically move it up). Then we could do something like:

Log in to your WordPress.org account to take or continue a course and track your progress.
Don’t have one? Create a new account

Given this is the login form used across all of WordPress.org I'm not sure how much scope we have for changing things. I imagine removing the lower 'Create account' link and thereby introducing an inconsistent experience isn't feasible.

I feel like this login form is due a refresh in general; new logo, better copy all round.

@jonathanbossenger
Copy link
Collaborator Author

I feel like this login form is due a refresh in general; new logo, better copy all round.

100%, my comment was a general observation on the login form, not something I feel we can (or should) do now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev [Type] Bug Something isn't working on the Learn website.
6 participants