Giter Site home page Giter Site logo

phcode-dev / phoenix Goto Github PK

View Code? Open in Web Editor NEW
1.3K 22.0 97.0 164.45 MB

Phoenix is a modern open-source Code Editor for the web, built for the browser.

Home Page: https://phcode.dev

License: GNU Affero General Public License v3.0

JavaScript 72.77% HTML 24.12% CSS 1.04% Shell 0.03% PHP 0.12% Makefile 0.01% Clojure 0.01% Hack 0.01% Less 1.86% Handlebars 0.01% SCSS 0.02% Python 0.01% Sass 0.01%
brackets phoenix code html css editor ide web preview javascript

phoenix's People

Contributors

abose avatar bchintx avatar busykai avatar chrisbank avatar couzteau avatar dangoor avatar denniskehrig avatar eztierney avatar gruehle avatar ingorichter avatar jasonsanjose avatar jbalsas avatar jeffrybooher avatar joelrbrandt avatar larz0 avatar lkcampbell avatar miguelcastillo avatar mynetx avatar nethip avatar njx avatar peterflynn avatar pthiess avatar raymondlim avatar redmunds avatar swmitra avatar tommalbran avatar tvoliter avatar walfgithub avatar websitedeveloper avatar zaggino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phoenix's Issues

Setup lint task pre-push

eslint must run before a push is initialed.
We have removed this feature as part of node upgrade in the below pull requests.

Browser migration

Browser does not have nodejs env. We have to create remove node dep from brackets to port to the browser while maintaining the feature compatibility.

Stage 1 - Node runtime removal

Remove deprecated npm flows

Remove all node based default extensions.

  • brackets-eslint removed as part of this change
  • php tooling removed. Will not merge in phoenix core till we have dev request. #8
  • #7
  • #13
  • #14
  • #15
  • #16

Direct integration for their party deps instead of old NPM

Stage 2 - brackets functionality reinstate with node alternative libs in the browser

Build Nodejs compatibility layer in browser

Migrate functionality

Reinstate functionality

  • #51
  • #52
  • #209 - replaced with JSHint, marking as done as linter support is enaled. ESLint will be enabled only in installed builds.
  • #39
  • #38
  • #47
  • #67
  • #74

Remove old NPM based third-party installs.

As we are using deprecated node version 6.17, we need to remove old npm-based deps to enable node to upgrade. The deps in the third-party folder are tested and functional, so we will be keeping a copy in the source.

Reinstating functionality is done in #10

  • Code mirror #41
  • less #42
  • preact-compat #43
  • simulate-event #43
  • extend #43
  • acorn #43
  • preact #44
  • preact-test-utils #44
  • semver.browser.js #44

disable paste context menus in firefox.

Firefox does not support js initiated clipboard paste other than via extensions. Ctrl-c, Ctrl-V works though.

We should remove paste context menus from browsers that do not support navigator.clipboard functionality.

  • Edit>paste menu
  • document right click> paste
    @abose

help menu

Reinstate functionality removed as part of browser migration.

Large folders rename, copy and move issues in fs native libs

Large folders like node modules copy will result in a large number of copy errors. This is likely due to file descriptor overflows in the os. Similarly, rename with drag and drop of large node modules folder errors out in phoenix.

Possible fixes:

  1. Retry on failure with set immediate apis.
  2. Limit runtime error logging as it will reduce the number of errors to only 11 while copying 44,000 files instead of 10k range of failures.
  3. Changing parallel to serial copy using await on just the folders seriously reduced the speed of copy from 44k files in under 5 seconds to 1800 files in 2 minutes. Not recommended.
  4. Batch copies to like 1000 concurrent fileops happening at a time.

Deprecte JavaScriptCodeHints extension

Deprecate JavaScriptCodeHints extension based on node.

future action

  • We will be depending on "browser-hosted" language server protocol for code intelligence.

Remove OpenWithExternalApplication extension

  • The extension is based on custom platform-specific appshell/node code.
  • We cant really launch generic applications from the browser, applications would need to register custom URL protocols in the user's machine. Such configurations are not reliable right now. Deprecating this feature till there is a web stantard way to do this.

Update PWA UX

PWA support for chrome was added in #101

The install UI should be inline with brackets ux.

Port notes

