Zeroclickinfo-goodies: Conversions Suggestion: (PRESSURE) - Add Missing Units

Created on 8 May 2017  路  6Comments  路  Source: duckduckgo/zeroclickinfo-goodies

Problem

We recently migrated the conversions API into an interactive UI. However, some units were ditched for various reasons and the legacy code didn't necessarily support all of the units that were desired from users. This is a good opportunity to take the lead in the search engine conversions game.

screen shot 2017-05-08 at 6 37 07 pm

Solution

  1. Add some front-end tests to spec/conversions_spec.js. This will test the custom units

  2. Add some back-end tests to t/Conversions.t. This will test the triggering.

  3. Update the triggering in triggers.yml

  4. Add the custom unit to Conversions.js (Line 45) and add it to the Units Object in Conversions.js (Line 166)

UNITS

  • [ ] Barye
  • [ ] Millipascal
  • [ ] Hectopascal
  • [ ] Kilopascal
  • [ ] Megapascal
  • [ ] Standard Atmosphere
  • [ ] Technical Atmosphere
  • [ ] Millibar
  • [ ] Centibar
  • [ ] Decibar
  • [ ] Kilobar
  • [ ] Megabar
  • [ ] Gigabar

People to notify

Get Started

Resources


Instant Answer Page: https://duck.co/ia/view/conversions

Highest Impact Tasks Low Improvement Low-Hanging Fruit High JavaScript Suggestion Conversions

All 6 comments

Hey! I'd like to work on this. Please assign me.

Awesome! Thanks so much @ryr3
We'll get you added to the DDG github organization soon. In the meantime, feel free to get started and reach out here or on slack if you need help / have questions... 馃憤

Assigned 馃憤

Hey @ryr3

Just to let you know, some of these have come in and have been merged. I'm linking to them just incase you need some inspiration or help 馃憤

Thanks! I'm done with most of the work, except for the Perl testing. Just wanted to make sure of this, it is enough to test each customUnit once? I mean, for example, there's no need to test barye with all of the other units, just one other customUnit, and it is enough to test only the customUnits that I've added.
Thanks in advance! :smiley:

Hey @ryr3,

Yeah, you definitely don't need to test against every unit. I try to kill two birds with one stone in these cases, such as 10 Kilopascal to metapascal. Hope that helps!

Was this page helpful?
0 / 5 - 0 ratings