77 Commits (573032ddae26b6a5ca541d31e426a82cfea4b973)

Author SHA1 Message Date
Mike Fix 3aef99b033
fix register on dev 3 years ago
Michael Fix 0e7fc9f916
Try out next-pwa (#1056)
* try our next-pwa

* remove unregister

* skip waiting
3 years ago
Mike Fix c733d8dd93
make main window flex box so announcement always renders correctly 4 years ago
Michael Fix e0ed4bebdc Merge in 4.0.0 (#850)
* merge in 4.0

* dev mode with firebase impl

* useReducer for toasts state
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 4ec70a2bf6
Repository changes from org change (#840)
* dawnlabs -> carbon-app

* update READMEs

* remove logo from translated readmes

* change project link

* update license

* remove case study link from translated READMEs
5 years ago
Michael Fix e82e95c093
use eitherx to implement index page boundary (#805) 5 years ago
Mike Fix 4aef628b00 don't save fontUrl to localStorage 6 years ago
Mike Fix dff5013edd move editor container into its own component 6 years ago
Mike Fix 0db4a89e72 simplify theme state logic 6 years ago
Mike Fix 132c0f6d5a make filename input uncontrolled 6 years ago
Michael Fix c56919cab3 Simplify routing code (#729)
* simplify routing code

* fix en/decode mapping logic
6 years ago
raboid ed1293c98a fix omit call 6 years ago
raboid 4dea566193 rework logic 6 years ago
raboid d620f0d5aa replace updateTheme and updateHighlights with updateState 6 years ago
Mike Fix abbb9d99d4 Revert "simplify sw unregister"
This reverts commit 27f8e1c7b6.
6 years ago
Mike Fix 27f8e1c7b6 simplify sw unregister 6 years ago
Sean d4d0ef9949 update gist handling (#715)
* update gist handling

* address comments

* clean up a bit

* getRouteState(router)

* move try/catch into getGist

* updateQueryString -> updateRouteState

* clean up more

* add cypress tests

* delete comments

* remove wait
6 years ago
Michael Fix 9ddb821fa4
only register service-work for editor (#710) 6 years ago
Michael Fix 223bccd6b1
read all api calls from context (#691) 6 years ago
Michael Fix 93c57d2b5d
debounce updating query string and localStorage (#664)
* debounce updating query string and localStorage

* memoize meta components

* fix tests
6 years ago
raboid 40ba1e0f9e update meta 6 years ago
Sean 5206dc4ef1 Reduce updates caused by typing (#604)
* prevent index page from updating

* implement shouldComponentUpdate for ExportMenu

* replace componentDidUpdate with updateState in Editor

* replace shallowCompare with React.memo

* add flex-basis to prevent jank
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 6ab33153a8
Ability to name file downloads (#562)
* Ability to name file downloads

- Closes #561

* fix codemirror-graphql
6 years ago
Michael Fix 20df18ebec
tune component updates and bump codemirror polling to hit 60 Hz (#493)
* tune componenet updates and bump codemirror polling to hit 60 Hz

* reuse omit
6 years ago
Mike Fix c0ff116de8 embeds
expose CodeMirrorLink, load only necessary theme in embed

implement copy button in Carbon window controls

add copy to queryParam

use next/head and metatags in /embed

make editor have router prop

fix now.json rewrites

allow local stylesheets in embed
6 years ago
Michael Fix 09fa737ca1
move localStorage.clear() to prop of Editor (#484) 6 years ago
Mike Fix 6fc3d2b5e1 use react-addons-shallow-compare for comparing state 6 years ago
Tim Neutkens 2e945fc528 Don't use custom history API (#485)
* Add shallowEquals check for onUpdate

* Using Next.js Router instead of custom history API

Fixes https://github.com/zeit/next.js/issues/4994

* Remove urlObject code
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
Michael Fix d3462bb961
Make `api` a prop of Editor (#480) 6 years ago
Michael Fix 0580e1c8e8
Separate API service, deploy frontend statically (#474)
* extract server into separate service

* fix basic tests with url.parse

* use Next withRouter

* remove old custom next rendering
6 years ago
Mike Fix d0b02d53a5 Reuse escapeHtml 7 years ago
Michael Fix 89931eab59
Add linting back (#349) 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 80cf355b44
Use gist language response (#343)
* Use gist language response

* Use gist language response - fix when no queryparams are given (#344)

* fix when no queryparams are given
e.g. http://carbon.now.sh/3208813b324d82a9ebd197e4b1c3bae8 would still not set the language property because the initialState is null

* move gist language to its own test

* Update test
7 years ago
Michael Fix ce5cc92aa3
Editor refactors (#336) 7 years ago
Michael Fix 5691236934
Refactor index.js (#310)
* Move Editor to components

* Separate index and editor a little

* Revert dynamic import of hljs b/c it's critical

* Move query param update to index.js

* Clean up editor further
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
Andrew 3cbcb49c27 Remove semicolons 7 years ago
Andrew Dassonville 7e69ca2897 Add prettier 7 years ago
Jake Dexheimer 7687ccd05d Refactor into Page component 7 years ago
Jake Dexheimer 9b1187a9ae Better theme defaults 7 years ago
Jake Dexheimer 1bba205853 Wire-up window theme functionality 7 years ago
Jake Dexheimer 85b193e1f1 Make pretty 👻 7 years ago
Mike Fix cb3a9093b3 Move Header and Footer into separate files 7 years ago
Mike Fix 7dac7ae15c Add dnd container (doesn't render?). Make top level settings single source of truth 7 years ago
Jake Dexheimer 8272d81753 Merge branch 'master' into toolbar 7 years ago