41 Commits (573032ddae26b6a5ca541d31e426a82cfea4b973)

Author SHA1 Message Date
Michael Fix 6fd6d99a80
remove safari edge cases (#1273) 3 years ago
Michael Fix 711210e034
Fix `react-color` bugs (#1190)
* fix color picker styles

* fix rgba stringify on color picker change
4 years ago
Michael Fix cd7c6eb5c5
Clean up getCarbonImage (#1126)
* clean up getCarbonImage

* remove createObjectURL change

* bug fixes

* refactor getCarbonImage to use blobs/dataURLs only

* add console.error for copy to clipboard failures

* use blob.type for ClipboardItem

* add TODO
4 years ago
Michael Fix 419070e895
Snippets name input (#992)
* snippets name input

* set 'name' property

* code

* update snippet name in /snippets

* fix imports

* snippet name -> add a name
5 years ago
Michael Fix ae9b4445f1
run prettier with new config (#983)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
5 years ago
Michael Fix 17c0ac67b9
Upgrade dependencies (#981)
* upgrade deps

* bump dev deps

* upgrade react-codemirror2

* rename parser-bablyon to parser-babel

* update prettier options
5 years ago
Mike Fix a0c7fac3f8
update util 5 years ago
Viktor Nemes 191113aa5f Load selected lines from query params (#878)
* Make the editorRef as a required parameter of useGutterClickHandler

For the external line number selection it is required that we access the CodeMirror editor anywhere in the hook

* Refactor the line highlight logic to handle "unknown" lines as non-selected

Only execute the highlight when there is a valid selection (there are some keys set in state.selected)
Additionally also execute the highlight logic when the line numbers are not visible (E.g. line.gutter is falsy)

* Pass in the selectedLines from the query string and implement the pre-selection logic

* Rename useGutterClickHandler to better explain its function

* Adding nemesv as contributor

* quick tweak

* tweak
5 years ago
Mike Fix 43c00407f3 remove capitalize util 5 years ago
Michael Fix 3abed8be72 Old TODOs / PWA work (#866)
* old TODOs

* fix up old next-offline TODO

* undo changes

* add apple touch icon
5 years ago
Michael Fix 552a9c99be
Store Unsplash background image not dataturl (#836)
* store background image, not background selection in presets

* move localStorage into save utils

* curry omit util fn

* clean up manual image upload by URL

* refactor image changes

* separate uploadImage from selectImage

* upgrade visual regression testing tests

* add TODOs
5 years ago
Michael Fix 22a0f9f2c1 Import/export config (#771)
* import export config

* allow rendering button as link

* pass all props to button component

* fix invalid JSON path

* prevent dragging download URL

* address concerns
6 years ago
Mike Fix 02be1f6efe babylon -> babel 6 years ago
greenkeeper[bot] 31569fa164 Update escape-goat to the latest version 🚀 (#735)
* fix(package): update escape-goat to version 2.0.0

* chore(package): update lockfile yarn.lock

* fix naming for escape-goat

* use colornames packages
6 years ago
Sean a1e05af5c0 Custom themes (#632)
* Custom themes

* Fix theme selection

* fixes and add more theme highlights

* Fix remove bug

* change create button hoverBackground

* change id format

* fixes

* remove default highlights, style tweaks

* move consturctor to componentDidMount, create constants

* simplify color picker style api'

* replace notAllowed with disabled

* remove itemWrapperProps from Dropdown

* create itemWrapper class prop

* remove onClose from Dropdown

* fix ColorPicker and font sizes

* increase specificity of selector
6 years ago
Mike Fix f45d133d3c remove verifyPayloadSize from util 6 years ago
Mike Fix dbde17a65f reduce imports and exports 6 years ago
raboid 3aec3ebc28 Conditionally disable PNG export for Safari 6 years ago
Mike Fix 642749a701 use escape-goat 6 years ago
raboid 583e4ece73 Update BackgroundSelect to use Popout & ColorPicker 6 years ago
Mike Fix b5a1052b40 remove unused utils, move specific utils into component files 6 years ago
Mike Fix 33c2929897 must use CARBON_STATE for settings in local storage 6 years ago
Sean f6f0adee6b Add preset feature (#595)
* Add preset feature without create

* fix lint errors

* Add presets to Editor state

* add remove, update -> apply, omit presets

* replace name with index, add undo functionality

* fix reduce function

* Tweaks:

- Make remove filter setState atomic
- Remove broken sCU in BackgroundSelect
- Touch up style of arrow functions a little
- Remove titleBar from default settings
- Don't expose SETTINGS_KEYS
- Use hasOwnProperty instead of includes()

* refactor preset state into Settings

* move format code into editor and make it work again

* omit custom in applyPreset

* move presets array state into Settings

* keep custom sCU in BackgroundSelect

* pull out inline objects

* revert pages/index

* increase Presets font-size, remove margin-top

* Add ability to create presets

* also enable passing exportSize as prop

* move selectedPreset back into Settings (my bad Sean)

* replace splice with filter, getSavedX -> getX

* Revert "move selectedPreset back into Settings (my bad Sean)"

This reverts commit ae5da4700ea36ad7c31e697e83a2724be4b448f4.

* make sure background updates remove selected preset

* selectedPreset -> preset

* use onChange instead of selectPreset

* use preset id's instead of indexes

* bug fixes

* use disabled instead of pointer-events

* make .settings-presets-applied flex 💪

* make .settings-presets-arrow flex 💪

* move getPresets outside of `setState`

* move inline styles to style tag

* refactor using omitBy and isFunction

* remove lodash.isfunction

* fix applyPreset to disclude preset field

* move omit to getSettingsFromProps

* replace lodash.omit with omitBy solution

* .includes -> .indexOf

* add default preset and presetApplied state

* fix lint error

* remove presetApplied

* add more default presets

* fix default preset functionality

* tweaks

* preserve preset list scrollLeft b/w updates with a hack

* Use ref for preset content

* remove forwardRef
6 years ago
Michael Fix 6c9a09e522
Clean up (#481) (patch)
* clean up things

* introduce toggle fn

* remove constructor from Collapse (ignore)

* prettier (ignore)

* make Collapse a PureComponent (ignore)

* give ExportSizeSelect a display name (ignore)

* give ThemeSelect a display name (ignore)

* Toggle: displayName, PureComponent, remove constructor (ignore)

* Meta and Slider display names (ignore)

* remove ThemeSelect constructor (ignore)

* fix lint-staged, prettier
6 years ago
Mike Fix 20f9b5aa82 decoding from local storage bug fix 6 years ago
Mike Fix 0441205217 decode language html correctly 6 years ago
Michael Fix 0d2f2f4444
Code split and load prettier dynamically (#471)
* code split and load prettier dynamically;

* move prettier to dependencies
6 years ago
Farzad YZ 1747534921 WIP: integration with prettier (#469)
* add basic format with basic parser

* remove format loading

* change formatCode to be sync

* prettier adjustments

* prettier our code

* move prettify into settings menu
6 years ago
Mike Fix d0b02d53a5 Reuse escapeHtml 7 years ago
Michael Fix 2a52d101e7
Fix spinner position (#398) 7 years ago
Michael Fix 3bbb98a3a2
Revert "Refactor state components (#338)" (#348)
This reverts commit 0a59db56c8.
7 years ago
Michael Fix 0a59db56c8
Refactor state components (#338)
* WIP: Unstated works

* WIP: extract into its own file

* Container instance

* Remove unused variables

* Move toolbar children into Toolbar

* Extract our Coder interface

* Remove top level subscription

* Bug fix

* WIP

* Remove old dependencies

* Add import eslint plugin

* Rename components

- add createRef TODO [ ]

* Bug fixes

* Rename Coder -> CodeWindow

* Address comments

- Rename to variable
- Rename onDrop from Editor containers perspective

* More variable renaming
7 years ago
Michael Fix 5a4cdd7d7f
Lint and fix issues, don't add linting yet though (#293)
* Lint and fix issue, don't add linting yet though

* Clean up

* Remove /about href
7 years ago
Jake Dexheimer f79d01ad9b Add RandomImage component 7 years ago
Mike Fix abb0948324 Fix escape error 7 years ago
Mike Fix bb4eb1ed9a XSS localStorage 7 years ago
Jake Dexheimer cbc6824b83 Background image settings (#169)
* Implement drag-n-drop image for backgrounds

- Closes #122

* In progress

* Add background-size, background-position settings

* Add ReactCrop

* Remove old bg sizing sliders

* Add resize observer

* Fix typo

* Disable select on sliders

* onAspectRatioChange hook

* Rename to backgroundColor

* Fix state issues

* Add backgroundMode toggle

* Rename ColorPicker

* Add upload-image margin

* Minor font-size change

* Fix build
7 years ago
Jake Dexheimer ee0feeb527 Twitter colorpicker -> Sketch colorpicker 7 years ago
Michael Fix 0c365218d6 Load and store state from localStorage (#80)
* Load and store state from localStorage

* remove idea of localStorage from get and set state fns
7 years ago
Mike Fix 26ea4615f7 Fix Selecting a language and then going back to auto
- Closes #37
7 years ago
Jake Dexheimer d6b4db144a Default theme 7 years ago