github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 566 forks source link

Move repo prefix to optional section #2499

Open d12 opened 4 years ago

d12 commented 4 years ago
Screen Shot 2019-12-05 at 2 29 32 PM

To reduce clutter up top, let's move the prefix box into the optional section. The way we automatically update the prefix box when you type an assignment name is a little unexpected, it'd be cleaner to just treat the box as an "override" which teachers can manually use. If they don't enter a prefix, we use the default prefix of the assignment name.

d12 commented 4 years ago

cc @femmebot for thoughts.

femmebot commented 4 years ago

We could do that. Looking at the repo visibility options, we could probably edit the copy as well to eliminate the wall of text.

See mockup below for how I was planning on using an accordion display on the assignment page to help de-clutter the existing content/functionality.

006  1

006  2

006  3

d12 commented 4 years ago

Love it :sparkles:

femmebot commented 4 years ago

cc @matthewferry for Assignment page mockups above

Also in Figma

femmebot commented 4 years ago

@d12 Quick mockup on how we may want to de-emphasize the prefix and de-clutter the form overall. What if we just display the prefix below the assignment title input as the user is typing it out. Then, if they want to change it, they can just click on the prefix edit and we could show the input field just as we have it now?

006  8

cc @matthewferry

d12 commented 4 years ago

Love it!!!

femmebot commented 4 years ago

Codepen prototype: https://codepen.io/femmebot/details/GRgOZLR

9pBR3ELZQ7

spinecone commented 4 years ago

I found some interesting historical information in the original PR for adding the customizable repo prefix field: https://github.com/education/classroom/pull/728

It looks like repo prefixes used to be generated directly from assignment titles. However, this caused problems when assignment titles included special characters that couldn't be used in repo titles. To solve this, we now ask the user to come up with a repo prefix that doesn't include any special characters.

We are planning on making customizing the repo prefix optional as part of https://github.com/github/classroom/issues/89 but unless we've heard specific feedback about this, I don't think that customization is something that users want or need, and is mostly there to solve a backend problem we were having. I'm wondering if we could go back to exclusively generating it automatically (while stripping out any illegal characters) so that users don't need to worry about it or even be aware of it. This would be similar to how repo slugs are handled on dotcom.

femmebot commented 4 years ago

You're right it's not a user-requested feature but a bandaid for internal quirks. There's a bit more nuance behind the custom prefix.

Assignment names are used to automatically name student assignment repos. But when assignment names contain special characters, the characters are stripped out leaving some repositories in some cases (as in this example) with nothing but a dash before the student's GitHub username.

It seems that the custom prefix was an attempt at (1) providing visibility into the auto-generated assignment repo name as a way to preemptively signal to the teacher that some/all of the characters are being stripped out and, (2) offer them a "fix" so that the assignment title is still readable to students but the prefix is acceptable as a URL slug.

We don't really do a good job of communicating why certain characters are being stripped out and what the consequences are.

spinecone commented 4 years ago

Would it make sense to communicate to a user that an assignment title they are providing will lead to a repo prefix with stripped characters, without specifically letting them change the repo prefix itself? Something like what dotcom does here: Screen Shot 2020-01-10 at 12 05 16 PM