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

[Bug]: Page Navigation State Incorrectly Refactored and Non-Functional #804

Open
3 tasks done
CyanVoxel opened this issue Feb 17, 2025 · 0 comments
Open
3 tasks done
Labels
Priority: High An important issue requiring attention TagStudio: Library Relating to the TagStudio library system Type: Bug Something isn't working as intended Type: UI/UX User interface and/or user experience
Milestone

Comments

@CyanVoxel
Copy link
Member

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha v9.5.0 Pre-Release 3

Operating System & Version

macOS 15.1.1

Description

Due to a series of ill-informed refactors the page navigation state system has become completely changed post-v9.4 and has broken core navigation functionality. These refactors have also tied frontend-specific state management into the SQL backend, making it difficult to separate and restore pre-v9.5 functionality.

Expected Behavior

The page navigation state should function more or less how it did in v9.1-v9.4. This includes the following core functions:

  • Forward/backward navigation between "page states" of search results
  • Controlled by the "<" and ">" buttons next to the search bar as well as the back/forward buttons on supported mice
  • Page state includes:
    • Page contents
    • Page index
    • Search query of current page
    • Scrollbar position of page
  • Navigation between pages should swap out these properties when navigating
  • Page navigation states can be informed by but not replaced by the page navigation buttons at the bottom of the screen. These should not replace navigation states like they were refactored to do in 9.5, but rather serve as an entry point to create additional navigation frames for the navigation state system, such as in 9.4 and below.

As an analogy for how the prior and intended behavior worked, the library navigation state system should behave similar to a web browser's navigation system. A stack is created based on the previous pages you've visited, including the web addresses, scrollbar positions, and subpage locations. Navigating through these states should reflect the order in which you've visted them, not the order of how pages are set up on a website itself.

A copy of how the navigation should function is present in the navigation code from v9.1-v9.4. It also remains present in the v9.5 codebase, specifically inside one of the methods that was refactored to break this behavior:

# Ex. User visits | A ->[B]     |
#                 | A    B ->[C]|
#                 | A   [B]<- C |
#                 |[A]<- B    C |  Previous routes still exist
#                 | A ->[D]     |  Stack is cut from [:A] on new route

Regarding some of the newer intertwined state management things introduced in the v9.5 codebase: the page size limit should be purely a frontend attribute. This should not be part of the backend codebase, and should not be stored inside the ts_library.sqlite file. A full list of Entry ID results should be returned by the library backend and correctly sliced and worked with by the frontend.

Steps to Reproduce

N/A - Codebase issue

Logs

N/A

@CyanVoxel CyanVoxel added Priority: High An important issue requiring attention TagStudio: Library Relating to the TagStudio library system Type: Bug Something isn't working as intended Type: UI/UX User interface and/or user experience labels Feb 17, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.6 milestone Feb 17, 2025
@CyanVoxel CyanVoxel modified the milestones: Alpha v9.6, SQL Parity Feb 17, 2025
@CyanVoxel CyanVoxel moved this to 🛠 Ready for Development in TagStudio Development Feb 17, 2025
@CyanVoxel CyanVoxel pinned this issue Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High An important issue requiring attention TagStudio: Library Relating to the TagStudio library system Type: Bug Something isn't working as intended Type: UI/UX User interface and/or user experience
Projects
Status: 🛠 Ready for Development
Development

No branches or pull requests

1 participant