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

Labels editor forgets selected labels when you've made changes once #784

Closed
hallvors opened this issue Oct 21, 2015 · 9 comments
Closed
Assignees

Comments

@hallvors
Copy link
Contributor

  1. Go to issue, for example https://webcompat.com/issues/1
    The issue should have two labels: "firefox" and "sitewait"

  2. Open label editor and apply another label, for example "windows". Click "Save and close"

  3. Open label editor again

Bug: no labels are selected. If you close the editor unaware of this state, it will remove all labels from the issue.

@magsout
Copy link
Member

magsout commented Oct 22, 2015

Hum yes confirmed...

But if you refresh page and open Editor labels are selected.

@miketaylr
Copy link
Member

Yeah, this is likely some kind of regression. It's worked in the past.

@hallvors hallvors self-assigned this Oct 22, 2015
@hallvors
Copy link
Contributor Author

The code just throws the response model at the issue. I'm not sure if that ever worked? Anyway, I have a fix.

@hallvors
Copy link
Contributor Author

(Bug is here: https://github.com/webcompat/webcompat.com/blob/master/webcompat/static/js/lib/models/issue.js#L219 - not sure what exactly the response object is, but it takes a little more work to get the labels array..)

@karlcow
Copy link
Member

karlcow commented Oct 26, 2015

What I see myself.

  1. Home page. Open in a new tab a bug
  2. The bug has already a label such as firefox-mobile
  3. Click on label widget
  4. Select an additional label by starting to type the letter to reduce the list
  5. click the label of your choice
  6. The previous firefox-mobile disappears from the list
  7. clicking out of the box, only the one you have selected is saved, the old one has disappeared.

This doesn't always happen. I haven't identified if it's a specific label or if it's an HTTP issue.

@hallvors
Copy link
Contributor Author

The specific label firefox-mobile will always disappear because we don't have it in the current set of labels. What probably happens here is that it's the only legacy label with a hyphen in it, and since we use hyphens as a "namespace" separator, the code will handle "firefix-mobile" as a label called "mobile" in the namespace "firefox". Since we AFAIK also have a label called just "mobile", we most likely end up applying that label instead.

I think we should kill the firefox-mobile label. It's going to be very confusing to have some labels with hyphens that are not intended to be namespaced, although if we move to a hard-coded set of labels it won't be impossible to do so.

@karlcow
Copy link
Member

karlcow commented Oct 26, 2015

all new bugs are written with firefox-mobile so webcompat-bot is setting the firefox-mobile maybe we need to change that.

@karlcow
Copy link
Member

karlcow commented Oct 26, 2015

@hallvors
Copy link
Contributor Author

hm.. that's browser-firefox-mobile. OK, I need to debug this.. #798 is probably invalid.

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

4 participants