In some cases it would be useful to be able to disable the effect on certain paths, on admin pages and when overlay is opened for example
But also when an exposed filter block sends a user to a view page from another page. It looks weird to submit a form on the front page and to get an ajax like spinner before being taken to a different page. So being able to set the effect to be active on certain pages could be a welcome feature.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anavarre’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » anavarre
Issue summary: View changes

Feature requests should now be filed against 8.x-1.x-dev.

This is certainly a good idea. Will work towards implementing that soon.

anavarre’s picture

anavarre’s picture

Title: Configure pathes for loader to be active » There's no way to exclude arbitrary paths from triggering the throbber
joshi.rohit100’s picture

What about adding setting on SettingsForm which allows enable/disable on paths (similar like blocks) ?

anavarre’s picture

We tried to think about what to do and wondered how easy it'd be to reuse the Block visibility feature. Turns out it's not meant to be easily reuseable :-( It's also what http://drupal.stackexchange.com/questions/187574/reuse-blocks-visibility... seems to suggest.

We thus tried to mimic what RequestPath.php does, which seemed to do the trick in a simple PoC without the actual logic in place.

anavarre’s picture

Status: Active » Needs work
FileSize
3.71 KB

In its most basic form, here's the idea as explained above: start reusing RequestPath.php


The attached path is nowhere close to being usable. It only gives us the needed FAPI elements and leverages CM for storing values.

Next up we need to create tests and the actual logic to be reused from RequestPath.php. Work in progress. Stay tuned.

anavarre’s picture

FileSize
6.54 KB
3.09 KB

Now with tests.

anavarre’s picture

FileSize
6.69 KB
1.28 KB

To improve the UX, let's add a fieldset.

anavarre credited Dom..

anavarre’s picture

FileSize
8.41 KB
4.88 KB

Worked with Dom. to implement more of RequestPath.php. Nothing usable yet.

Ahmad Abbad’s picture

After apply this patch i have this error

PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC)

in (page_load_progress.module).
the public keyword is used only in function/variable declarations from within a class. Since you're not using a class you need to remove it from your code.

anavarre’s picture

@Ahmad - Yes, as said above this is not usable code yet. Will post something usable soon.

anavarre’s picture

Okay. This should now work, so marking as needs review to trigger the tests. Also filed a follow-up to get the ball rolling once this gets committed: #2824476: Follow-up for #1929806: create BrowserTestBase tests

  • anavarre committed f129eff on 8.x-1.x authored by Dom.
    Issue #1929806 by anavarre, Dom.: There's no way to exclude arbitrary...
anavarre’s picture

Status: Needs review » Fixed

Let's call this fixed. If there's any issue we can file a follow-up issue. See you in #2824476: Follow-up for #1929806: create BrowserTestBase tests for automated testing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.