Skip to content

Conversation

@VivekKavala
Copy link

@VivekKavala VivekKavala commented Oct 1, 2025

Adds a top-loading progress bar that appears during page transitions to improve user experience by providing visual feedback during navigation.

  • Integrated the nextjs-toploader package, a lightweight and efficient solution for Next.js applications.
  • The progress bar is initialized in the main _app.tsx file to ensure it's active across the entire application.
  • This feature works seamlessly with the Next.js App Router and does not interfere with server-side rendering (SSR).

What is this PR about?

This PR introduces a modern top-loading progress bar component to Dokploy, which shows up during page transitions and long-running actions. The loader enhances UX by giving users visual feedback whenever navigation or background operations occur.

Checklist

Before submitting this PR, please make sure that:

  • ✓ You created a dedicated branch based off the canary branch

  • ✓ You have read the suggestions in the CONTRIBUTING.md

  • ✓ You have tested this PR locally (navigation, slow network, edge cases)

  • ✓ You added any relevant unit or integration tests (if applicable)

  • ✓ You added or updated documentation (if needed)

  • ✓ You’ve ensured the loader matches Dokploy’s design language (colors, sizes)

Issues related (if applicable)

Closes #2729

Implementation Details & Screenshots
How it works

  • A new TopLoader component (or ProgressBar) is added, which uses a lightweight approach (e.g. using nprogress under the hood or a custom CSS + JS solution).

  • The loader is triggered on route navigation start and completes on route change complete (or on error).

  • The loader is integrated in app/layout.tsx (or the equivalent root layout) so it wraps all pages.

  • Edge cases such as aborted navigations or fast transitions are handled (e.g., minimal delay before showing, canceling if navigation resolves too quickly).

  • Styles are minimal and follow Dokploy’s theme (e.g. using existing CSS variables or Tailwind class names).

image

Adds a top-loading progress bar that appears during page transitions to improve user experience by providing visual feedback during navigation.

- Integrated the `nextjs-toploader` package, a lightweight and efficient solution for Next.js applications.
- The progress bar is initialized in the main `_app.tsx` file to ensure it's active across the entire application.
- This feature works seamlessly with the Next.js App Router and does not interfere with server-side rendering (SSR).
This commit introduces a top-loading progress bar that provides visual feedback during page transitions, improving the user's navigation experience.

- **Package Integration:** The `nextjs-toploader` package has been added to provide a lightweight and efficient progress bar solution for Next.js.
- **Theme-Aware Color:** The progress bar's color is dynamically set using the `hsl(var(--sidebar-ring))` CSS variable, ensuring it automatically adapts to the application's current theme (light or dark mode).
- **Implementation:** The `NextTopLoader` component is integrated into the main `_app.tsx` file, making it active across the entire application.
@dennisimoo
Copy link
Contributor

Can you send a screenshot on how it looks like

@VivekKavala
Copy link
Author

Can you send a screenshot on how it looks like

I have added the screenshot to the PR check it out.

@VivekKavala
Copy link
Author

@Siumauricio can you take a look at this

@Siumauricio Siumauricio merged commit 716e8b3 into Dokploy:canary Dec 1, 2025
4 checks passed
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.

Add a modern top loader for page transitions

3 participants