Skip to content

Conversation

@dsuren1
Copy link

@dsuren1 dsuren1 commented Dec 17, 2025

Description

This PR allows overriding the default filter options and removing any duplicates from the resource catalog page's plugin configuration

(cherry picked from commit a3f32f3)
@gemini-code-assist
Copy link

Summary of Changes

Hello @dsuren1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the configurability of the resource catalog page by allowing external configurations to override or extend the default set of filter options. A key improvement is the introduction of logic to prevent and remove duplicate filter entries, ensuring that the displayed filter list remains unique and functional. This change provides more control over the user interface and improves the robustness of the filter management system.

Highlights

  • Filter Option Overriding: The pull request introduces the capability to override default filter options on the resource catalog page, providing greater flexibility for customization.
  • Duplicate Filter Removal: A mechanism has been implemented to automatically remove any duplicate filter entries from the resource catalog page's plugin configuration, ensuring a clean and consistent list of filters.
  • Code Refactoring: The getPageFilterForm function in resource_page_catalog.html has been refactored to utilize a JavaScript Map for processing filter items, which facilitates the unique identification and handling of filter options.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to override default filter options and remove duplicates, which is a great enhancement. However, the current implementation has a potential issue where filter items without an id (such as dividers) would be unintentionally removed. I've provided a suggestion to address this by ensuring all items are handled correctly, preserving those without an ID while still deduplicating those with one.

@dsuren1 dsuren1 assigned allyoucanmap and unassigned dsuren1 Dec 17, 2025
@dsuren1 dsuren1 changed the title Allow possibility to override default filter form options Allow possibility to override default resource filter form options Dec 17, 2025
@allyoucanmap allyoucanmap requested review from anup39 and removed request for allyoucanmap December 17, 2025 15:00
@allyoucanmap allyoucanmap assigned anup39 and unassigned allyoucanmap Dec 17, 2025
@dsuren1 dsuren1 merged commit 9b7774c into GeoNode:master Dec 19, 2025
4 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 19, 2025
(cherry picked from commit a3f32f3)
(cherry picked from commit 9b7774c)
dsuren1 added a commit that referenced this pull request Dec 19, 2025
(cherry picked from commit a3f32f3)
(cherry picked from commit 9b7774c)

Co-authored-by: Suren <dsuren1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants