apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
68 stars 73 forks source link

Fix the order and arrangement of elements in the profile page #590

Closed mtthwhggns closed 4 years ago

mtthwhggns commented 4 years ago

Currently, the profile page looks like this:

Screenshot of profile page

The current issues are:

Other possible considerations:

Related: https://apluslms.github.io/accessibility-audit/patterns/fixable-a/semantic-markup-and-sequences/

raphendyr commented 4 years ago

Are the avatars used anywhere?

To my knowledge: no. I think there were a placeholder. It's possible some group stuff used those too.

LTI protocol includes a field user_image, which can include an url to a "profile picture". Though, that field is not provided by the A+ yet. I had an idea that for pseudonymised user info, we could generate these images our self and provide link for those. Nevertheless, using gravatar is kind of not so nice...

markkuriekkinen commented 4 years ago

I think the avatars are used in student groups. A student can see the avatars of his/her group members in the group selection. The student's "create a group" page also shows them.

markkuriekkinen commented 4 years ago

We should decide if we want to remove the old avatar feature completely. We don't like the dependency on gravatar.com and the avatars are not used much in the system.

The other issues in the profile page are straightforward to fix. The layout of the whole page can be changed so that the DOM elements are also defined in the right order.

mtthwhggns commented 4 years ago

I'd vote for remove the Gravatars and anywhere they appear.

Later, if we find it would be useful (maybe if we get more collaborative features), we can implement our own/explore getting one when the user authenticates (for example, logging in with Google could use the Google Account avatar).

Let's give everyone a day or so to add their comments here if they have any feelings, then maybe it's time for a final decision.

In the meantime, I'm part way through a mockup of an alternative layout for the profile page, which I'll share soon.

mtthwhggns commented 4 years ago

I'd suggest we stick with the dl, but tweaking the layout so that on desktop it stretches horizontally, and stacks up like it is now on mobile.

Separate sections show what comes from elsewhere and can't be changed (with a heading including the name of the identity provider), and which things are configurable/otherwise usable.

Mobile: iPhone XR-XS Max-11 – 1

Desktop: Web 1280 – 1

I've also tried to simplify some of the complex wording here, but none of this should be considered a serious suggestion yet - more work is definitely needed.

Things to check:

markkuriekkinen commented 4 years ago

@mtthwhggns that looks good. What will happen from the language change button? Is there a separate form or can the form be embedded into the same page?

I would keep the username there. Sometimes users use Google login when they should use Aalto login and there must be a way to see which account is being used.

raphendyr commented 4 years ago

Few things:

The page should actually allow changing password for those users who have it. However, username and email should be locked as that could easily expose problems (existing user is searched using email too...). Only the password change would be usefull.

I guess I would sort information:

mtthwhggns commented 4 years ago

In answer to @Mankro 's question:

What will happen from the language change button? Is there a separate form or can the form be embedded into the same page?

My idea ws to render a form inline, replacing that row teporarily. No additional pages needed. I need to explore a little more how to acheive that accessibly, but it should be possible.

@raphendyr I won't answer all of your points, I agree with most of them. To be clear, this is an idea for a general layout, not a highly-specified final version.

My only concerns from your points are;

markkuriekkinen commented 4 years ago

About the identity provider: at the moment, the username is the best way to guess the identity provider since Aalto users have the @aalto.fi ending. That information comes from the Aalto identity provider server. When you use Google login, the username is not guaranteed to have the gmail.com ending. I'm not sure how it works but the database certainly has users that have usernames ending with arbitrary domains. I don't know how Google login enables that.

About the scope of the issue: indeed, the manual password change and multiple API tokens can be left for another issue.

raphendyr commented 4 years ago

Are you saying that we don't have a single object that represents an identity provider which is related to the user? That might be a challenge. I was imagining we could have strings like Information from [INSTITUTION NAME] for internal users and replace [INSTITUTION_NAME], for external users could have something like Information from [IDENTITY_PROVIDER]. If so, I guess we stick with Information from the identity provider

Exactly, there isn't clear information from user model point of view and there is no exact string in db or settings.

The last three categories you've stated include one field each at the moment. This seems like a lot of headings containing one definition each. I'd suggest keeping the sections a little broader for now, and splitting them when we have more fields to add.

Sounds good. I kind of hope there is just idea how a new section is added. E.g. current layout assumes there won't be new sections as the layout is not very extendable.

You've listed a lot of nice-to-have features (cookies, change password, create API tokens) that don't exist yet. Can these be moved to other issues? I suggest we keep this one focused on how to we fix the broken layout, but let's build it in a way that's easy to add fields to.

Sure, this issue shouldn't consider them more as a note about what is possibly happening in the future. Like, I wouldn't like to do full redesign again. It would be nice if the additions would fit the design done here.

raphendyr commented 4 years ago

I don't know how Google login enables that.

I think they pass the primary email of the google account (which doesn't need to be @gmail.com).

mtthwhggns commented 4 years ago

I've done some more design work on this and written a little code, but I propose that it goes on hold until the the SASS stuff is done (at least https://github.com/apluslms/a-plus/pull/606), as doing this without SASS, then migrating it to SASS later is easily double the work of just using SASS from the start.

markkuriekkinen commented 4 years ago

SASS groundwork has been completed, hence I removed the "status: blocked by" label.