Support ViewComponent 3.0, by using with_SLOT api instead of deprecated 2.x slot API #240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blacklight 7.34.0 now allows view_component 3.x (as well as 2.x). (the release-7.x Blacklight branch had for some time too).
In trying to upgrade by Blacklight 7 app to BL 7.34.0 and view_component 3.x, I realized that blacklight_range_limit was not yet view_component 3.x compatible.
To make it so, we have to switch to using the new with_SLOT_NAME slot API, from the 2.x deprecated slot API.
Deprecated 2.x Slot API was taken away in view_component 3.0.0. By switching to with_SLOT_NAME API, we can support view_component 3.x.
The with_SLOTNAME API was introduced in view_component 2.54.0 (May 2022). So we now express a dependency requiring view_component at least 2.54.0. As we do use view_components directly in source code here, it is appropriate to express it as a dependency, instead of just leaving it an indirect dependency.
So blacklight_range_limit still supports view_component 2.x (as long as >= 2.54.0) as well as 3.x.
I have tested this (with both view_component 2.82.0 and view_component 3.6.0) in my actually existing app as well.