feat: add eq match and filter after select behavior #1752
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.
Summary
KM-591
Preview link
This pull request provides a PoC for a new filter interaction in the plugins list, aimed at improving usability by addressing the mismatch between visible display names and filterable names.
Context
A plugin instance may have three different "names":
mtls-auth
Key Authentication
MyAwesomePlugin
Currently, because display names are not stored on the backend, the filter API (
/plugins?filter[name][contains]={query}
) only matches against the plugin's backend name or user-defined instance name. This gap can cause confusion when users try to filter by the display names they see in the UI.To address this, @erichsend proposed an approach with these steps:
/plugins?filter[name][eq]=mtls-auth
) to display all instances of the selected plugin.Trade-Offs
This approach presents some benefits and limitations:
Code Changes
Added
usePluginSelect
composable (extracted fromPluginsSelectPage.vue
with modifications)pluginList
is now a computed reference instead of a simple ref - need confirmation.pluginList
updates, as it should update automatically as a computed reference.@revalidate="() => pluginsList = buildPluginList()"
fromPluginSelect.vue
- need confirmation.Added
selectItems
andselectFilterFunction
toExactMatchFilterConfig
Added
isEqMatch
inKonnectConfig
/plugins?filter[name][eq]={query}
endpoint is called to ensure precise results (e.g., preventingRate Limiting
from returning instances ofRate Limiting Advanced
).