Commit Graph

3363 Commits (999c6d86bbaaa11e9059c213de706e1760749ae7)

Author SHA1 Message Date
Zaahir Moolla 1c867979c1 Conversions: Support single unit input, case-insensitive fallback check (#4261)
* Allow celcisu typo, updated tests accordingly

* Store regex captures in variables

* Allow single unit inputs through guard

* Pass through single unit input to frontend

* Explcitly match guard regex, better check for valid result

* Cleanup whitespace and indentation

* Lowercase symbols that are case-insensitive

* Fix and simplify guard regex

* Better handling of named captures, ensure left unit is not only match

* Case sensitive match first, fall back to lowercase match on symbol

* fix indentation

* remove redundant m on regex match

* Removed default if duplicate.
2017-06-15 15:51:24 +01:00
Aastha 07bbf47634 TimezoneConverter: fixes #4210 fixed error in timezone display (#4262)
* fixed error in timezone display

* minor change

* added new test cases
2017-06-14 21:38:18 +01:00
Philip Kirkbride dc8876002e Minecraft: British spelling of colour (#4272)
* add british spelling for colour on minecraft guide

* add tests for color & colour on minecraft

* fix hard tab
2017-06-14 10:43:45 +01:00
PJ Hampton 9b7556fbf0 Add speed base + units. (#4282) 2017-06-12 16:08:33 -04:00
Zaahir Moolla e9e378f3c3 Conversions: Allow "celcius" typo, updated tests (#4260)
* Allow celcisu typo, updated tests accordingly

* correct typo, move new tests below

* simplify celsius regex
2017-06-09 18:17:11 +02:00
PJ Hampton 6d9896cb8b 2048: Tweaks before production (#4027)
* Added additional trigger.

* Fixed container placement / alignment.

* Updated tests.

* Add async start.

* Revert "Add async start."

This reverts commit 54b3edb88221051393d818ccff35d9ae45d10049.

* Check for mobile device and return before onShow

* Ensure we return value from DDH.failed

* remove trailing spaces
2017-06-05 22:49:57 +02:00
PJ Hampton 8c5ac1d651 Conversions: Broaden Triggering (#4239)
* Add triggers to list.

* Remove smart match.

* Stash.

* Broaden triggering.

* Update test formatting.

* Revert "Update test formatting."

This reverts commit 390186743c07bffa5d57025e04926d2473a3ff2e.
Reverting because this creates big conflicts in the PR. We can address
the formatting later

* simply language trigger loading

* Add acronyms for teaspoon

* remove trailing spaces

* Add test for abbreviated teaspoon and tablespoon

* remove trailing spaces
2017-06-05 20:18:18 +02:00
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
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
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 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
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
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
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 37a4483460 Added triggering support for squared meters. 2017-05-01 17:42:45 +00:00
PJ Hampton 9d82301dd3 Add support for millirads. 2017-05-01 17:24:05 +00:00
PJ Hampton 0bf8da85f1 Deprecate some of the perl. 2017-04-28 21:24:10 +00:00
PJ Hampton 2cad552494 Tests adapted for mathjs 🤘 2017-04-28 20:27:51 +00:00
PJ Hampton 6f891b1a14 Checking in code (not fin.) 2017-04-28 20:15:39 +00:00
PJ Hampton 41e55bf9ff Removed t backups. 2017-04-28 13:51:06 +00:00
PJ Hampton dfd7d399ed Merged master. Fix conflict. 2017-04-27 17:20:10 +00:00
PJ Hampton 4651520f3e Added nat lang triggers. 2017-04-27 17:14:43 +00:00
Shivam Shukla 91e0b1d7f9 Timer IA: triggering on edge cases fixed. (#4089) (#4134)
* Time IA triggering on edge cases fixed. (#4089)

* Updated regex and added more test cases
2017-04-27 12:18:40 -04:00
Manraj Singh 266be90510 Color Picker: Improves triggering (#4137)
* ColorPicker: Improve triggering

* ColorPicker: Add tests for new triggers

* ColorPicker: Move triggers to separate file

* ColorPicker: Add more combinations of triggers as test
2017-04-27 12:12:32 -04:00
Aditya Tandon c42daedc1e Conversions: Makes conversion queries more flexible (#4129)
* makes conversion queries more flexible

* adding removed test back and made some changes in regex
2017-04-27 11:51:04 -04:00
Zaahir Moolla f1142a6b21 tighten calculator regex, update tests (#4128) 2017-04-25 10:43:32 +01:00
Zaahir Moolla aad29332d0 Fix geometry test 2017-04-24 15:42:03 -04:00
Brian Singer c5816891e4 Geometry Spice converted to Goodie: Broken hover and missing calculation feature (#3181)
* Geometry Broken Hover and missing calc

* Linked hover effect for dot and SVG

* updated css

* started test file

* consolidated objectInfo YML and finished testing

* removed dumeprs

* fixed triggering and added more triggering test cases
2017-04-24 15:41:31 -04:00
Manraj Singh 67f6e084f2 AsciiTable: Improves triggering (#4124)
* AsciiTable: Triggering now for 'list of'

* AsciiTable: Add more triggers

* AsciiTable: Tests updated with new triggers
2017-04-24 15:35:38 -04:00
Zaahir Moolla f70ed1e6fc Merge branch 'master' into pjhampton/PercentOf_remove
* master:
  Calculator: Fix copy issue, remove -Infinity (#4095)
  Added PercentOf logic to calculator. (#4122)
  Conversions: Improve triggering (#4118)
  Countdown: Continue PR #3485 (#3936)
2017-04-24 15:33:26 -04:00
PJ Hampton 3ea2787742 Added PercentOf logic to calculator. (#4122) 2017-04-24 12:59:03 -04:00
PJ Hampton 07bf054914 Remove PercentOf files. 2017-04-24 16:06:42 +00:00
Aditya Tandon 40d7231443 Conversions: Improve triggering (#4118)
* Fixes #4112 conversions triggering

* test added 1

* adds alias for fahrenheit
2017-04-24 17:02:25 +01:00
Rasika Pohankar 7ebdcdfbd2 Countdown: Continue PR #3485 (#3936)
* Implement changed design, fix #3500

* Remove comment

* Update test file to use ISO8601 dates and avoid testing of Role

* Include subtitle in the template

* Take current time using momentjs, calculate difference in JS

* Remove subtitle from the template, make corrections to endCountdown

* Pass date string to JS and find difference in moment objects, change toggling at countdown end

* Remove use of difference passed from the backend

* Update test file
2017-04-24 09:40:05 -04:00
lernae cc1753acab Fixes #4102 Calendar: Shouldn't trigger on query for calendar.google.com (#4114) 2017-04-21 18:29:13 -04:00
Aditya Tandon 1047f8a9e6 ASCII Table: Add additional trigger words (#4111)
* Fixes #4107 Added triggers

* updating test

* moving triggers to a separate file
2017-04-21 18:15:49 -04:00
PJ Hampton 2e6590e29f Calculator: [Phase 4] Deprecate Perl Backend (#4110)
* Begin deprecating perl backend.

* Deprecate backend [skip ci]

* Routine checkin of code.

* Added docs + preprocessing.

* Deprecate perl eval backend.

* Checking in some code.'

* Handle bad search expressions by defaulting to 0

* Add ability to recover with grace from bad expressions from search bar.

* Removed unnessesary perl code.

* Add support for factorials with !

* cleanup trailing spaces

* Removed trig constants.

* Support tau in expression.

* Removed ln preprocess.

* Support leading =. Removed moot code.

* Add support for euro and pound.

* Removed nat lang query parsing from js.

* strip duplicate operators

* Fixed legacy spacing issue in tests.

* Remove empty exponent.

* Bail on hex looking entries.

* better handling of repeated operators

* Remove max import

* revert back to old check for 3+ operators

* relax phone number regex for now

* remove silly test
2017-04-21 13:12:41 -04:00