[PR #1266] [MERGED] Implement browser history API based navigation, preventing page reloads between routings #1392

Closed
opened 2026-02-25 21:38:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/1266
Author: @mercihabam
Created: 10/2/2024
Status: Merged
Merged: 10/18/2024
Merged by: @mercihabam

Base: masterHead: prevent-page-reloads


📝 Commits (10+)

  • b21b1c3 Implement browser history API based navigation, preventing browser reloads between routings
  • 6ae9ba4 A couple of fixes and refinements to the navigation module ensuring that data is consistantly displayed across routings
  • 2ea908b Apply servers and settings page handlers
  • aa538eb Apply handlers on page load as well
  • 4d4bc0a Update the sidebar item's active state when navigating
  • 6eb67a3 Fix displaying the message content with the correct route params
  • ae11804 Move entire imap_folder_page_setup the the message list route handler
  • ef98763 Fix refresh links
  • 4a9e66b Fix sorting and filtering of messages
  • 72882c6 imap unread handler: allow fetching the messages from the connected servers instead of only provided request server parameters

📊 Changes

54 files changed (+2614 additions, -1537 deletions)

View changed files

📝 .gitignore (+1 -0)
modules/advanced_search/js_modules/route_handlers.js (+30 -0)
📝 modules/advanced_search/site.js (+0 -34)
📝 modules/calendar/hm-calendar.php (+1 -1)
modules/calendar/js_modules/route_handlers.js (+15 -0)
📝 modules/calendar/site.js (+0 -17)
modules/contacts/js_modules/route_handlers.js (+33 -0)
📝 modules/contacts/site.js (+2 -42)
📝 modules/core/js_modules/Hm_MessagesStore.js (+60 -11)
modules/core/js_modules/route_handlers.js (+58 -0)
modules/core/navigation/navigation.js (+92 -0)
modules/core/navigation/routes.js (+89 -0)
modules/core/navigation/utils.js (+33 -0)
📝 modules/core/output_modules.php (+24 -8)
📝 modules/core/site.js (+65 -79)
📝 modules/desktop_notifications/site.js (+1 -1)
📝 modules/feeds/site.js (+11 -14)
📝 modules/github/site.js (+17 -17)
modules/hello_world/js_modules/route_handlers.js (+8 -0)
📝 modules/hello_world/site.js (+2 -12)

...and 34 more files

📄 Description

https://github.com/cypht-org/cypht/issues/1144

Checklist:

  • The sidebar item's active state updates when navigating
  • Ensure handlers for refresh links are applied so the browser doesn’t reload on click
  • Sorting and filtering work
  • Fix combined folder content not being loaded upon navigation
  • Can display flagged contents
  • Cronjob to reload active folder's content in the background
  • Refresh the list during navigation; at least in the background.
  • FIX: Navigating to a route, the data from a previous route gets fetched.
  • Fix unit tests relative to the js files output
  • When clicking on a message link while contents are still being fetched in the background, the requests should be aborted so the navigation is performed faster (Aborting the requests on the client doesn't help because, once the requests are sent, the server processes them synchronously, blocking other eventual requests. A solution could be processing the requests server-side asynchronously.)
  • Can requests be processed asynchronously? Let's keep track of this here: https://github.com/cypht-org/cypht/issues/1279

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/1266 **Author:** [@mercihabam](https://github.com/mercihabam) **Created:** 10/2/2024 **Status:** ✅ Merged **Merged:** 10/18/2024 **Merged by:** [@mercihabam](https://github.com/mercihabam) **Base:** `master` ← **Head:** `prevent-page-reloads` --- ### 📝 Commits (10+) - [`b21b1c3`](https://github.com/cypht-org/cypht/commit/b21b1c370baced84947c0b0d2207f1dffca58540) Implement browser history API based navigation, preventing browser reloads between routings - [`6ae9ba4`](https://github.com/cypht-org/cypht/commit/6ae9ba4eb1a7dc875da4acfe5885f814daf0bb65) A couple of fixes and refinements to the navigation module ensuring that data is consistantly displayed across routings - [`2ea908b`](https://github.com/cypht-org/cypht/commit/2ea908bafcb7d3e179cb0eb47108fe56ec427255) Apply servers and settings page handlers - [`aa538eb`](https://github.com/cypht-org/cypht/commit/aa538eb6bda95c3bd1e228dfca022ea3704836b7) Apply handlers on page load as well - [`4d4bc0a`](https://github.com/cypht-org/cypht/commit/4d4bc0ac24391a18023561f44960c43a7f328b7e) Update the sidebar item's active state when navigating - [`6eb67a3`](https://github.com/cypht-org/cypht/commit/6eb67a34865150ca18eedd12a1b6aa474160c81b) Fix displaying the message content with the correct route params - [`ae11804`](https://github.com/cypht-org/cypht/commit/ae118048ab87568211084c4619d004c737cb931a) Move entire imap_folder_page_setup the the message list route handler - [`ef98763`](https://github.com/cypht-org/cypht/commit/ef9876377c9706d78ad639cf62a8a60ecb399a24) Fix refresh links - [`4a9e66b`](https://github.com/cypht-org/cypht/commit/4a9e66b7863b45be27cca4228ef2d736bbb5a9d9) Fix sorting and filtering of messages - [`72882c6`](https://github.com/cypht-org/cypht/commit/72882c6df073f5607c2ce13654d513d27b911671) imap unread handler: allow fetching the messages from the connected servers instead of only provided request server parameters ### 📊 Changes **54 files changed** (+2614 additions, -1537 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) ➕ `modules/advanced_search/js_modules/route_handlers.js` (+30 -0) 📝 `modules/advanced_search/site.js` (+0 -34) 📝 `modules/calendar/hm-calendar.php` (+1 -1) ➕ `modules/calendar/js_modules/route_handlers.js` (+15 -0) 📝 `modules/calendar/site.js` (+0 -17) ➕ `modules/contacts/js_modules/route_handlers.js` (+33 -0) 📝 `modules/contacts/site.js` (+2 -42) 📝 `modules/core/js_modules/Hm_MessagesStore.js` (+60 -11) ➕ `modules/core/js_modules/route_handlers.js` (+58 -0) ➕ `modules/core/navigation/navigation.js` (+92 -0) ➕ `modules/core/navigation/routes.js` (+89 -0) ➕ `modules/core/navigation/utils.js` (+33 -0) 📝 `modules/core/output_modules.php` (+24 -8) 📝 `modules/core/site.js` (+65 -79) 📝 `modules/desktop_notifications/site.js` (+1 -1) 📝 `modules/feeds/site.js` (+11 -14) 📝 `modules/github/site.js` (+17 -17) ➕ `modules/hello_world/js_modules/route_handlers.js` (+8 -0) 📝 `modules/hello_world/site.js` (+2 -12) _...and 34 more files_ </details> ### 📄 Description https://github.com/cypht-org/cypht/issues/1144 Checklist: - [x] The sidebar item's active state updates when navigating - [x] Ensure handlers for refresh links are applied so the browser doesn’t reload on click - [x] Sorting and filtering work - [x] Fix combined folder content not being loaded upon navigation - [x] Can display flagged contents - [x] Cronjob to reload active folder's content in the background - [x] Refresh the list during navigation; at least in the background. - [x] FIX: Navigating to a route, the data from a previous route gets fetched. - [x] Fix unit tests relative to the js files output - [x] ~~When clicking on a message link while contents are still being fetched in the background, the requests should be aborted so the navigation is performed faster~~ (Aborting the requests on the client doesn't help because, once the requests are sent, the server processes them synchronously, blocking other eventual requests. A solution could be processing the requests server-side asynchronously.) - [x] Can requests be processed asynchronously? Let's keep track of this here: https://github.com/cypht-org/cypht/issues/1279 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:38:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#1392
No description provided.