TODO:

  • Update bootstrap to css than hardcoded.
  • DefaultMenus.js : // TODO: add js handlers for copy and paste using browser standards.
  • DebugCommands extension seems to not translate well to browser. reevaluate
  • Large number of jquery error for extension loading displayed in console. we need to fix it. #26

Extensions removed:

Build tools removed:

  • tasks/build.js tasks(build-prop, cla-check-pull, cla-check, nls-check
    • cla checks removed as we will be using github CI for cla checks.
    • Generate build number based on git commit id, git branch
    • translation completion check- check that src/nls/root keys are avilable in all other nls folders.
  • update-release-number.js task(update-release-number)
    • API version and general version. see removed code for details

submodule to module notes:

Notes

  • usdin yarn as it flattens node module deps in a browser friendly way

Unify dependency management

Modern dependency management

Brackets currently have redundant dep management which is creating unnecessary build complexity. We need to address this. More details can be found here: adobe/brackets#12006 . This is preventing the upgrade of several dependencies to the latest version.

solutions

Dynamic upgrade solution for Third party deps

We have nuked git submodules and old npm-based third-party dependencies. we should be able to update our third-party deps dynamically and without much effort. Investigate ways to do this.

part of #5

in third party

References

Optimizations

  • Minification for release builds (Remove unwanted source maps/src files)

Phoenix virtual file system(VFS)

In browser virtual file system

Phoenix will have a virtual in browser fs API compatible with nodeJS FS APIs. Currently, this is implemented with filer lib with indexedDB as the data storage backend. We will be adding support for the latest native file system access API in filer via #3 which will add local file access to phoenix leveraging the latest browser tech(Some limitations present, fs watch not supported in the browser yet). This issue tracks all tasks related to VFS creation in phoenix.

javascript codehints

  • Evaluate language server
  • JSUtils have undergone heavy refactoring. Check functionality.

Php tooling extension removed

Php tooling extension was removed as it was breaking builds due to possible private deps. As we are not targeting PHP as a primary dev env right now, removing the PHP extension.

Remove StaticServer extension

  • Static servers are not possible with the current web application framework
  • Remove StaticServer default extension.

notes

It is used for the experimental multi-browser live preview feature. But the multi-browser feature will not work anyway within browsers with the current web tech.

A possible option is to have a backend server from core.ai to proxy the requests(either at core.ai or phoenix agent locally installed(defeating the purpose of a true web app)), but it might be less instant, need to evaluate alternatives.

Image previews are not working

Problem 1

  • open a project with images.
  • Select any image in the project, the image is not drawn.

Problem 2

  • Open any HTML file with an img tag.
  • hover over the image tag. an image preview should appear.

We should fix the above workflows to get image previews.

language server support in the browser.

Language server support is essential for the future of phcode.dev. Language servers brings in code auto completion and advanced code assistance features inside phoenix. Almost all implementations currently in existence require node and the few that work in the browser(ts language server) run only in vscode.dev.

We should find a way to browserify popular language servers in pure browser-based environments. This will help web-based code editors like us and others to provide advanced IDE-like features in the browser.

Language server in Browser and mobile devices

While this is fairly possible if we have a node engine(Eg. in native windows/mac/Linux) builds, We will hit a roadblock if we have to deploy a code editor in the browser or mobile devices like android or ios.

The best case is to be able to run language servers in the browser. As browser environments are readily available in mobile platforms as well as desktops/servers, this will help develop a universal language server component that can work in any device with a browser environment.

Feature requirements Phase 1

Phoenix should support the following language servers out of the box as a pure browser client:

  • Generic infrastructure to run language servers in browser and language server client for phcode.dev
  • Should work in mobile/desktop browsers and web views.
  • Language intelligence should be in the web worker when possible.
  • Account for Remote language server support for remote/cloud projects.
  • Typescript/Javascript language server integration based on our in-browser LSP infra. Javascript code intelligence in phoenix is best to be deprecated in favor of an LSP-based implementation.

Feature requirements Phase 2

  • Angular Language Service
  • React language server. This appears to come free with Typescript language server. Phoenix currently has limited support for react language intelligence with our own implementation using ternjs.
  • Extensibility API for third party language servers integration
  • vue/vite/other frameworks that are in demand by our users.

Related issues:

  1. #587
  2. #682
  3. #166
  4. #8
  5. #762

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.