-
- Downloads
Web IDE & CodeSandbox
This enables JavaScripts projects to have live previews straight in the browser without requiring any local configuration. This uses the CodeSandbox package `sandpack` to compile it all inside of an iframe. This feature is off by default and can be toggled on in the admin settings. Only projects with a `package.json` and a `main` key are supported. Updates happen in real-time with hot-reloading. We just watch for changes to files and then send them to `sandpack` to allow it to reload the iframe. The iframe includes a very simple navigation bar, the text bar is `readonly` to stop users navigating away from the preview and the back and forward buttons just pop/splice the navigation stack which is tracked by a listener on `sandpack` There is a button inside the iframe which allows the user to open the projects inside of CodeSandbox. This button is only visible on **public** projects. On private or internal projects this button get hidden to protect private code being leaked into an external public URL. Closes #47268
parent
f3b36ac1
No related branches found
No related tags found
Showing
- app/assets/javascripts/ide/components/panes/right.vue 30 additions, 3 deletionsapp/assets/javascripts/ide/components/panes/right.vue
- app/assets/javascripts/ide/components/preview/clientside.vue 171 additions, 0 deletionsapp/assets/javascripts/ide/components/preview/clientside.vue
- app/assets/javascripts/ide/components/preview/navigator.vue 147 additions, 0 deletionsapp/assets/javascripts/ide/components/preview/navigator.vue
- app/assets/javascripts/ide/constants.js 3 additions, 0 deletionsapp/assets/javascripts/ide/constants.js
- app/assets/javascripts/ide/index.js 7 additions, 1 deletionapp/assets/javascripts/ide/index.js
- app/assets/javascripts/ide/stores/getters.js 3 additions, 1 deletionapp/assets/javascripts/ide/stores/getters.js
- app/assets/javascripts/ide/stores/mutations.js 8 additions, 1 deletionapp/assets/javascripts/ide/stores/mutations.js
- app/assets/javascripts/ide/stores/mutations/file.js 1 addition, 1 deletionapp/assets/javascripts/ide/stores/mutations/file.js
- app/assets/javascripts/ide/stores/state.js 1 addition, 0 deletionsapp/assets/javascripts/ide/stores/state.js
- app/assets/javascripts/ide/utils.js 6 additions, 1 deletionapp/assets/javascripts/ide/utils.js
- app/assets/stylesheets/page_bundles/ide.scss 41 additions, 0 deletionsapp/assets/stylesheets/page_bundles/ide.scss
- app/helpers/application_settings_helper.rb 2 additions, 1 deletionapp/helpers/application_settings_helper.rb
- app/views/admin/application_settings/show.html.haml 23 additions, 0 deletionsapp/views/admin/application_settings/show.html.haml
- app/views/ide/index.html.haml 4 additions, 1 deletionapp/views/ide/index.html.haml
- changelogs/unreleased/ide-codesandbox-poc.yml 5 additions, 0 deletionschangelogs/unreleased/ide-codesandbox-poc.yml
- config/dependency_decisions.yml 24 additions, 0 deletionsconfig/dependency_decisions.yml
- db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb 20 additions, 0 deletions...de_client_side_preview_enabled_to_application_settings.rb
- db/schema.rb 1 addition, 0 deletionsdb/schema.rb
- locale/gitlab.pot 27 additions, 0 deletionslocale/gitlab.pot
- package.json 2 additions, 0 deletionspackage.json
Please register or sign in to comment