Commit Graph

11624 Commits (db131264090b7c41c53ca993c553437808695fe5)

Author SHA1 Message Date
Parth Mehta db13126409 Conversions Suggestion: (ANGLE) - Add Missing Units (#4224)
* added custom units for angle conversions

* added triggers for angle custom units

* added front-end tests for custom angle units

* Refactoring. Categorized queries by the quantity they represent

* minor update

* added trigger for the word - microarcseconds

* replaced exponent-based values with decimal-based ones

* Updated tests to use defined units

* added the missing commas

* removed duplicate e+12 from test spec
2017-06-03 15:35:10 +01:00
PJ Hampton 092124b817 Calculator: Fix non-whole expression rewriting (#4241)
* Fix non-whole expression rewriting.

* Add pixel to check for failure.
2017-06-03 10:00:43 -04:00
PJ Hampton 3869ad10ac Fix preprocessed query edgecase. (#4237) 2017-06-01 14:23:53 -04:00
Aditya Tandon 43e2c6e08f Updating the aliases for sublime 2 (#4119) 2017-06-01 01:49:11 +02:00
Joshua Liu dbe30f8db7 Molar Mass: New Molar Mass Instant Answer (#4219)
* Add Molar Mass Calculation

* Add molar mass algorithm

* Update Molar Mass Handler

* Molar Mass: added input sanitization

* Molar Mass: Fix sanitation

* Molar Mass: Added tests, Changed mass table, Changed sanitation process

* Molar Mass: Documentation and Formatting

* Molar Mass: Fixed an input sanitation bug and changed instant answer format

* Molar Mass: Remove Boilerplate Comments

* Molar Mass: move data outside of code and add common compound support

* Molar Mass: Change regular expressions

* Molar Mass: Update YAML Format
2017-05-31 20:13:25 +01:00
PJ Hampton c1287cb1cc Allow keyboard input in firefox. (#4235) 2017-05-31 14:54:03 -04:00
PJ Hampton 900c5a3da5 Calculator: Fixes onload js issue / Patch triggering (#4230)
* catch value error on load.

* added quick win triggering edge cases from pixel logs.
2017-05-29 07:27:40 -04:00
Zaahir Moolla c6e5e95641 Remove forced 100% width on select to allow custom dropwdown arrow (#4229) 2017-05-25 22:31:41 +01:00
Zaahir Moolla be057cf5ec Fix log rewrite 2017-05-25 12:03:40 -04:00
Rob Emery e3cb2380e9 DatesRole: Adding support for partial time format (#4187)
* DatesRole: Failing tests for new relative date + time format

* DatesRole: Adding support for queries like "03 may 07:00"
2017-05-24 22:36:46 -04:00
PJ Hampton 07a5ba3e85 Add missing energy units. (#4223) 2017-05-24 18:06:25 -04:00
PJ Hampton 72729b7c16 Calculator: (URGENT) Fix math.js log|ln simplify issue. (#4183)
* Fix math.js simplify issue.

* Remove debug statements.

* Adds fact to the mix.

* Stash

* Fix greedy quantifier in trig and log/ln

* Don't trigger on anything with stuff after =

* allow triggering on <func> <number>

* Both sides of =

* Fix expressions.

* Tighten up triggering based on valid expressions.

* Remove dumper obj

* Tighten up word triggering.

* Allow only one currency through.

* Kill off symbols in js if allowed through.

* Allow negative numbers.

* Add support for negated numbers.

* Fix initialize issue.

* Refactor code slightly

* Tightened regexs

* Require space between log and input
2017-05-24 17:44:13 -04:00
PJ Hampton afddef774c Conversions: (VOLUME) Merge Volumes / Update Triggering (#4193)
* Merged vol/liquid vol

* Added triggering for volume units.

* Added in imperial gallon name

* Fix yaml file.

* Fix triggers based on feedback.
2017-05-23 12:37:05 -04:00
PJ Hampton 312edbc53c Calculator: Removes 0 on bail (#4169)
* Removed 0 on error. Saves user confusion.

* Add tracking pixel.
2017-05-22 16:17:30 -04:00
PJ Hampton 4c789c0c85 Conversions: add 'deg' to temperature aliases (#4218)
* Add deg c/f to temperature aliases.

* Add aliases for c/f (temperature)
2017-05-22 15:08:03 -04:00
Robert Badea a588c17f81 html_entities: Added new triggers & tests (#4203)
* added new triggers

* added new test
2017-05-22 14:40:24 -04:00
Shivam Shukla 9ca979f198 Timer: Changed query_raw to query_lc (#4165)
* Timer: Changed query_raw to query_lc
* also fixes #4188 (regression from ambiguous triggers)

* Updated regex and also solve issue #4188

* Added one more test case
2017-05-18 16:54:35 -04:00
Yashhwanth Ram 03c20c1587 Conversions: Add pressure units (#4214)
* Add extra units for pressure conversion (#4178)

* Fix KPa to kPa and Kbar to kbar

* Fix Kbar to kbar in customUnits
2017-05-18 12:35:01 +01:00
Owen Hines 90df22ecb7 Conversions: Add more mass units (#4213)
* Added missing mass units. Commits from #4192

* Fixed duplicate declaration of customUnits array.

* Precision changes to pass tests.
2017-05-16 17:30:48 +01:00
Aditya Tandon 8e21782c41 Conversions: Adds generic triggers (#4168)
* adding triggers

* indenting key value pairs

* using smart match

* removing liq vol for now

* shortening regex

* adding test

* removing earlier test but stil it fails

* update test

* formatting test
2017-05-16 15:49:13 +01:00
Philip Kirkbride 529e4195aa Linux Cheat Sheet: Add sed command example (#4040)
* Add sed command example

* Move to file section
2017-05-15 23:27:07 +02:00
Futtetennista 479aaa3f0e Conversions: Add missing units (POWER) (#4185)
* Add power custom unit and some tests

* Update triggering

* Fix spec

* Add missing comma

* Amend symbols

* Fix specs

* Fix kilowatt symbol

* Use unit value from yml file

* Amend units
2017-05-15 17:05:14 +01:00
PJ Hampton 1ce7de6bdb Add in missing duration units. (#4195) 2017-05-12 14:55:36 -04:00
Aditya Tandon 07d1553b1d Conversions: Adds missing units for Force conversion type (#4197)
* adds kilonewton unit to force type

* adds remaining units

* formats the file and  comma correction

* fixing the test

* fixing the test 2

* fixing the test part 3

* fixing the test part 4 perhaps the final one

* fixing the test part 4 surely the final one

* fixing the test part 4 definetly the final one
2017-05-12 14:20:43 -04:00
PJ Hampton aed0d1adde Conversions: Enable Frequency Conversions (#4194)
* Add in frequency units to UI.

* Add frequency support
2017-05-11 18:00:50 -04:00
PJ Hampton 422602d17a Add missing area units. (#4196) 2017-05-11 17:50:39 -04:00
Owen Hines e6bbb3aaf1 Added 'count down' timer trigger (#4180) 2017-05-10 22:23:35 +01:00
PJ Hampton 137f98c31b Calculator: Add square root support from search bar. (#4182) 2017-05-09 16:53:43 -04:00
Zaahir Moolla 973969fde9 Conversions: Use stacked input/select on desktop (#4184)
* Stacked layout on desktop as well, larger input font

* ceanup whitespace

* 80% width desktop
2017-05-09 21:13:01 +01:00
Kyle Daruwalla 9e44abe1b4 PrimeFactors: Improve triggering (#4149)
* PrimeFactors: Improve triggering
- Added check to regex guard if query matches form "is <number> prime"
- Strips all preceeding non-digit characters from remainder

Fixes #2799

* Added support for new triggers:
- 'is <number> a prime'
- 'is <number> a prime number'
- 'is <number> prime number'
2017-05-05 17:57:48 -04:00
Manraj Singh c3595bdea0 ColorPicker: Makes triggering more generic (#4138)
* ColorPicker: Remove suffixed triggers

* ColorPicker: Handle extra words in remainder

* ColorPicker: Adds tests to check extra words in query

* ColorPicker: Add 'conversion' to remove from query

* ColorPicker: Add test for 'conversion' keyword in remainder

* ColorPicker: Simplify regex, lowercase query

* ColorPicker: Remove print statements
2017-05-05 16:13:35 -04:00
PJ Hampton 512d0c49e8 Conversions: Fixed spelling of cmH2O and Cups, Fixes FE-Tests (#4160)
* Fixed spelling of cmH2O

* Add working tests.

* Try jasmine-node.

* Added init package file.

* Install mathjs.

* Refactored custom units.

* Finish up tests.

* Update package.json.

* Fix cups spelling.
2017-05-05 15:18:03 -04:00
Zaahir Moolla 54533e63cf Merge branch 'master' of github.com:duckduckgo/zeroclickinfo-goodies
* 'master' of github.com:duckduckgo/zeroclickinfo-goodies:
  remove conversion.js (#4152)
  Javascript CheatSheet: Fixes #4146 broken more at link (#4148)
2017-05-03 15:43:14 -04:00
Zaahir Moolla 6309e550a2 Merge branch 'pjhampton/conversion-add_interactivity'
* pjhampton/conversion-add_interactivity: (72 commits)
  Flip top and bottom section, minor design tweaks remove left padding to aling selection with search box widen unit dropdown width to allow for long unit names
  Removed mathjs import in node context.
  Comment out math import.
  Travis... please work.
  Add mathjs to travis.
  Add tests for custom units.
  Add math for tests.
  Order select keys alphabetically.
  Checking in work.
  Update triggers.
  Fixed digital triggering.
  Update reconvert logic.
  Update 'update' side
  Add comments. General refactor.
  Add support for digital units.
  Whoops, force height on select not frm__select
  Force select height, override .frm__select class
  remove border radius for conversion inputs too
  Code clean up. Some quick wins.
  Support custom energy funcs.
  ...
2017-05-03 15:42:06 -04:00
Zaahir Moolla 076a1fb106 Merge branch 'master' into pjhampton/conversion-add_interactivity
* master:
  formatting the answers (#4133)
2017-05-03 15:41:49 -04:00
Zaahir Moolla d0ae4dd477 Flip top and bottom section, minor design tweaks
remove left padding to aling selection with search box
widen unit dropdown width to allow for long unit names
2017-05-03 15:05:50 -04:00
PJ Hampton 2e1fb271fb Removed mathjs import in node context. 2017-05-03 15:06:58 +01:00
PJ Hampton 7d29f94f78 Comment out math import. 2017-05-03 13:26:42 +01:00
PJ Hampton 0c3ee13c20 Travis... please work. 2017-05-03 13:17:54 +01:00
PJ Hampton 1567f0d341 Add mathjs to travis. 2017-05-03 13:12:22 +01:00
PJ Hampton 5339c29f9e Add tests for custom units. 2017-05-03 13:09:41 +01:00
PJ Hampton f8f408af94 Add math for tests. 2017-05-02 23:24:36 +01:00
PJ Hampton 2cf2cfcc00 Order select keys alphabetically. 2017-05-02 22:48:51 +01:00
PJ Hampton c3388bb77a Checking in work. 2017-05-02 22:38:43 +01:00
PJ Hampton 8b59c5fb4a Update triggers. 2017-05-02 21:25:19 +01:00
PJ Hampton 2566840ffb Fixed digital triggering. 2017-05-02 21:17:31 +01:00
PJ Hampton ea47e705a6 Update reconvert logic. 2017-05-02 20:45:24 +01:00
PJ Hampton fb90db0f28 Update 'update' side 2017-05-02 20:42:14 +01:00
PJ Hampton 9ff2b224b2 Add comments. General refactor. 2017-05-02 20:36:31 +01:00
PJ Hampton a229f3ffc7 Merge branch 'pjhampton/conversion-add_interactivity' of https://github.com/duckduckgo/zeroclickinfo-goodies into pjhampton/conversion-add_interactivity 2017-05-02 18:07:16 +00:00