webcompat / simplebug

A simpler interface for Bugzilla web compatibility issues.
Mozilla Public License 2.0
4 stars 4 forks source link

Separate out "default description" and "default fix" insertion #15

Closed hallvors closed 10 years ago

hallvors commented 10 years ago

Right now it looks like the code assumes a bug will always lack both a sensible description and a suggested fix. If you refactor the code to split up this logic, we can instead say "if there is no description (comments[0]), add default description" and separately "if there is no suggested fix, add default suggested fix".

(I think it all gets a little tidier if you fire off two XHR requests immediately, then when both have loaded add the data to the page. You're going to want the data from the request which is now started in getWhiteboard() anyway, so just start it immediately.)

miketaylr commented 10 years ago

(notes for myself)

if comment w/ "description" tag:
  use that comment
else if description:
  use that 
else:
  use hard-coded description text
miketaylr commented 10 years ago

Should be fixed by e7b22f8c3140848da3a8317b7682df4e384f8eb5