Skip to content

Websocket for 3rd Party Integration & Electron Version Bump#156

Merged
Splode merged 5 commits intoSplode:devfrom
TCWTEAM:site-blocker
Mar 30, 2021
Merged

Websocket for 3rd Party Integration & Electron Version Bump#156
Splode merged 5 commits intoSplode:devfrom
TCWTEAM:site-blocker

Conversation

@TCWTEAM
Copy link
Copy Markdown

@TCWTEAM TCWTEAM commented Mar 29, 2021

  • So start off light, bump to Electron v11 to support development on apple silicon.

Pomotroid is nice but the one thing I've always felt is missing is a site blocker. One method to do this would be to edit the local computer hosts file however, this can cause permission issues, unintended behavior, and be easily avoidable as chrome can preserve socket pools and prevent another lookup, making the hosts file useless.

Another method is by exposing a WebSocket that communicates work rounds starting or stopping which is much better and what this PR does.

The code is currently very messy however I just wanted to see if this is something that would be possible to implement before spending time and cleaning it up. If so, a todo of tasks before this is prod ready:

  • Cleanup site blacklist fetching logic (or add to UI) [If willing to integrate site-blocking natively]
  • Abstract WebSocket logic into an easily extendable format

Here is a functional sample of a site-blocking chrome extension I use with this branch of pomotroid https://github.com/TCWTEAM/Pomotroid-Extension

TLDR: Add WebSockets to be able to add 3rd party integrations, specifically a site-blocker

kawarimidoll and others added 5 commits January 19, 2021 18:58
Calling brew cask install is disabled
docs: Fix installation instructions in README.md
@TCWTEAM
Copy link
Copy Markdown
Author

TCWTEAM commented Mar 29, 2021

Would also resolve #146

@Splode Splode added the enhancement New feature or request label Mar 30, 2021
@Splode
Copy link
Copy Markdown
Owner

Splode commented Mar 30, 2021

@TCWTEAM Looks good. Thank you for the contribution.

I like the idea of having a generalized web socket server for sharing data within and without the app. I've been wanting to create a plug-in system for a while, and this is a great step toward that. With that I mind, your goal of abstracting the socket logic into an extendable format would be helpful.

I'd say if you intend to continue working on this a bit more before we ship it, can you amend this PR to the dev branch?

@TCWTEAM TCWTEAM changed the base branch from master to dev March 30, 2021 01:49
@TCWTEAM
Copy link
Copy Markdown
Author

TCWTEAM commented Mar 30, 2021

@TCWTEAM Looks good. Thank you for the contribution.

I like the idea of having a generalized web socket server for sharing data within and without the app. I've been wanting to create a plug-in system for a while, and this is a great step toward that. With that I mind, your goal of abstracting the socket logic into an extendable format would be helpful.

I'd say if you intend to continue working on this a bit more before we ship it, can you amend this PR to the dev branch?

Changed it to dev. I'm going to try abstracting the logic and cleaning things up sometime this week and hopefully have this ready to ship by next week

Also another unintended consequence of this pr is its pretty easy to ship arm builds now for native apple silicon support

@Splode Splode merged commit 30a27b3 into Splode:dev Mar 30, 2021
@Splode
Copy link
Copy Markdown
Owner

Splode commented Mar 30, 2021

Also another unintended consequence of this pr is its pretty easy to ship arm builds now for native apple silicon support

Brilliant! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants