Code Monkey home page Code Monkey logo

h2's Introduction

H2

Inspired by being lazy, a hook-in and up system, supporting light weight extensions for heavy task lifting.

Installation

Contributing

# Clone this repository

git clone https://github.com/h2org/h2-core

# Go into the repository

cd h2-core

# Install dependencies

npm install

# Run the app

npm start

Bug

Known Bugs

License

MIT

h2's People

Contributors

1mg-shashwat avatar aniket965 avatar benjamin-davies avatar dependabot[bot] avatar donut87 avatar edvein-rin avatar emp-daisy avatar ganny26 avatar gloriousducks avatar iblacker avatar jainaman224 avatar jfstn avatar ming060 avatar msdeibel avatar ojasgulati avatar poush avatar pushpinder107 avatar saravanan10393 avatar stefangutnickallen avatar tamtamchik avatar tunedmidja avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

h2's Issues

Remove yarn files

Currently, we are not using yarn as the main dependency manager so instead of keeping two lock files by npm and yarn both, we should keep only npm one for now until we decide to switch to yarn completely. Therefore, both yarn files need to be removed from the database and to be added into .gitignore.

Add a pull request template.

For now the only requirement is to add "Tracking Issue: #XX" in the PRs. This ensures that each PR which is fixing some issue is linked. Also, add a comment stating that "if you are directly creating a PR then please create an issue for it as well"

Add a GIF in the ReadMe

Add a GIF (lightweight) instead of the static image in the readme file, which shows how to use the H2. Make sure to remove the current image from the repository as well and the new GIF should be uploaded on the img directory.

Inconsistent code style

The javascript code for H2 has varying code styles. This can make the code hard to read and discourage new contributors.

There is inconsistent semicolon usage, mixed let and const for importing variables, and mixed function declarations and expressions. I have also come across ternary conditional operators being used as statements instead of ifs.

These differences are most notable in the main.js createWindow and createMenuTray functions.

I propose that a linter should be added, probably ESLint.

Add presentation and documents mode

This will allow people to paste direct links to presentation or documents (pptx, odp, doc, etc) files which will be opened in proper mode for viewing.

Before starting work, make sure to search and discuss the appropriate framework for it.

Create a guide for mac and linux.

This app is currently being tested on mac and linux as it is being developed. So, two guide files,
"guide/mac.md" and "guide/linux.md" has to be created which contains steps to run this project from scratch in these systems. Also need to include any pre-requisite like installing nodejs if not installed already.

You can also create bash scripts which will do the all installation things after downloading. Please put them at "install/mac.sh" or "install/linux.sh". (Not required right now but useful)

Refactor globalshortcuts

The idea is to create an action manager. With this, the H2 will be divided into 3 parts.

Action Manager -> Service Providers -> Renderer Output

Where Action Manager sits like a firewall. Every input to the H2 passes through ActionManager and the all business logic and what to do with the input will be decided by Service providers. These service providers are responsible for directing the result to the proper output channel and finally, the output channel is responsible for showing the result.
This architecture will allow plugins can be injected into any of the 3 parts (Yet to implement)

Sticky notes mode in H2

I'm thinking of a sticky note feature in the H2 app. Please do make sure that the idea is finalized here before you make any PR and do share your thoughts and implementation ideas for this.

I have an idea to use different windows of electron app to create sticky notes. Each sticky note is basically a browser window with no frames and transparent window such that only notepad shape page will visible and can be used to add notes. Interestingly, what I am trying to imagine is the old and classic "Clippy" of the Microsoft office excel
clippy

This is something just came out of the mind. We have to curate it first and then finalize it. Suggestions and ideas are most welcome.

Improvements needed in Contribute section of README

The contribute section of README is highly lacking. The steps demonstrate how to run the application with the current state of the repo but doesn't help very much with contribution part. For example, it doesn't include how to make the changes and making a pull request from the contributor's fork (I think that's the model being followed).

Opening this issue to discuss how to approach this. We can go multiple ways: improving the section under README or creating a new CONTRIBUTING doc with more extensive branch policies, pull request template.

Corrections to Docs for Latest Shortcuts

The current documentation for shortcuts reflects that Fullscreen is unavailable pending merge of PR that has since been completed, and once #80 is merged in then the play/pause will be out of date as well.

Creating issue to correspond witht PR being opened to resolve both issues.

Consider using a different video player

Perhaps it would be worth considering using a video player other than YouTube's iframe API.
One that I found recently is called Plyr. (I haven't tried it myself though, so can't confirm if it's suitable.) The advantage would be more control over the look of the player, and if the player supports different video sources(Plyr apparently supports YT, Vimeo, and HTML5 video) the APIs to control the playback would be standardised (so no writing separate code to control YouTube video versus an HTML5 video link for example)

Limit draggable region when docs are opened.

Currently, the whole body area of the app can be used to drag the H2. This is useful in the scenario of videos but for documents like Google docs or PDF files, it blocks the selection of text. Therefore, we should think of some way to make it work in documents case. I think the easiest way would be to limit the area of drag region in this specific case.

Improve readme file

There are a few improvements I can propose, feel free to suggest yours.

  • Add features mentioned on first two lines in a proper format like in the numbered list.~
  • Add a GIF (lightweight) instead of the static image, which shows how to use it. (Thanks @rouzbehhz for using such examples in PRs)
  • In the contribution section, add two subsections. First is to contribute by code, second is to contribute by testing on your system and reporting any bugs over issue channel.

Feel free to pick any of them. Do mention if you start and please do suggest yours here.

In transparency mode the app should be unfocusable

The translucent mode is there for someone to work while watching or having any content over H2. A simple scenario would be a full-screen editor running with some tutorial running on H2. For this, we should think of a way such that if the translucent mode is enabled then the clicks and cursor over H2 should not focus the H2 app, instead, keep focusing the app running just behind of H2

Improve the providers, add support for authentication

Currently, providers start with some basic methods by implementing the baseMediaProvider class. What we have to do is to improve the providers on two things:

  1. Conventions: We have to make sure file names are good, conventions are taken care of in files names as well as in the coding style and therefore fix them.

  2. Add Support for authentication: Consider those websites which have the requirement for authentication to access the specific resource requested. Now, we might not be able to automate due to several reasons including CSRF but can we improve the experience. Suppose, the user wants to use Netflix in the H2 app and if the user tries to paste the URL of a specific movie, and we open it as a link then it will be redirected to login page. The issue is that in many cases after login user gets redirected to the home page instead of the original URL. Currently, I don't have the exact solution to this, we have to find one which can enhance the experience.

Test it on windows and create a doc

  1. First test it on your windows platform
  2. Next please create a "guides/window.md" file with the instructions to set it up on windows with all steps from installing node or any other pre-requisites specific to windows.

Create app icon

Please make sure, you don't copy any copy protected materials and provide a proper attribution requirement on the PR if needed (even if it is your creation and you want attribution)

Please make sure you submit all icons at `icons/.file-extension. The one which will be finalized to use will be decided later on first beta release but all PRs will be merged.

Disappearing Window Related to Fullscreening

@poush observed in testing that it was possible to full screen H2, access another window and press Esc, and then lose the H2 window.

I was unable to re-produce on Ubuntu 18.04 or Windows 10, so this potentially may be a bug with Mac specifically. This may also be fixed now by the "Esc" shortcut being converted to a local shortcut, but documenting in the event this issue still persists for some users.

Add Frame to Allow Cursor Support in Fullscreen

A frame needs to be added to facilitate being able to control the fullscreen window by means of a mouse as well. For example, in Chrome if your window is fullscreeened you are still able to access a button by mousing over the top region of the screen to access an Exit button.

@poush reported that the frame was not working as intended on MacOS and I reproduced the same on Windows 10 and Ubuntu 18.04.

Add translucent mode

Let's add the experimental version, then we might be able to create scenarios and conditions when to turn it on automatically.

In experimental version, it will be enabled by a hot key say, alt shift t

Support for Vimeo Videos

Support for Youtube is great, but it would be amazing if users can also paste vimeo videos and play just like youtube.

Creating this issue for my PR

create a basic landing page for release

This page will be hosted on gh-pages and will be a basic page that includes screenshots, links to the guides to install (which are markdown files in this repo) and link to download (which will be a blank link right now) and some basic list of features ( there aren't much right now)

H2 can work on these features as of now:

  1. Can run youtube
  2. Can run pdf and google docs file
  3. After #22 it will have a basic image editor, so we can include this as well.

Please send the PR on gh-pages branch

You can take templates from gh-pages or anyone from open source.

Add hot keys support.

Need to ensure that the hotkeys don't affect the other hotkeys in any OS.

  1. To play the video
  2. To pause the video
  3. To mute the video
  4. To open a prompt where a user can paste URL [ Not Confirmed ]

Add a hot key to make it full screen and vice-versa

A key combination, most probably, option/alt+ shift + f or any better which doesn't coincide with system and browser keys. Pressing this combination will make the screen show in full screen and again will make it resize to original size and position.

Preventing play/pause of video on dragging.

After today's changes, I can move the whole H2 by dragging it from anywhere in its body. Now, the new issue is when you stop dragging and put it somewhere on your screen, a playing video gets paused and vice-versa.
There must be some way to prevent that.

Fails to start on Windows 10

System

Windows 10 1803
Node 5.4.1

Repro

git clone https://github.com/poush/h2
cd h2
npm install
npm start

Error message

App threw an error during load

C:\temp\h2\ServiceProviders\providers.js:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import {youtubeProvider} from './MediaProviders/youtube'
                                                                                                                                                           ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:606:28)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\temp\h2\main.js:3:20)

Add a shortcut key to quit application

I realize when testing the actively developed branched or the alpha release, there can be a scenario when the app might become unresponsive and window frame controls get frozen. To ensure, there is an option to exit the app in any of such cases, we should consider adding a shortcut which will quit the application as the usual one won't work at least in OSX as the app runs without dock and menu. I would suggest here
Cmd/Control + H + Q which will call app.quit()

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.