Giter Club home page Giter Club logo

hadoukenio / core Goto Github PK

View Code? Open in Web Editor NEW
103.0 23.0 55.0 4.51 MB

Hadouken is an open-source platform for creating web applications with native desktop experience. Hadouken is the base project used to build OpenFin OS, a desktop operating layer used by 45+ major banks, buy-side and vendors to deploy hundreds of apps to over 400 financial firms.

Home Page: http://hadouken.io/

License: Other

JavaScript 34.85% TypeScript 63.62% HTML 1.53%
openfin

core's Introduction

Hadouken Core Build Status Join the HadoukenIO Community on Slack

Requirements

The following setup is known to be working well. You can try other versions at your own risk of losing a lot of time.

_______________

* Only needed on Windows

Building the project

Mac/Linux

npm install

Windows

You need to ensure that Visual Studio 2013 is used to build the project.

npm update -msvs_version=2015
npm install

Testing

  • Install the OpenFin cli tool
npm install -g openfin-cli

app.json

{
    "startup_app": {
        "name": "OpenfinPOC",
        "description": "OpenFin POC",
        "url": "http://www.openfin.co",
        "uuid": "OpenfinPOC-hla8ix6e0y2iwwjlxkojkbj4i",
        "autoShow": true
    },
    "runtime": {
        "arguments": "",
        "version": "[replace this with a version]"
    }
}
  • Launch OpenFin runtime once
openfin --config app.json --launch 
  • Replace the OpenFin core with a built Hadouken core
npm run deploy -- --target=C:\Users\[username]\AppData\Local\OpenFin\runtime\[replace this with a version]\OpenFin\resources
  • Now you can re-launch the OpenFin runtime with the modified Hadouken core.
openfin --config app.json --launch 

API Documentation

API Docs for the OpenFin core are available here:

Alpha

Stable

File Structure Notes

The contents of /src/renderer/extended folder is referenced by the openfin.asar (not contained in this project)

Contributing

  1. Fork it (https://github.com/HadoukenIO/core/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Read our contribution guidelines and Community Code of Conduct
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request

NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

Need an ICLA? Unsure if you are covered under an existing CCLA? Email [email protected]

License

The code in this repository is distributed under the Apache License, Version 2.0

However, if you run this code, it may call on the OpenFin RVM or OpenFin Runtime, which are covered by OpenFin's Developer, Community, and Enterprise licenses. You can learn more about OpenFin licensing at the links listed below or just email us at [email protected] with questions.

Copyright 2018-2019 OpenFin

https://openfin.co/developer-agreement/

https://openfin.co/licensing/

core's People

Contributors

agitana avatar anguslim avatar aziz512 avatar ben-drebing avatar boopenfin avatar bschwinn avatar cezarykulakowski avatar chuckdoerr avatar daniel-koc avatar datamadic avatar dcchuck avatar dhamberlin avatar harsimransingh avatar licui3936 avatar luiemilio avatar marekharanczyk avatar michaelmcoates avatar nicholasdgoodman avatar nikoganev avatar patpao avatar pbaize avatar rdepena avatar stevenebarbaro avatar tgoc99 avatar tomaszma avatar tomer-openfin avatar weiteho avatar wenjunche avatar whyn07m3 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  avatar

core's Issues

When an application is hidden using the tray icon, core notifications take 5 seconds longer to show

Issue:
When an application is hidden using the tray icon, core notifications take 5 seconds longer to show than they normally do.

How to reproduce:

  • Create an application (#1) with a tray icon.
  • Put an element on the DOM, and attach an click listener to it that hides the window.
  • Attach the same listener to the tray icon on click.
  • Create a separate application that sends an InterAppBus message to Application 1.
  • When Application 1 receives that message, have it create an OpenFin Notification.
  • Compare the time it takes to show the notification.

When you hide the window using the DOM Element click handler, notifications show up normally. However, if you hide the window using the tray icon, it takes significantly longer to show.

In verbose logs, take a look at the time elapsed between the create-notification and show-window actions. There is a 5 second delay between the events if you hide using the tray icon. If you hide using the DOM element, the difference is less than a second.

Add a convenience method to test for window existence

Given a UUID/window name pair, there currently isn't any simple way to check if the window exists. Only options are System.getAllWIndows, Application.getChildWindows, or Window.wrap - then test an API for success.

Would be very nice if we had something like Application.hasWindow(name); and/or System.hasWindow(uuid, name);

File download in the background

Hi,

Does openfin support background file download like in electron? Without invoking SaveAs dialog

const { BrowserWindow } = require('electron')
let win = new BrowserWindow({ width: 800, height: 600 })

win.webContents.downloadURL('hello.pdf')

The callback to `requestAnimationFrame` is never called when a `Window` is hidden

We noticed an issue with an application we are writing and I'm relatively sure that I've pinpointed the issue.

If JavaScript is being run in a window which is then hidden, at the point at which it is hidden requestAnimationFrame stops working. The API docs do not describe what the expected behaviour of this is or whether it is being backgrounded, however I suspect it is and understand that the default behaviour of most browsers is:

requestAnimationFrame() calls are paused in most browsers when running in background tabs or hidden <iframe>s in order to improve performance and battery life.

Presumably window#hide backgrounds a Window. Is that why requestAnimationFrames callback is never executed? Our application has been written so that it runs JavaScript in one window but renders into another, and currently the behaviour seems to mean that it will be impossible to use any libraries which use requestAnimationFrame (e.g. React 16). Ideally, we would like to be able to continue to do this, but ensure that the background is not throttled at all and that requestAnimationFrame still runs normally.

I notice that internally you are setting backgroundThrottling: false and we are not overriding this flag. I thought this was meant to ensure that setTimeout and setInterval are not slowed down and that requestAnimationFrame is still called.

I know you are loosely based on electron and hence share some of the same configuration. In fact, I think you have the same bug that Electron seems to have! I also found this related issue - maybe this implies that enabling requestAnimationFrame was never supported on hidden/backgrounded Windows?

What should the expected behaviour be? Is this broken? Will you fix it? Or will you consider this a feature request?

As you probably realise requestAnimationFrame is used frequently in modern libraries - for example, the new React reconciler Fiber makes frequent use of it (and I believe Angular uses it, too). If this can't be fixed, we will need to completely rethink the architecture that we were thinking of doing (for performance we were considering running the core JavaScript of our application in a hidden window while then rendering to multiple child windows).

Removing commercial source breaks the build system

Removing the commercial source as recommended results in a broken
build system.

It isn't clear from Hadouken.io or OpenFin resources which components
are open, and which are commercial. It is also unclear which subset of
the project is Hadouken, and which are OpenFin. The open and commercial
source are entangled and interdependent.

Removing commercial source from the core project would resolve any doubt and
encourage contributions.

Api to retrieve desktop owner settings for services

Api to retrieve desktop owner settings for services

RUN-5112

The goal is for services to be able to retrieve desktop owner level settings. Much of the details surrounding what these look like can be found here.

The proposed API would be added to the v2 System namespace as:

fin.System.getServiceConfiguration({name: 'whatever'})
    .then(conf => {
        conf.name               //=> whatever
        conf.appDirectoryHost   //=> https://app-directory.openfin.co
        conf.manifestUrl        //=> https://example.org/services/whatever/app.json
        conf.config             //=> {service specific json blob}
    })
    .catch(err => {/* xyz service is not configured in desktop owner settings file... */})

Do we care about which app directory it was fetched from here (appDirectoryHost)?

This assumes that service configurations are not "private" per se, meaning that any app can get any service configuration. To restrict this info to just the service itself we would need some work provide apps with the concept of being a service and an identity as such.

I think that there is a larger conversation around service discovery and the apps themselves actually knowing that they are being launched as services that needs more discussion.

Error: TypeError: _.foldl is not a function - using node v8.3.0

Hi there,

I'm following the build instructions on the README, but I get the error mentioned on the title; below the steps to reproduce, output and environment specs; full logs are available on https://gist.github.com/maoo/20fc62e6af91d58d94d0ea4dff887feb

Thanks!

Steps to reproduce

git clone https://github.com/HadoukenIO/core.git
cd core
npm install

Error

Error: TypeError: _.foldl is not a function
Warning: Task "ts:default" failed. Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! [email protected] postinstall: `grunt`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/m/.npm/_logs/2017-11-22T14_12_32_564Z-debug.log
------------------------------------------------------------

Environment

  • macOS High Sierra, 10.13.1
  • npm -v, no5.4.2
  • node -v, v8.3.0

Do you support installing extra DevTools into Electron?

I see no mention within the openfin documentation of tools like React DevTools and Redux DevTools. These types of tools are extremely useful for debugging modern applications. Has there been any thought into first-class support for them to improve the developer experience?

You could look into an approach like the one found in electron-devtools-installer as this might help you in coming up with a good approach for the feature.

As it stands I have to build/use standalone versions of the tools which isn't ideal.

Sorry, if I'm not meant to ask this here, but you've open-sourced so it felt like fair game! :)

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.