classroom icon indicating copy to clipboard operation
classroom copied to clipboard

Move repo prefix to optional section

Open d12 opened this issue 5 years ago • 10 comments

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 avatar Dec 05 '19 19:12 d12

cc @femmebot for thoughts.

d12 avatar Dec 05 '19 19:12 d12

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

femmebot avatar Dec 05 '19 21:12 femmebot

Love it :sparkles:

d12 avatar Dec 09 '19 19:12 d12

cc @matthewferry for Assignment page mockups above

Also in Figma

femmebot avatar Dec 10 '19 17:12 femmebot

@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

femmebot avatar Dec 17 '19 18:12 femmebot

Love it!!!

d12 avatar Dec 20 '19 22:12 d12

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

9pBR3ELZQ7

femmebot avatar Jan 03 '20 15:01 femmebot

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.

spinecone avatar Jan 10 '20 16:01 spinecone

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.

femmebot avatar Jan 10 '20 17:01 femmebot

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

spinecone avatar Jan 10 '20 18:01 spinecone