Skip to content

Instantly share code, notes, and snippets.

View browniefed's full-sized avatar
🎧
Building

Jason Brown browniefed

🎧
Building
View GitHub Profile
==79899== Memcheck, a memory error detector
==79899== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==79899== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==79899== Command: /usr/local/bin/node node_modules/.bin/mocha test
==79899== Parent PID: 58851
==79899==
--79899--
--79899-- Valgrind options:
--79899-- -v
--79899-- --tool=memcheck
==83043== Memcheck, a memory error detector
==83043== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==83043== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==83043== Command: /usr/local/bin/node node_modules/.bin/mocha test
==83043== Parent PID: 80637
==83043==
--83043--
--83043-- Valgrind options:
--83043-- -v
--83043-- --tool=memcheck
{
"MSFT":[
{
"date":"Jan 2000",
"value":39.81
},
{
"date":"Feb 2000",
"value":36.35
},
@browniefed
browniefed / Replacing ExtJS with Ractive.js = Awesome.md
Last active January 2, 2016 03:29
Slowly replacing ExtJS with Ractive.js + AMD modules.

##Jama and Ractive.js

Jama has been originally focused on hiring full stack/Java developers. As of May 2012 the first full time front end developer was hired, and I was hired shortly after in July. Jama is mostly a monolithic ExtJS application which is great if you know nothing about front end development and want something up relatively quickly and easily and do not understand how to build structure your own HTML/CSS well.

Our goal was to replace ExtJS but rebuilding the application from the ground up was not an option. So we devised a plan to utilize Ext Containers that would simply render on the page and allow us to use whatever we wanted in them. This allows us to start granular and slowly start replacing larger and larger Ext components.

Another part of the application was already built with AMD modules so in order to encourage module reuse we extend Ext container, and implement a few methods to pull in an AMD module, pass in configuration data that may be still coming from the Ext world, bind to nec

<div class="jui-grid table {{css}}">
<div class="grid-row header">
{{#columns}}
<div class="js-column-{{field}} grid-column grid-column-{{field}} {{#hidden}}hidden{{/hidden}}">
<div class="grid-column-inner">
{{{label}}}
</div>
</div>
{{/columns}}
</div>
[{"actualDataType":"string","category":2,"controlTypeId":4,"dataType":"string","dataTypeId":2,"documentFieldId":1,"enumType":"","field":"documentKey","hidden":false,"id":255,"isSynchronizeField":false,"isWorkflowField":false,"label":"ID","mappedForImport":false,"readOnly":true,"required":true,"sortOrder":6,"triggerSuspect":false,"userConfigurable":true,"template":"<a href=\"\" on-click=\"openItemTab\" data-field=\"id\">{{<!-- ~~COLUMN_FIELD_PLACEHOLDER~~ -->}}</a>"},{"actualDataType":"ItemType","category":2,"custom":false,"dataType":"Lookup","dataTypeId":14,"documentFieldId":117,"enumType":"","field":"documentType","hidden":false,"id":253,"isSynchronizeField":false,"isWorkflowField":false,"label":"Item Type","mappedForImport":false,"options":[{"description":"","display":"Feature","displayPlural":"Features","documentTypeKey":"FEAT","facets":[{"documentTypeId":23,"facet":"RELATIONSHIPS","isSyncedFacet":false},{"documentTypeId":23,"facet":"TAGS","isSyncedFacet":false},{"documentTypeId":23,"facet":"URLS","isSynce
[{"actualDataType":"string","category":2,"controlTypeId":4,"dataType":"string","dataTypeId":2,"documentFieldId":1,"enumType":"","field":"documentKey","hidden":false,"id":255,"isSynchronizeField":false,"isWorkflowField":false,"label":"ID","mappedForImport":false,"readOnly":true,"required":true,"sortOrder":6,"triggerSuspect":false,"userConfigurable":true,"template":"<a href=\"\" on-click=\"openItemTab\" data-field=\"id\">{{<!-- ~~COLUMN_FIELD_PLACEHOLDER~~ -->}}</a>"},{"actualDataType":"ItemType","category":2,"custom":false,"dataType":"Lookup","dataTypeId":14,"documentFieldId":117,"enumType":"","field":"documentType","hidden":false,"id":253,"isSynchronizeField":false,"isWorkflowField":false,"label":"Item Type","mappedForImport":false,"options":[{"description":"","display":"Feature","displayPlural":"Features","documentTypeKey":"FEAT","facets":[{"documentTypeId":23,"facet":"RELATIONSHIPS","isSyncedFacet":false},{"documentTypeId":23,"facet":"TAGS","isSyncedFacet":false},{"documentTypeId":23,"facet":"URLS","isSynce
[{"active":true,"childDocumentType":{"description":"","display":"Feature","displayPlural":"Features","documentTypeKey":"FEAT","facets":[{"documentTypeId":23,"facet":"HISTORY","isSyncedFacet":false},{"documentTypeId":23,"facet":"ACTIVITIES","isSyncedFacet":false},{"documentTypeId":23,"facet":"URLS","isSyncedFacet":false},{"documentTypeId":23,"facet":"RELATIONSHIPS","isSyncedFacet":false},{"documentTypeId":23,"facet":"ATTACHMENTS","isSyncedFacet":false},{"documentTypeId":23,"facet":"SYNCHRONIZED_ITEMS","isSyncedFacet":false},{"documentTypeId":23,"facet":"TAGS","isSyncedFacet":false}],"fieldList":[],"id":23,"image":"website_blue.png","refId":2,"scopeId":2},"createdBy":{"firstName":"Sample","id":5,"lastName":"User","name":"Sample User","userName":"sample"},"createdDate":"2012-10-08T23:52:04.000Z","currentVersionDocumentActive":true,"description":"<p style=\"margin:0pt\"><span >All detail</span><span >s about scheduling patients.</span></p>","documentKey":"CP-FLD-1","documentType":{"category":"SECTION","display":"

RN mask link https://github.com/text-mask/text-mask/blob/reactNativeMasks/reactnative/src/reactNativeTextMask.js

The reason why text-mask is better than others is it doesn'y rely on onKeyUp or any key events. This makes it much more reliable on mobile devices w/ Samsung generally screwing events up w/ custom browser crap they build on top of chrome.

It only deals with previous value, next value, and cursor position.

Those are all typically accessible in onChange (sync) which allows us to make reliable updates for the value, as well as the new cursor position. In RN they are 2 separate calls. So it makes it a little more difficult as rather than onChange things need to be handled in onSelectionChange

const mapDispatchToProps = {
startup: Something.startup,
slower: Something.slower
}
const mergeProps = (stateProps, dispatchProps, ownProps) {
return {
...ownProps,
...stateProps,
...dispatchProps,