Commit Graph

17 Commits

Author SHA1 Message Date
Stefanie Doll
4ff77eee26
Move editor from app-js to ui-app component (#795)
* Move editor from app-js to ui-app component

* move export

* Move codeflask in package.json
2019-03-08 12:41:58 +01:00
Stefanie Doll
3f8ef157e4
Compress code with snappyjs (#755)
* Compress Base64 strings with snappy

* Move wrapper fix to different PR

* Added snappy typescript declaration

* type str and ch

* Updated yarn.lock
2019-02-25 14:24:19 +01:00
Stefanie Doll
b56480c9ca
Smaller quick-fixes for app-js (#756)
* Fix wrong copyToClipboard link

* Removed duplicate 'js--App' wrapper

* Fixed overflow in editor for longer code examples
2019-02-24 13:33:44 +01:00
Stefanie Doll
970911536c
Share functionality for app-js api playground (#740)
* First WIP

* Move all action buttons to component

* More WIP

* removed query-string module, share example through location.hash

* Copy over deep clone

* Fixed onload behaviour

* Working example 'read from url' <-> 'write to url'

* Populate location.hash to state

* comment

* Add selected option to dropdown

* Dropdown WIP debugging

* Removed attempted workaround for MUI Dropdown component Bug, added Fixme

* Added copy to clipboard functionality

* Added feedback animation on copy & switched component back to PureComponent

* Tslint fixes & yarn.lock dump

* Added hash router types

* More type fixes

* Attempt to fix strictNullChecks for document.getSelection()

* Fixed wrong conditional

* prettier links

* Tiny styling tweaks

* Added routing to index

* Removed empty devDependencies from package.json

* Fix sharing

* Try `history` without typing

* Yarn.lock dump

* Removed leftover LocalStorage component

* Removed HashRouterProps

* Code formatting changes

* addressing tslint errors

* Added match ro Props

* Added history: any to Props declaration
2019-02-22 13:51:07 +01:00
Stefanie Doll
333b94001e
Bugfix: deep clone imported snippets (#737)
* Yarn.lock update

* Deep clone imported snippets, state.snippet empty on default

* Fixed wrong defailt type for 'selected'

* Fix onMount behaviour
2019-02-20 12:53:48 +01:00
Jaco Greeff
9adfd46cc3
Bump i18next version (with usage changes) (#736)
* Bump i18next version (with usage changes)

* Remove unneeded i18n wrapping (Unlock)

* Bump semantic-ui version
2019-02-20 10:26:27 +01:00
Stefanie Doll
f0198a35d4
Bugfix: Editor doesn't update onLoad if no custom example is selected (#732) 2019-02-19 18:28:16 +01:00
Stefanie Doll
12ff6fe32a
Populate example name to input for custom examples (#731)
* Set snippet name as default value in save input field

* Onlu prefill input for custom examples
2019-02-19 16:18:19 +01:00
Stefanie Doll
a056be741b
Save code snippets to local storage (#718)
* Fine tuning examples

* WIP First proposal to save snippets

* Don't add code wrapping multiple times

* Smaller adjustments

* Fix 'reset selected on load' bug

* Reverted Button size type declaration change, doesn\t belong in this PR

* Wrapper formatting

* Save button style

* removed constructor from editor

* fix metadata example

* Added constants file

* Moved local storage popup to separate component

* Remove functionality WIP

* upgraded yarn lock

* Moved Local storage to separate component, fixed lyfecycle methods, moved props.childre to render in HOC

* Changed simplyfied examples for debugging back to original

* Cleanup leftover comments

* More leftover comments cleanup

* More cleanup

* Moved makeWrapper back to seperate component

* Add code wrapper for default examples in constructor to prevent lifecycle update bugs

* Make onBlur optional

* Updated yarn.lock

* FIXME comment for ui-app Button bug inside <Popup />

* translation and removed empty classname
2019-02-19 10:49:37 +01:00
Jaco Greeff
bc0c9bfe43
Inject keyring only on dev chains (#717)
* Inject keyring only on dev chains

* Remove useless deconstruct
2019-02-14 17:23:55 +01:00
Stefanie Doll
a69548866b
App-js follow up tasks (#703)
* Bump up yarn.lock

* Clean up examples, added jacos example to storage examples

* Fixed Dropdown

* Update package.json

* resize wip

* css resize fix

* Add line-break after code in exec to prevent catch from  being commented out

* Fixed typo in example

* Formatting

* More formatting

* Added missing semicolon

* Update to use UI signer

* Make visible on sidebar

* Combine some info from samples

* blockPeriod.toNumber() (oops, dropped that, reinstate)

* lifecycle bugfix for duplicate comments

* Kicked Intro, moved info to WRAPPER

* removed leftover <Intro /> import
2019-02-13 12:30:41 +01:00
Jaco Greeff
61674a7989
Add Signer interface for API (#683)
* Add Signer interface for API

* Attach signer to API instance

* Integrate signer with updates (untested)

* Update with working signer integration (logging an issue still)

* Restore console hooks, feedback on signed

* Remove unneeded console.log

* Marge install
2019-02-12 22:29:47 +01:00
Jaco Greeff
7b48e4e9d2 Wait for isReady before js exec (#701) 2019-02-12 16:43:01 +01:00
Jaco Greeff
ef82b7f58c
Adjust Editor/Output sizing (#697) 2019-02-12 11:13:25 +01:00
Stefanie Doll
061f346fd6
Sd 668 app console (#684)
* [app-js] fixed copyright

* [app-js] css fixes

* [app-js] Add api to window object

* Make CSS columns resizable (FF & Chrome)

* Window Interface export

* formatting

* Make columns responsive, added Dropdown

* Added code snippets

* Strip down output to functional component

* removed component state, removed onEdit, update on select

* Editor styling

* Added snippets and local storage

* output formatting

* Example dummies

* Cleanup & examples

* Added util & keyring @polkadot modules to window object

* Moved intro to component to make it translatable

* Added more RPC examples

* small fix

* WIP exaples

* Styles for resizer, fixed flex overflow misbehaviour

* remove code from snippets for options,

* Added labels to dropdown

* Examples

* More examples and removed deprecated examples

* Added labels to dropdown -> missing type decl.

* correst link to ui-keyring package

* Make tslint happy

* Pull api clone/disconnect into sd-668 (#686)

* JS playground & console (start something...)

* It runs...

* WIP

* Use codeflask

* Highlights

* Small updates, console v0.1 is ok to play with

* Bump

* Only shadow, no border (article)

* Allow API to be disposed of between runs

* Clone and disconnect API

* Move id generation (no need for constructor)

* Small updates

* Small type adjustments

* smaller fixes after code review

* updated yarn.lock

* move options calculation out of return

* Remove exposure of api to window object

* Expand JS console logging (#691)

* Expand JS console logging

* Log extrinsics directly

* switch to getDerivedStateFromProps()

* roll back ts versions

* react-i18next rollback to 9.0.2

* Lock  react-i18next to 9.0.2
2019-02-11 18:02:34 +01:00
Jaco Greeff
5df31ca256
Unsub from newHead snippet (#669) 2019-02-01 12:06:27 +01:00
Jaco Greeff
fb9cf70a71
Javascript & API console app (#666)
* JS playground & console (start something...)

* It runs...

* WIP

* Use codeflask

* Highlights

* Small updates, console v0.1 is ok to play with

* Bump

* Only shadow, no border (article)
2019-02-01 11:17:32 +01:00