Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[3/4] Add Support for Group-Based Feature Search #596

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

jcscottiii
Copy link
Collaborator

@jcscottiii jcscottiii commented Aug 15, 2024

Depends on #595

This PR enhances the feature search functionality by introducing a new group query term. Users can now search for features belonging to a specific group and any of its descendant groups in the web-features repository hierarchy.

New Query Functionality

  • Query: group:css
  • Interpretation: Retrieves features belonging to the "css" group and any of its child or descendant groups (e.g., "grid").

Implementation Details

  • Grammar Expansion: The ANTLR4 grammar has been extended to include the group query term.
  • Visitor Method: A new VisitGroup_term method has been implemented to handle the parsing and generation of the intermediate representation for group queries.

Future Considerations

  • While the current implementation includes descendant groups by default, future enhancements could allow users to optionally exclude descendants from the search results.

Benefits

  • Enhanced Search Capabilities: Users can now perform more targeted searches based on the hierarchical organization of features within groups.
  • Improved User Experience: The new query term provides a more intuitive way to discover features related to a specific domain or area of interest.

@jcscottiii jcscottiii changed the title temp Group search term Aug 15, 2024
@jcscottiii jcscottiii changed the title Group search term Add Support for Group-Based Feature Search Aug 16, 2024
@jcscottiii jcscottiii marked this pull request as ready for review August 16, 2024 15:14
@jcscottiii jcscottiii changed the title Add Support for Group-Based Feature Search [3/4] Add Support for Group-Based Feature Search Aug 16, 2024
@@ -53,6 +54,7 @@ This query language enables you to construct flexible searches to find features
- `baseline_status:high` - Find features with a high baseline status.
- `name:"Dark Mode"` - Find features named "Dark Mode" (including spaces).
- `baseline_date:2023-01-01..2023-12-31` - Searches for all features that reached baseline in 2023.
- `group:css` - Searches for features that belong to the `css` group and any groups that are descendants of that group.
Copy link
Contributor

Choose a reason for hiding this comment

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

So every group name must be globally unique, including all the groups that are descendants of other groups? That might be problematic over time if different child group names would tend to be the same.

Maybe group names should use a path notation, always starting from the root. e.g. group:css.grid.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently, the group ids are the filenames (without the suffix) in this directory. As a result, the ids are unique. But if they ever move to a directory based structure and nest the files, we would lose that guarantee, In that case, we could definitely revisit and do the group path idea.

@jcscottiii jcscottiii force-pushed the jcscottiii/add-group-consumer branch from e0ae53a to 590b1a2 Compare August 17, 2024 17:05
Base automatically changed from jcscottiii/add-group-consumer to main August 17, 2024 17:35
This PR enhances the feature search functionality by introducing a new `group` query term.  Users can now search for features belonging to a specific group and any of its descendant groups in the web-features repository hierarchy.

**New Query Functionality**

* Query: `group:css`
* Interpretation: Retrieves features belonging to the "css" group *and* any of its child or descendant groups (e.g., "grid").

**Implementation Details**

* **Grammar Expansion:** The ANTLR4 grammar has been extended to include the `group` query term.
* **Visitor Method:** A new `VisitGroup_term` method has been implemented to handle the parsing and generation of the intermediate representation for group queries.

**Future Considerations**

* While the current implementation includes descendant groups by default, future enhancements could allow users to optionally exclude descendants from the search results.

**Benefits**

* **Enhanced Search Capabilities:** Users can now perform more targeted searches based on the hierarchical organization of features within groups.
* **Improved User Experience:** The new query term provides a more intuitive way to discover features related to a specific domain or area of interest.
@jcscottiii jcscottiii added this pull request to the merge queue Aug 17, 2024
Merged via the queue into main with commit ea62385 Aug 17, 2024
3 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/add-group-term branch August 17, 2024 19:02
@jcscottiii jcscottiii linked an issue Aug 19, 2024 that may be closed by this pull request
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter by groups and snapshots
2 participants