Giter Club home page Giter Club logo

current-task's Introduction

Project status:

  • ๐Ÿ”ง In maintenance mode
    • New features will not be added.
    • A best-effort attempt will be made to keep the current functionality working on Windows. The app will likely work on Mac as well.
    • The underlying Electron version will not be upgraded as long as it doesn't prevent the app from working on Windows and it doesn't create a major security issue. Note that typical Electron vulnerabilities do not affect this app, since the app does not process arbitrary potentially-malicious third-party content (the only third-party content it processes comes from the official Todoist and Trello APIs). Known vulnerabilities currently used Electron version: https://snyk.io/test/npm/electron/10.2.0.
  • ๐Ÿ”’ Not looking for code contributions from other developers

CurrentTask

This is a desktop app that helps you to focus on one task at a time.

For more information about the app itself, please see the website.

Basic functionality Windows

Basic functionality Mac

Development

Technology

The application is built using Electron. This allows using languages like JS, HTML and CSS that a lot of people are familiar with. It also makes it relatively easy to support multiple operating systems. Drawbacks are the relatively high memory use (compared to what you would expect from native code) and the fact that Electron has some bugs/limitations that we sometimes need to work around.

The application's code is bundled using Webpack. This affects the way pages are loaded into windows (using magic global variables provided by Electron Forge) as well as the way the pages load the JS, CSS and images they depend on (configured using config.forge.plugins in package.json and the top-level webpack configuration files). See also Electron Forge Webpack documentation.

Running the app locally

It's recommended to install dependencies using npm ci to avoid any version mismatches.

You can run the app using npm run start, which will also generate the JSON Schema used to validate the advanced configuration file. If the schema is already there, you can choose to skip this schema generation step by running the app using npm run start-no-generate.

Build scripts

The prepare-make script defines several checks that should pass for every commit that is made (enforced using a pre-commit hook defined by Husky):

  • Code should be formatted according to Prettier code style. This is easy to achieve by using VS Code and installing the recommended Prettier plugin as defined in .vscode/extensions.json. The .vscode/settings.json file configures VS Code to automatically format files on save. Make sure that you select Prettier as the formatter to use. Note that Prettier expects to find LF line endings and that the automatic formatting does not adjust line endings if needed.
  • Code should pass TypeScript type checking. If you use VS Code, it will notify you of errors as you code.
  • All of the unit tests should pass.

The prepare-make script also generates a fresh JSON Schema for the advanced configuration file. This is used by the unit tests and is also included with the finished application.

The make-windows and make-mac scripts are platform-specific scripts that take care of building the application. They are run on every push using GitHub actions. The resulting installers are made available as artifacts.

Branches

Development happens on the master branch. There is also a deployed_website branch that holds the currently deployed website (see below).

Versioning

This project uses semantic versioning in the following way:

  • PATCH version increase for releases containing just bug fixes
  • MINOR version increase for new features
  • MAJOR version increase for breaking changes, where we define a breaking change as something that does not allow (some) users to upgrade to the new version by simply removing the old one and installing the new one. An example of this would be a change in the location of the internal configuration file or a non-backwards-compatible change in the advanced configuration file structure. Note that functional changes are not considered to be breaking, although we will try to avoid changing behavior that users depend on.

Website

The app's website is a static site generated using Eleventy and deployed using Cloudflare Pages. The files for the website sit in the _website folder. You can locally generate the website (with automatic reload on changes) by running npm run serve in the _website folder.

During development, any related updates to the website should be made directly on the master branch. This way, the state of the website on master directly matches the code on master. The changes made on master will only be deployed to the actual website once they are merged into the deployed_website branch. This will normally happen when a new version is released. In case a change is relevant to the current version as well, it can be cherry-picked from master to deployed_website.

Contributing

If you want to contribute to the development of this application, please review the contributing guidelines.

current-task's People

Contributors

dependabot[bot] avatar mistermicheels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

current-task's Issues

Dark border around main app window on Mac in dark mode

On Mac, when using dark mode, there is a black border around the main app window:

border

It seems that this is a bug in Electron/Chromium/macOS that is outside our control. Relevant Electron issue: electron/electron#13164

The good news is that the border only stands out against a light background, which should be the exception rather than the rule in dark mode. Example of how it looks against a dark background:

dark mode dark background

Window is higher than Windows taskbar with small buttons

Electron apparently applies a minimum height of 38px for frameless windows (like the one we are using). Issue on Electron repo: electron/electron#23200.

This means that, if Windows taskbar is using small buttons, we can't make our window as thin as the taskbar.
For now, we handle that case by making sure the bottom of our window is aligned with the bottom of the screen (it then has a part that sticks out above the taskbar).

Some potentially related issues regarding Electron and frameless window size:

Multi-screen behavior is partially broken if screens have different scale factors

Reproduction scenario:

  • Set up two screens
  • Make sure they have different scale factors (for example, primary at 125% and secondary at 100%)
  • Start the app
  • Make the app switch to nagging mode and back
    • Result: everything should still be fine
  • Move the app window to the secondary screen
  • Make the app switch to nagging mode and back
    • Result: window placement is off, both for nag screen on primary and normal window on secondary

Seems to be caused by a bug in Electron.

Related Electron issue: electron/electron#10862

Edit: There might be some kind of workaround out there, but for now I am marking this as blocked.

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.