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

[2.x] Missing progress indicator #2171

Open
crynobone opened this issue Jan 8, 2025 · 1 comment
Open

[2.x] Missing progress indicator #2171

crynobone opened this issue Jan 8, 2025 · 1 comment

Comments

@crynobone
Copy link

Version:

  • @inertiajs/vue3 version: 2.0.0

Describe the problem:

I followed the guide from https://inertiajs.com/progress-indicators#default but it doesn't seem to render the correct HTML (I assumed <div id="ndprogress"> ... </div>). However, it does seems the include the correct CSS within HTML head section.

CleanShot 2025-01-08 at 21 28 43

Steps to reproduce:

Add progress configuration to createInertiaApp should populate progress on page navigation.

createInertiaApp({
    title: (title) => `${title} - ${appName}`,
+   progress: {
+      delay: 250,
+       color: '#29d',
+       includeCSS: true,
+       showSpinner: false,
+   },
    resolve: (name) =>
        resolvePageComponent(
            `./Pages/${name}.vue`,
            import.meta.glob('./Pages/**/*.vue'),
        ),
    setup({ el, App, props, plugin }) {
        return createApp({ render: () => h(App, props) })
            .use(plugin)
            .use(ZiggyVue)
            .mount(el);
    },
    progress: {
        color: '#4B5563',
    },
});
@crynobone crynobone changed the title Missing progress indicator [2.x] Missing progress indicator Jan 8, 2025
@joetannenbaum
Copy link
Contributor

From what I'm seeing, progress component appears for Inertia requests, which is the expected behavior. When the progress is not actively showing, it's removed from the DOM, which should be consistent with previous behavior (https://github.com/rstacruz/nprogress/blob/e1a8b7fb6e059085df5f83c45d3c2308a147ca18/nprogress.js#L97).

If you sleep a regular Nova (Inertia) request you should see the progress, but it looks like Nova Actions are regular AJAX requests, so the progress isn't showing. How were you previously tapping into the progress bar?

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

No branches or pull requests

2 participants