Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Project icons #29

Open
joshwcomeau opened this issue Jun 30, 2018 · 3 comments
Open

Project icons #29

joshwcomeau opened this issue Jun 30, 2018 · 3 comments
Labels
good first issue Good for newcomers upcoming feature New feature or request

Comments

@joshwcomeau
Copy link
Owner

When you create a new project in Guppy, it asks you to select an icon.

Once the project is created, though, there is no way to update that icon.

For imported projects, it's even worse; you just get a random color and the first letter of the project name.

Ideally you should be able to change icons whenever, as well as upload your own, or choose to automatically use the favicon for the project (especially for imported ones).

This issue should be done, ideally, after #28, so that the new icon functionality can be used in both places.

This issue encloses several tasks:

  • Add an "UploadProjectIcon component to select an image
  • Copy that image to a new .guppy directory in the project (I think it has to live in the same directory as the project..?)
  • Add a way to select the project favicon instead
  • Add these new functions to the new-project wizard
  • Add these new functions to the configuration pane in Project configuration #28
@mathieudutour
Copy link
Collaborator

My fork handles that but I cannot easily create a PR since there are tons of merge conflicts. But here is the relevant code for the one who wants to tackle this: https://github.com/skpm/guppy/blob/skpm/src/components/ProjectIconSelection/ProjectIconSelection.js#L25-L46

@syn228
Copy link

syn228 commented Oct 21, 2018

Is this issue still open? it would be my first time contributing but would like to try!

@AWolf81
Copy link
Collaborator

AWolf81 commented Oct 21, 2018

@syn228 yes, this is still open and no one is working on it.

Great to hear that you like to help. Please have a look at our contribution info and the dev docs here.

So it's all yours. If you're having any questions please let us know. You can also join us on Gitter so we can chat there.

Issue #28 is already on master. So you can add the uploading component to the ProjectConfigurationModal & the CreateNewProjectWizard. I would start by adding to ProjectConfigurationModal as this is easier to understand. That dialog is accessible with the gear icon in the UI.
I think this could be an UploadProjectIcon component in the modal that contains a button to display a file dialog. Maybe we can pick a better name as it's not uploading anything. Maybe SelectCustomProjectIcon would be better.
To get an idea how a file dialog can be opened you can have a look at src/components/CreateNewProjectWizard/ProjectPath method updatePath.

The saving of the selected icon will require a new Saga save-project-icon.saga to handle the copying to the .guppy folder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers upcoming feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants