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

[Hot Cards] Rename Movie to Group and enhance homepage loading #450

Merged
merged 12 commits into from
Oct 4, 2024

Conversation

HandyRandyx
Copy link
Contributor

Notable:

  • Renames movie to group. Adds new subgroups path.
  • It is no longer necessary to refresh the page to see the new style if the user updates their plugin settings.
  • Removes 3 second delay from homepage. Now uses a mutation observer. Once all cards of a given type have been loaded through all the recommendation rows, the hot cards are added.

Other:

  • Improves card border when not using hover animation.
  • Reorganize code.

I've been testing it and everything seems to be working fine, but let me know if you find anything odd.

Refreshing is no longer needed if the user updates his plugin configuration.

- Reorganize code
- Move configuration/settings related code to configuartionHandler.js
- Move registerPathChangeListener function to helpers.js
- Add function to update configuration if user comes from /settings page
Logic replaced by a mutation observer to check if all recommendation rows for the same card type have their slider initialized.
Previous solution was not consistent.
To prevent duplication of elements when the user clicks/reloads a section multiple times we add 'activeHotCardTypes' to track for each card type on the homepage, and for every other section only one card type will be active.

- 'backupImgElements' and 'holoElements' arrays were added to restore the img nodes and avoid duplication of the holo effect on cards.
- Renamed variables for consistency and improve meaning.
Updates the definition in all files and adds the subgroups path to the group pattern.
@HandyRandyx HandyRandyx changed the title [Hot Cards] Refactor Movie to Group and enhance homepage loading [Hot Cards] Rename Movie to Group and enhance homepage loading Oct 4, 2024
@feederbox826
Copy link
Collaborator

LGTM, only nitpicks being that some stuff can be a class/css var

@feederbox826 feederbox826 merged commit 29a18d8 into stashapp:main Oct 4, 2024
2 checks passed
@HandyRandyx HandyRandyx deleted the hot-cards branch October 5, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants