150 Commits (693ff6cafd7e5e2f4891935914b0ddee752b055f)

Author SHA1 Message Date
Mike Fix ae9dde35c5 remove 'delete's 6 years ago
raboid 03b5b65613 fix spread 6 years ago
raboid 5f939ac3b4 cleanup 6 years ago
raboid 4dea566193 rework logic 6 years ago
raboid 8c2ce87c45 remove key 6 years ago
Mike Fix 1c1b1cb2f9 clean up 6 years ago
raboid d620f0d5aa replace updateTheme and updateHighlights with updateState 6 years ago
raboid e02bbc4832 address comments 6 years ago
raboid 10f2c3e390 remove ref 6 years ago
raboid 2ae529e404 support theme highlights in query string 6 years ago
Michael Fix afa63c3653
remove mutation observer (#723) 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 b5ae198312
Fix Medium embedding workflow (#707)
* fix url encoding to support direct pastes to medium

* move check for object keys length to getQueryStringState

* remove url parse from GistContainer

* use useMemo instead of memo

* remove decode()

* add copy URL button to export menu
6 years ago
Sean 69d12afc52 Add gist support to embed (#703)
* support gists in embed

* update GistContainer

* make init function have more generic naming
6 years ago
Michael Fix b2cb16a31f
Refactor disable PNG (#701)
* pull disabled state into ExportMenu

* use useOnline hook from the tacklebox
6 years ago
Mike Fix 9b69069279 remove double await 6 years ago
Michael Fix 9077260a3e
Read config from gist (optional) (#692)
* read config from gist

* Update api.js
6 years ago
Michael Fix 223bccd6b1
read all api calls from context (#691) 6 years ago
Mike Fix 3187b6777a make titleBar uncontrolled 6 years ago
Joel Hanson 8d93c58fa6 Exported SVG is too large. (#683)
* The svg had initially contained all the fonts which are not need, so removed the fonts which we don't use using regex.

* Added my name to the contributors list.

* README.* updated

* unwanted regex string removed

* update ' ' to be \s+
6 years ago
Mike Fix d16df95bda use editor mount for loading instead of carbon's 6 years ago
Mike Fix 7fd9ecf829 Update where spinner occurs 6 years ago
Mike Fix 608392b517 use forward ref in carbon 6 years ago
Mike Fix 5dbed921d5 clean up editor state more with Spinner wrapper 6 years ago
Mike Fix 109adb4cb0 remove unused prop 6 years ago
Mike Fix eb8b3bdd49 move online/offline listeners into tweet button 6 years ago
Mike Fix 9cb4287a20 move tweet button into its own Comp w/ useAsyncCallback 6 years ago
Mike Fix 7b20d8744a regex tweak 6 years ago
Mike Fix b7bc227522 clean up <Carbon/> - remove resize-observer 6 years ago
Mike Fix 7fe3f3415f Use new version of dropperx 6 years ago
Michael Fix c842f34ef8
remove react-dnd dependencies + use react-dropzone instead (#648) 6 years ago
Mike Fix cacb93e09f fix issue #647
- Closes #647
6 years ago
Michael Fix 80122adea6
Use dynamic import components (#642)
* use dynamic import components

 - react-color components
 - Watermark

* Dynamically import modes

* revert next.config.js

* update language filter
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 794a50d3f3 fix # issues for SVGs
Closes #640
6 years ago
raboid fdaa990ab2 Remove title prop from Button 6 years ago
raboid bf26e34f06 Update Editor to use Button 6 years ago
Mike Fix b12c3f802c lint and prettier 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
Mike Fix 4a00206526 fix filter regex for encoded characters
Closes #564 (again)
6 years ago
Mike Fix 90a0ead95b move format code into editor and make it work again 6 years ago
Mike Fix a174c26067 fix another encoding bug...🤞
- Closes #564
6 years ago
Mike Fix bb36e0062b fix tab characters in SVG
- closes #586
6 years ago
Sean 38665cc34d Dropdown updates (#585)
* Add dropdown icons

* remove cursor pointer from icons
6 years ago
Michael Fix 5badd2fbbb
remove timestamp (#583)
Clean up
6 years ago
Sean 68d90364b0 New export menu (#582)
* New export menu

* Fix lint errors
6 years ago
Mike Fix 3b67c0a846 undo map even if conversion fails 6 years ago
Mike Fix 61ca421789 create Map of changes and undo them
- Closes #564
6 years ago
Mike Fix f184e711c1 fix encoding issue for plain text
- Closes #569
- Opens #564
6 years ago
Michael Fix 246a2f648f
fix(Editor): use cloned element for calculating width (#568)
- Closes #564
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 1067ab3429 Exports 6 years ago
Michael Fix bd695b7fd1
convert ids to classNames, use refs (#488) 6 years ago
Mike Fix e8f72be402 lint 6 years ago
Mike Fix 9a86e7e7c4 prepare 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
Mike Fix 1d85149a97 fix api.image call logic 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
Mike Fix 584a866bc1 fix comment 6 years ago
Michael Fix d3462bb961
Make `api` a prop of Editor (#480) 6 years ago
Michael Fix c22a8e2a0d
Remove gDSFP in Carbon (#477)
* remove gDSFP in Carbon

* add comment
6 years ago
Mike Fix b665dfc5f4 fix pathname issues when using next export 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
Mike Fix a16141bdfa fix default language dropdown 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
Michael Fix a9b25e05a3
Performance improvements (#458)
* Performance improvements

- Use font-display: swap
- Preload CSS links
- Compress all request payloads

* inline react spinner css

* remove @zeit/next-css, move custom themes to static

* update contributing docs

* spinner styles

* move spinner back to top level

* load codemirror synchronously
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
Michael Fix 86be3aae35
update spinner for react-codemirror2 (#470) 6 years ago
Michael Fix 2abef908ce
encode text before reading the container width (#466)
* encode text before reading the container width

* isPNG
6 years ago
Michael Fix f018c454bf
Implement PWA functionality (#455)
* implement PWA functionality

* disable tweet button when offline

* just remove tweet button instead
6 years ago
Mike Fix f8a3499156 safari bug fixes 6 years ago
Vince Speelman a7159f87c2 feat(save): add "copy" button (#441)
* feat(save): add "copy" button

add a button to the save menu called "copy", which opens the raw image data in the window so users
can directly copy it for easy pasting into a variety of apps

#49

* feat(save): open in a new window

update the action to open in a new window and rename it to "open"

* simplify open logic
6 years ago
Mike Fix fd9de34410 fix uri encoding for PNGs 6 years ago
Mike Fix 0525a9fcca Pull out formatTimestamp into function 6 years ago
erick d0d3589dc4 Add optional timestamp to saved file names (#430)
* Add timestamp to file name save

* Add .DS_Store to .gitignore

* Add setting to toggle timestamp on file save

* Tweak timestamp format
6 years ago
Mike Fix 926ba9224f Fix % encoding issue 6 years ago
Mike Fix 7b9c31101e Fix replace &nbsp; 6 years ago
Michael Fix 2a52d101e7
Fix spinner position (#398) 6 years ago
Brian Dennis d885b63b3a add alt text support for Twitter images (#372)
* add alt text support for Twitter images

* move constant declarations up

* Use UNSAFE_cWRP

* remove duplicate TODO (whoops)
6 years ago
Michael Fix 89931eab59
Add linting back (#349) 7 years ago
Mike Fix dd5a996e72 Fix twitter bug
- Closes #347
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 2276435fef
Fix svg using Blob URLs (#332) 7 years ago
Mike Fix 517aca7c8f Fix user upload bug 7 years ago
Steven Sacks 9e519e2b5f fix issue #321 - load defaults, then localStorage, then url config (#322)
* fix issue #321 - load defaults, then localStorage, then url config

* update comment and also do not need current state
7 years ago
Mike Fix 81ad041f37 Fix opacity bug
- Closes #317
7 years ago
Jake Dexheimer cf1e92b8cb Use Unsplash API (#301)
* Add unsplash-js, isomorphic-fetch

* /unsplash route/handling

* RandomImage use unsplash api

* Implement Photographer accredidation

* Add referral link

* Fetch photographer profile_url from unsplash api

* Change credit copy

* Add PhotoCredit component
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