classroom
classroom copied to clipboard
Move repo prefix to optional section

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.
cc @femmebot for thoughts.
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.
Love it :sparkles:
@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?

cc @matthewferry
Love it!!!
Codepen prototype: https://codepen.io/femmebot/details/GRgOZLR
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.
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.
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: