discord-tauri icon indicating copy to clipboard operation
discord-tauri copied to clipboard

Handled compliation errors, updated depenencies and quality of life Improvements

Open p0ryae opened this issue 3 years ago • 5 comments

The project doesn't seem to be maintained anymore. Therefore, I decided to revive it and make it functional. Additional Support and revisions will be added soon (or not all depends of this pr gets merged)

Changelog:

  1. Discord Tauri's window size is more accurate now.
  2. Updated Tauri
  3. Fixed issues related to compilation and launching
  4. Added window decoration back (will probably add another pr with the usage of window shadows)

Please review the changes and merge the changes as soon as possible.

p0ryae avatar Oct 13 '22 01:10 p0ryae

Hey there! Thank you so much for having interest in updating this project, I kind of tried to a while ago, but I was stuck trying to make it work on Linux. I tried running this PR on a Windows 11 machine but Discord Tauri didn't respond, it's probably my machine's problem. If it works on your side, I will be more than happy to merge changes that make sense 😄

Assuming it's functional, does the custom window decoration (the one added by window_bar.rs) work? Because changing decorations to true with it would result in two window bars.

RealDrPuc avatar Oct 13 '22 02:10 RealDrPuc

Also, not trying to assign this to you, I realized that the (multiple) sleeps I put in could be completely useless, since the threads they're in aren't async; possibly blocking the main thread 😓 I need to try it though, didn't have time.

RealDrPuc avatar Oct 13 '22 02:10 RealDrPuc

Interesting. As I just inspected your code, it seems like you are injecting an HTML file to create the custom titlebar. I'm running this on Linux, and I didn't have the bar visible on my end.

I have tested this PR on Linux and not on windows. My upcoming commit with window-shadows (native shadows to windows) will have it tested on windows 11 and Linux.

Also, not trying to assign this to you, I realized that the (multiple) sleeps I put in could be completely useless since the threads they're in aren't async; possibly blocking the main thread sweat I need to try it though, didn't have time.

I will have a look at it. I personally think a custom title bar can be approached in a better way. (injecting a title bar to discord page instead of injecting it externally)

p0ryae avatar Oct 13 '22 03:10 p0ryae

Regarding the title bar, injecting a JS and checking the HTML every 75ms to the loading bar constantly adds significant performance drops to the launcher. I've noticed constant lagging and instability in general. HTML iFrame would be a great solution because it could completely customize the window, meaning partially giving discord to the rest of the space while reserving some space at the top for the titlebar.

Changelog

  1. Terminated splash screen (it's adding more delay to the start time, and it instantly goes away anyways because of how fast launching of the app is, to begin with)
  2. Dependency upgrades
  3. Do not ignore yarn.lock (https://classic.yarnpkg.com/en/docs/migrating-from-npm)
  4. Added OS-specific commands for Tauri initialization.
  5. Titlebar gets handled by the operating system
  6. Windows 11 rounded corners and shadows
  7. etc (check commits)

Conclusively, the safest and the fastest option is simply leaving the titlebar handling up to the operating system. For Windows 11, I added window-shadows so the window will have rounded corners and shadows. I tested it, and it seems to be working fine. It's important to note that the following changes were tested on windows 11 and Linux. Both performed completely fine on my end.

Just as a personal thought: I think one of this project's main goals is to speed up the launch time of discord while also saving users a lot more space than usual discord. Other than that, I don't think there are many improvements (I've noticed improvements with CPU usage, but I will leave the benchmarking up to you)

p0ryae avatar Oct 14 '22 03:10 p0ryae

FYI: You are no longer violating discord's TOS technically. There is no injection happening once this is merged. This acts just like running discord on a browser.

p0ryae avatar Oct 14 '22 03:10 p0ryae

@RealDrPuc are you ever merging this?

tristan-f-r avatar Nov 16 '22 00:11 tristan-f-r