Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

A couple of QOL Improvements #398

Merged
merged 9 commits into from
Feb 28, 2023
Merged

A couple of QOL Improvements #398

merged 9 commits into from
Feb 28, 2023

Conversation

fishnxt
Copy link
Contributor

@fishnxt fishnxt commented Nov 4, 2022

Hello, I recently started using my server to store music and I really enjoy the project. While I know the rewrite is on the way, there were a couple of things that I felt were worth improving to make the user experience better for the time being.

I should preface this by saying that I am brand new to web development, and this was my first time diving into anything beyond a simple React webpage. I'm here for the learning experience, so I appreciate any feedback you may have, especially when it comes to best practices.

These commits make the following changes:

  • Queue is saved every time a song starts "playing"

    • This was pretty important to me, as I almost never close my music applications before shutting my computer down. I'm curious if it didn't work like this before due to stability concerns?
  • A 'Retain Window Size' option, which saves the window size when the program is closed

    • I'm unsure if other operating systems save Electron application dimensions, but Windows 11 doesn't, and I hate resizing the window every time I open it, so I added this
  • Default width & height options, which are used when the 'Retain Window Size' option is disabled

    • This one isn't really important, but I think there are cases where people just went a set default size every time they open the app.

All of the time that I have spent testing has been without the NodeRT features & dependencies, but I left them in the repo.

@jeffvli
Copy link
Owner

jeffvli commented Nov 6, 2022

Thanks for the contribution!

Queue is saved every time a song starts "playing"

Like you mentioned, it works the way it does now due to how Electron can handle unexpected closures of the app. It was discussed here in #293.

A 'Retain Window Size' option, which saves the window size when the program is closed

Saving it in the 'close' handler is a good idea. This was actually implemented before on the window resize handlers and then later removed due to it occassionally bugging out and setting negative dimensions which caused the app to be invisible

You could also probably be take this feature one step further to also save the window position using the 'moved' browser window event.

I don't have any issues with the code so it should be good to merge if you're fine with it as is!

@fishnxt
Copy link
Contributor Author

fishnxt commented Nov 7, 2022

I went ahead and added window position saving. Feel free to merge whenever :)

This was actually implemented before on the window resize handlers

Do you think it would exhibit the same behavior if the window size was saved inside of the 'moved' event? While it's not as important for the size of the window to be saved regularly, it could be useful

fishnxt and others added 9 commits February 27, 2023 20:49
Adds a toggle for retaining window dimensions. Saves dimensions when exiting application
User can now choose a default width and height, which are used when the Retain Window Size setting is disabled.

The minimum window size is 600 x 600
Fix misplaced template string
Updated description to reflect new functionality
Fixes a silly little mistake
@jeffvli jeffvli merged commit b298fe4 into jeffvli:main Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants