-
Thanks for the detailed write-up. Here is an evaluation of the two ideas in this issue (SPA-style content swap vs. a top progress bar) against the current OneDev/Wicket UI.
SPA interceptor (swap
#main/ keep chrome stable)This is not feasible without a major rewrite, which the issue already notes.
- There is no
div#main. Layout chrome lives inLayoutPage(sidebar + topbar + a.mainclass container). Sidebar and topbar are Wicket components with their own Ajax behaviors, not a static shell. - Full-page GETs return a new Wicket page instance. Component markup IDs, Ajax callbacks,
wicket-ajax-baseurl, and the WebSocket channel are bound to that instance. Extracting HTML and swapping it would leave the client talking to a dead page map. - OneDev already uses the History API (
onedev.server.history) and Ajax for in-page updates. That is the supported partial-update path; intercepting ordinary links is not.
Turbolinks / htmx / a hand-rolled fetch-and-swap layer would have the same problem.
Progress bar via
beforeunload/loadThe CSS/JS sketch would not produce a GitHub/YouTube-style bar on full-page navigation.
beforeunloaddoes not paint. Browsers tear down the current document as soon as navigation starts. Width transitions started there are typically never shown. OneDev already usesbeforeunloadfor unsaved-form confirmation (onedev.server.form.setupDirtyCheck) and WebSocket disconnect handling; another handler that mutates the DOM would be unreliable and risks interacting with those.loadruns on a new document. After navigation the bar is a fresh element atwidth: 0%. Completing it to 100% then hiding it would flash a bar after the page is already visible, which is the opposite of the intended feedback.- GitHub/YouTube bars work because those apps intercept clicks (or are SPAs). They do not rely on
beforeunload.
What already exists
BasePagealready has a global Ajax loading indicator (#ajax-loading-indicator, “Please wait…”).onedev.server.setupAjaxLoadingIndicatorshows it after 2s of Wicket Ajax, and there are per-component indicators (AttachAjaxIndicatorListener, infinite-scroll spinners, etc.). That covers in-page work (issue fields, lists, logs streamed over Ajax/WebSocket).Primary sidebar/topbar navigation uses
ViewStateAwarePageLink/BookmarkablePageLink, so Issues → Builds etc. are genuine full page loads. That is inherent to Wicket’s page model.Recommendation
Do not implement SPA-like HTML swapping, and do not implement the
beforeunload/loadprogress bar as specified — it would not meet the acceptance criteria and would not keep header/sidebar stable.If slow full-page navigations are the real pain (large repo tree, long pipeline history), the effective fixes are faster server rendering of those pages and more Ajax where it already fits. A click-intercepted top bar (start on same-origin link click, persist via
sessionStorage, complete on the next page) could be a small polish item, but it is a different design from this sketch, still would not prevent a blank document during load, and would need careful exclusions (downloads,target=_blank, modifier-clicks, Wicket Ajax, dirty-form confirm).Please say if this answers the evaluation, or if you want a follow-up improvement issue scoped only to a click-time indicator (not SPA navigation).
- There is no
-
SORRY - imcomplete!!!
-
Previous Value Current Value Open
Closed
-
Previous Value Current Value Evaluate: Modernize UX with Zero-Refactor SPA-Like Navigation
[DEPRECATED 2] Evaluate: Modernize UX with Zero-Refactor SPA-Like Navigation
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Summary
Improve perceived page load performance by adding a client-side navigation progress indicator (e.g., a thin top loading bar) that appears on every full-page navigation, regardless of backend response time.
Motivation
Currently, when navigating between pages in OneDev, there is no visual feedback until the server finishes rendering the full Wicket page. On slower connections or when the backend is processing (e.g., loading a large repository tree or CI pipeline history), the user sees a blank page or a frozen screen with no indication that navigation is in progress. This creates a poor UX, especially in the following scenarios:
Proposed Solution
Add a lightweight, non-intrusive page-level loading progress bar (similar to YouTube's red loading bar or GitHub's top progress bar) that activates automatically on every full-page navigation event and completes when the page finishes loading (DOMContentLoaded or window.onload).
Technical Approach (Wicket-Compatible)
Since OneDev uses Apache Wicket, we cannot switch to SPA-style navigation without a major refactor. However, a pure client-side progress bar is trivial to implement and fully compatible with Wicket's full-page lifecycle:
<div id="nav-progress-bar">at the top of the page layout (e.g., inBasePage.htmlor the main Wicket markup).HeaderContributor) that:window.onbeforeunload(or any anchor click) to start the progress bar animation.window.onloadto complete the progress bar.CSS/JS Sketch
Advantages
Alternatives Considered
Acceptance Criteria