Page MenuHomePhabricator

Make Project Images that match Typeahead choices
Closed, ResolvedPublic

Description

We should figure some path forward to using FontAwesome for Project images.

Pros

  • They scale
  • There are lots of them
  • There is no additional wire cost (over more sprites)
  • They'll match up to typeahead icons

Cons

  • Seems like a lot of work
  • Migration? Support both?

Event Timeline

chad raised the priority of this task from to Low.
chad updated the task description. (Show Details)
chad added a project: Projects.
chad added subscribers: chad, epriestley.

These aren't sprited now anyway (we compose the images on the server), and we let you upload custom images. I generally like these being more profile-like and customizable? We can generate them at 2x to deal with scaling. I think it's intentional/desirable that, e.g., the "WMF" project can have a WMF logo as its project icon?

That works when it's something relatable (like a company or "product"), but when Projects are Teams, Tags, Sprints, etc, people just want them to match the typeahead.

Hmm.. we could just add the images for the typeahead icons? That is, take FontAwesome, increase the font size to like 200px or whatever, then slice up the images into PNGs? And we could make the default image be the typeahead image on a blue background or something. That would provide consistency while retaining the flexibility for projects with a recognizable logo.

I wonder if we can simplify it for people then. Provide a 'from Typeahead' shortcut when selecting a picture.

I've tried to pull FontAwesome into Photoshop with limited success, but I think I just need to pull them into Illustrator first. Can't import it as a font since it uses unicode thats unassigned.

chad renamed this task from Move project images to FontAwesome to Make Project Images that match Typeahead choices.Jan 3 2015, 7:04 PM
chad claimed this task.

Projects currently have a small "typeahead/tokenizer" icon (which appears in typeaheads) and a larger "profile picture".

Here's an example of the small icon (a briefcase):

Screen_Shot_2015-01-05_at_8.58.11_AM.png (92×370 px, 9 KB)

Here's an example of the large icon (a company logo). This screenshot also shows a small icon (a building):

Screen_Shot_2015-01-05_at_8.59.03_AM.png (126×284 px, 17 KB)

Each project has a small icon and a large icon. The large icon can be a custom picture (like a company logo) that you upload, or we provide some options for generating a default icon.

Although the example above shows a case where we have a logo for a project, many projects don't have a meaningful logo or other representative image, and end up using a pre-generated/default image.

Currently, it often isn't very easy to match the large icon to the small icon, but this is a desirable default and makes the most sense for a lot of projects. This task covers making it easier to make the large icon just be a big version of the small icon, in cases where there's no better large icon available and being consistent would be most useful.


D11183 added more prebuilt large icons (corresponding to the small icons), but they appear in arbitrary order in the UI and don't have labels. To reorder and label them:

  • Go to Projects(Any Project)Edit ProjectEdit PictureChoose Icon and Color... to show available icons.
  • The 16 icons added in D11183 don't have human-readable labels. When you hover over them, the tooltip shows the icon name (like "fa-bug" or "fa-briefcase"). Add labels to the map in PhabricatorFileComposeController. These labels should be the same as the labels in Projects(Any Project)Edit ProjectEdit DetailsChoose Icon....
  • Reorder the UI so the 16 icons added in D11183 appear first, in the same order as they appear in Projects(Any Project)Edit ProjectEdit DetailsChoose Icon.... So: briefcase, tag, folder, team, .... You can use this pattern to do this easily:
$sort_these_first = array('briefcase', 'tag', 'folder', ...);
$list = array_select_keys($list, $sort_these_first) + $list;

That will make it easier to choose the same large icon as the chosen small icon, but it would be good to make it even easier:

  • Add a "Use Project Icon" button to Projects(Any Project)Edit ProjectEdit Picture. When the user clicks this, it should select the image and color implied by the current small icon.
  • When a user creates a new project, we should generate this implied icon as the default icon.

You may need to install the gd extension to do image composition. If you run into errors like imagecreatefromstring() does not exist, I can help you with this.

We'll want to use the background colors for tags, and maybe with the checkered tag just use a simple grey background.

Remaining work here is:

  • The button should have an image previewing the image which will be chosen, instead of the text "Use Project Icon".
  • When projects are created, they should use that image by default.

Both of these changes are a bit more involved than the first part of this change was.