Commit Graph

138 Commits (44f658bb6962c00c034d6e5b1b64fa705a287e95)

Author SHA1 Message Date
Michael Fix b5ae198312
Fix Medium embedding workflow ()
* 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
Sean 69d12afc52 Add gist support to embed ()
* support gists in embed

* update GistContainer

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

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

* Update api.js
Michael Fix 223bccd6b1
read all api calls from context ()
Mike Fix 3187b6777a make titleBar uncontrolled
Joel Hanson 8d93c58fa6 Exported SVG is too large. ()
* 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+
Mike Fix d16df95bda use editor mount for loading instead of carbon's
Mike Fix 7fd9ecf829 Update where spinner occurs
Mike Fix 608392b517 use forward ref in carbon
Mike Fix 5dbed921d5 clean up editor state more with Spinner wrapper
Mike Fix 109adb4cb0 remove unused prop
Mike Fix eb8b3bdd49 move online/offline listeners into tweet button
Mike Fix 9cb4287a20 move tweet button into its own Comp w/ useAsyncCallback
Mike Fix 7b20d8744a regex tweak
Mike Fix b7bc227522 clean up <Carbon/> - remove resize-observer
Mike Fix 7fe3f3415f Use new version of dropperx
Michael Fix c842f34ef8
remove react-dnd dependencies + use react-dropzone instead ()
Mike Fix cacb93e09f fix issue
- Closes 
Michael Fix 80122adea6
Use dynamic import components ()
* use dynamic import components

 - react-color components
 - Watermark

* Dynamically import modes

* revert next.config.js

* update language filter
Sean a1e05af5c0 Custom themes ()
* 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
Mike Fix f45d133d3c remove verifyPayloadSize from util
Mike Fix dbde17a65f reduce imports and exports
raboid 3aec3ebc28 Conditionally disable PNG export for Safari
Mike Fix 794a50d3f3 fix # issues for SVGs
Closes 
raboid fdaa990ab2 Remove title prop from Button
raboid bf26e34f06 Update Editor to use Button
Mike Fix b12c3f802c lint and prettier
Sean 5206dc4ef1 Reduce updates caused by typing ()
* 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
Sean f6f0adee6b Add preset feature ()
* 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
Mike Fix 4a00206526 fix filter regex for encoded characters
Closes  (again)
Mike Fix 90a0ead95b move format code into editor and make it work again
Mike Fix a174c26067 fix another encoding bug...🤞
- Closes 
Mike Fix bb36e0062b fix tab characters in SVG
- closes 
Sean 38665cc34d Dropdown updates ()
* Add dropdown icons

* remove cursor pointer from icons
Michael Fix 5badd2fbbb
remove timestamp ()
Clean up
Sean 68d90364b0 New export menu ()
* New export menu

* Fix lint errors
Mike Fix 3b67c0a846 undo map even if conversion fails
Mike Fix 61ca421789 create Map of changes and undo them
- Closes 
Mike Fix f184e711c1 fix encoding issue for plain text
- Closes 
- Opens 
Michael Fix 246a2f648f
fix(Editor): use cloned element for calculating width ()
- Closes 
Michael Fix 6ab33153a8
Ability to name file downloads ()
* Ability to name file downloads

- Closes 

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

* reuse omit
Mike Fix 1067ab3429 Exports
Michael Fix bd695b7fd1
convert ids to classNames, use refs ()
Mike Fix e8f72be402 lint
Mike Fix 9a86e7e7c4 prepare
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
Mike Fix 1d85149a97 fix api.image call logic
Michael Fix 09fa737ca1
move localStorage.clear() to prop of Editor ()
Mike Fix 6fc3d2b5e1 use react-addons-shallow-compare for comparing state
Tim Neutkens 2e945fc528 Don't use custom history API ()
* 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
Michael Fix 6c9a09e522
Clean up () (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
Mike Fix 584a866bc1 fix comment
Michael Fix d3462bb961
Make `api` a prop of Editor ()
Michael Fix c22a8e2a0d
Remove gDSFP in Carbon ()
* remove gDSFP in Carbon

* add comment
Mike Fix b665dfc5f4 fix pathname issues when using next export
Mike Fix 20f9b5aa82 decoding from local storage bug fix
Mike Fix 0441205217 decode language html correctly
Mike Fix a16141bdfa fix default language dropdown
Michael Fix 0580e1c8e8
Separate API service, deploy frontend statically ()
* extract server into separate service

* fix basic tests with url.parse

* use Next withRouter

* remove old custom next rendering
Michael Fix a9b25e05a3
Performance improvements ()
* 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
Farzad YZ 1747534921 WIP: integration with prettier ()
* add basic format with basic parser

* remove format loading

* change formatCode to be sync

* prettier adjustments

* prettier our code

* move prettify into settings menu
Michael Fix 86be3aae35
update spinner for react-codemirror2 ()
Michael Fix 2abef908ce
encode text before reading the container width ()
* encode text before reading the container width

* isPNG
Michael Fix f018c454bf
Implement PWA functionality ()
* implement PWA functionality

* disable tweet button when offline

* just remove tweet button instead
Mike Fix f8a3499156 safari bug fixes
Vince Speelman a7159f87c2 feat(save): add "copy" button ()
* 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



* feat(save): open in a new window

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

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

* Add .DS_Store to .gitignore

* Add setting to toggle timestamp on file save

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

* move constant declarations up

* Use UNSAFE_cWRP

* remove duplicate TODO (whoops)
Michael Fix 89931eab59
Add linting back ()
Mike Fix dd5a996e72 Fix twitter bug
- Closes 
Michael Fix 3bbb98a3a2
Revert "Refactor state components ()" ()
This reverts commit 0a59db56c8.
Michael Fix 0a59db56c8
Refactor state components ()
* 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
Michael Fix 80cf355b44
Use gist language response ()
* Use gist language response

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

* 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
Michael Fix ce5cc92aa3
Editor refactors ()
Michael Fix 2276435fef
Fix svg using Blob URLs ()
Mike Fix 517aca7c8f Fix user upload bug
Steven Sacks 9e519e2b5f fix issue - load defaults, then localStorage, then url config ()
* fix issue  - load defaults, then localStorage, then url config

* update comment and also do not need current state
Mike Fix 81ad041f37 Fix opacity bug
- Closes 
Jake Dexheimer cf1e92b8cb Use Unsplash API ()
* 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
Michael Fix 5691236934
Refactor index.js ()
* 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