Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme name field is not updated when changing the image #7646

Closed
ioanarusiczki opened this issue Feb 23, 2018 · 5 comments
Closed

Theme name field is not updated when changing the image #7646

ioanarusiczki opened this issue Feb 23, 2018 · 5 comments

Comments

@ioanarusiczki
Copy link

STR:

  1. Load AMO dev and from Dev Hub submit a static theme using the wizard by clicking on Create a theme.
  2. Click on the Browse button and select an image from your folder.
  3. Click on Select a different header image and choose another file.
  4. Observe the "Theme name" field from the Theme generator page.

Expected result:
The name of the second image is displayed.

Actual result:
The name of the first uploaded image is still displayed.

Notes:
This issue is reproducible on AMO dev with FF58 (Win10).

switching images

@seanprashad
Copy link
Contributor

Hey everyone - I'm going to take a crack at this in the next few days!

@EnTeQuAk
Copy link
Contributor

Awesome @seanprashad!

Just so that we're clear on what the bug here really is: Imho it's almost a feature that we don't randomly overwrite the theme name. So we'd have to store some information if the users have overwritten the theme name but even then I'm unsure if the current behaviour is still preferable.

Any opinions on this? I don't want you to waste too much time on something that - at least for me - looks perfectly fine.

@seanprashad
Copy link
Contributor

seanprashad commented Mar 1, 2018

Hey @EnTeQuAk! I've just begun inspecting code but from the GIF in the OP, it looks like the theme name is being populated based on the uploaded header image filename.

From my perspective, if I were a user who wanted to create a new theme, say Octocat, but my header image was named Addon_Octocat.png, it would be an extra step in my workflow to correct the contents of that form control. Now in reality, most of the users who are developing addons are probably savvy enough to make the correction after the image upload but it might reduce the need for editing the theme name after they've submitted it - just food for thought!

Edit: I think it should not update the Theme name at all, even if that form control is left blank. The Theme Name is something that will be saved into the system and will be how the end-user will find the new Theme and as a result, shouldn't surprise the user in any way, shape or form.

@seanprashad
Copy link
Contributor

Just an update @EnTeQuAk - I've opened a PR with my take on what a possible solution would be.

Like I mentioned earlier, I don't think we should populate the Theme name with the header image name at all. More than likely, the header image's file name isn't professional and doesn't necessarily reflect the name that the creator would want to have. If I'm not mistaken, this Theme name is what will be used to allow end-users to search for the theme and as such, should be manually specified without surprises!

If you think we should take a different path, I'll be happy to update my PR to reflect the desired functionality!

@EnTeQuAk
Copy link
Contributor

Alrighty, so I discussed this with @eviljeff and we actually like the current behaviour. It gives the form a good default and doesn't overwrite any manual changes.

That's why I'm just going to close this issue, although I'm really sorry for all the work and brain you put into this. Thanks a lot for this!

Sorry for getting back to this issue so late.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants