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

Issue 2100 remove override facets js #870

Conversation

wgilling
Copy link

GitHub Issue: (link)
Islandora/documentation#2100

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

This removes the override javascript that was causing problems executing the soft-limits.js code from the core facets module to address Islandora/documentation#2100

A brief description of what the intended result of the PR will be and/or what problem it solves.
the javascript libraries are no longer overridden - using the core facets/js/soft-limits and views-ajax javascript works as expected.

How should this be tested?

To test, perform a search on a site that will give you at least 3 different facet values for a facet that uses a "List of links" configuration and has a value set for "Soft limit" ( The description for this "Limit the number of displayed facets via JavaScript." ) to limit facets at 3.

When the code works correctly, there should be no console errors relating to that soft-limits.js. Also, the facet that was limited will now only display the top 3 facet values and a link to "Show more".

@jordandukart
Copy link
Member

@wgilling believe there's an intended commit/change in here in regards to islandora_iiif if you want to re-roll this.

@wgilling
Copy link
Author

yes -- I do not know how that "test" commit is even in there, but I will update the feature branch when I have time.

@simonhm
Copy link

simonhm commented Jan 30, 2023

Hi @wgilling
Installing the patch fails because the code that it is trying to patch has changed since the patch was last updated (May 2022).

Here is the output from the command executed in the directory:

`.../var/www/html/drupal/web/modules/contrib/islandora$
curl https://patch-diff.githubusercontent.com/raw/Islandora/islandora/pull/870.patch | git apply -v
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14529 0 14529 0 0 48269 0 --:--:-- --:--:-- --:--:-- 48269
Checking patch modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php...
error: while searching for:

namespace Drupal\islandora_iiif\Plugin\views\style;

use Drupal\views\Plugin\views\style\StylePluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Messenger\MessengerInterface;

error: patch failed: modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php:2
error: modules/islandora_iiif/src/Plugin/views/style/IIIFManifest.php: patch does not apply
Checking patch modules/islandora_advanced_search/islandora_advanced_search.module...
Checking patch modules/islandora_advanced_search/js/facets/facets-views-ajax.js...
Checking patch modules/islandora_advanced_search/js/facets/soft-limit.js...`

It looks like there needs to be some additional development and testing done.
Simon.

@wgilling
Copy link
Author

wgilling commented Feb 1, 2023

closing this - #926 replaces it (without any merge conflicts)

@wgilling wgilling closed this Feb 1, 2023
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.

None yet

3 participants