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

Refactor frontend #12

Open
wants to merge 45 commits into
base: sqlite
Choose a base branch
from

Conversation

NanamiNakano
Copy link
Collaborator

@NanamiNakano NanamiNakano commented Nov 23, 2024

Description

This PR refactors frontend, fixes infinite re-render issues, and brings some performance enhancements by reducing unnecessary re-rendering and useEffect hooks.

Details

Optimizations

  • Now the data used for initialization (labels, user data and "task" length) will now only be loaded once
  • Add error handling
  • Add load state
  • Reduce unnecessary calculations between re-renders with useMemo and useCallback
  • Simplified rendering logic

Project structure

  • Separate util functions from components
  • State Management with zustand
  • Split components for easier maintenance

Bug fixes

  • Fix column resize styling issue by rewriting the history table
  • Fix highlighting components (SliceText and JustSliceText, perviously defined inside the Page component) infinite re-render issue
  • Fix the issue that sometimes it was not possible to manually select texts when server section rendered

Modifications

  • Disable selection when viewing history (Editing will be implemented in the future)

Testing

@Yazawazi and I have tested that all the features work correctly!

Add scripts for migration and management
modularize migrator.py
allow users to specify new email and password for each migrated user with a csv file
store the random password set in a csv file
Add information about the creation of users.
Update information about the `users` table.
Add information about JWT secret.
Separate LabelPagination component
Copy link

@NanamiNakano NanamiNakano marked this pull request as ready for review November 23, 2024 15:39
@NanamiNakano
Copy link
Collaborator Author

#10 should be merge first

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.

1 participant