Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make code editor resizable and detachable #7

Merged
merged 14 commits into from
Nov 13, 2018

Conversation

jackhurley23
Copy link
Contributor

This PR implements both a resizable editor, and a detachable editor.

The resizing is implemented using re-resizable and the detachable editor is implemented with react portals. See here for external window/portal inspiration.

Demo:
https://cl.ly/909106ad4a23

Limitations:
The new window needs to be focussed by the user before the code renders.
The window.open gets blocked by the browser, not sure if there are approaches here to avoid this.
Basic testing in latest Chrome/Safari/FF

@markdalgleish
Copy link
Member

markdalgleish commented Nov 8, 2018

This looks so good! 👏🏻😍

It'd be cool to use an icon for the undock action. The icon Chrome DevTools uses is pretty good: screen shot 2018-11-09 at 9 48 53 am

@markdalgleish markdalgleish changed the title Resizable and detachable code editor feat: Make code editor resizable and detachable Nov 8, 2018
package.json Outdated
@@ -83,8 +84,10 @@
"webpack-merge": "^4.1.4"
},
"devDependencies": {
"@babel/plugin-transform-react-constant-elements": "^7.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this dependency still need to be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svgr/webpack lists it as an internal dependancy but without manually adding it I'm getting Error: Cannot find module '@babel/plugin-transform-react-constant-elements' . I'll look into it

@markdalgleish markdalgleish merged commit ae41dd0 into seek-oss:master Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants