Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5, new code format rules for frontend, some general overdue refactoring #762

Merged
merged 28 commits into from
Jan 17, 2025

Conversation

IRHM
Copy link
Member

@IRHM IRHM commented Jan 17, 2025

Changes made

  • Full migration to Svelte 5 (instead of slowly migrating, everything has been moved over to use Svelte 5 features now)
    • The store is now an object using the $state rune, instead of using a svelte store. All uses have been updated, looks a lot cleaner now!
  • Edited prettierrc: Use default printWidth of 80, Always leave trailing ,, use tabs.
  • All code reformatted to use Tabs instead of Spaces (have been meaning to fix this for a while, all the code being changed in this pr was a good excuse to get it done).
  • Code makeover: A lot of stuff has been refactored to be (more) pleasing to the eyes.
  • Menus have been refactored to use a new component.
  • person: Fixed an infinite loop problem and simplified sorting code.
  • and more stuff that i have forgotten

IRHM added 27 commits January 3, 2025 21:21
some code has still wrongly been deleted by the migration tool, have to restore that............ aaaaaaaaaaaaaaaa
getting stuff working first, then will cleanup where necessary
maybe i set it up wrong but it didnt seem to noticeable change file size so i dont think its worth using? idk
- Refactored the newest/oldest sorts into one function used for both: newestOldestSort()
- Fixed an issue in the sort where an infinite loop could be caused when A & B both have no release date (added new case to resolve this).
this was wow many time wasted trying to figure this out but at least its a one time waste i hoppe.

Removed the games filter auto removal thing in filt() because it's not _really_ necessary. We have added additional UX stuff around this since, so if this rare case ever does occur, the user has easy ways around it.
This change caused an issue where the poster mouseLeave event would not fire if the poster element was moved as a result of the re-sort, so some stuff has been restructured and a new call added to check if mouse is no longer over the poster to manually unactivate it.
So that we can use the setters for saving properties to localStorage after an update. $effect is not meant to be used for this, so using setters seemed like the best option, gives us a lot more control over behaviour.
Clicking it would take the user to home page without login, but they are not logged in so no data.
Created a new <Menu> component which is now used for all of our menus (the ones for the nav + the menu in AddToTagButton).

Looks better now, easier to use, not sure why I ever did the global style for it, that was dumb. oh wait no im smart, it was probably because it wasn't used for the complex stuff it is now anyways shulda refactored ages agU
@IRHM IRHM added bug Hmm, this isn't working correctly dependencies Pull requests that update a dependency file labels Jan 17, 2025
@IRHM IRHM added this to the v1.45 milestone Jan 17, 2025
@IRHM IRHM self-assigned this Jan 17, 2025
@IRHM IRHM merged commit f01f26f into dev Jan 17, 2025
3 checks passed
@IRHM IRHM deleted the svelte-5 branch January 17, 2025 18:11
@IRHM IRHM mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Hmm, this isn't working correctly dependencies Pull requests that update a dependency file
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant