Skip to content

Conversation

@gmechali
Copy link
Contributor

@gmechali gmechali commented Dec 9, 2025

No description provided.

@gmechali gmechali requested a review from clincoln8 December 9, 2025 16:01
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @gmechali, 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 streamlines the application by fully integrating the metadata modal functionality. It achieves this by deprecating and removing the metadata_modal feature flag, which previously guarded this feature. The changes simplify the codebase by eliminating conditional rendering and related logic, ensuring a consistent and enhanced user experience with metadata across the platform.

Highlights

  • Feature Flag Deprecation: The metadata_modal feature flag has been completely deprecated and removed from the codebase, signifying that the metadata modal functionality is now a standard, always-on feature.
  • Code Cleanup and Simplification: All conditional logic and imports related to the metadata_modal feature flag have been removed from various components, including subject_page/block.tsx, tiles/chart_footer.tsx, shared/facet_selector/facet_selector.tsx, and tools/shared/metadata/tile_sources.tsx.
  • Facet Selector Unification: The FacetSelector component now exclusively uses FacetSelectorRich, eliminating the conditional rendering that previously switched between FacetSelectorRich and FacetSelectorSimple based on the feature flag.
  • Documentation and Test Updates: The docs/feature_flags.md file has been updated to reflect the removal of the metadata_modal flag from example URLs, and a related TODO comment in server/webdriver/tests/timeline_test.py has been removed.
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
Contributor

@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 removes the metadata_modal feature flag and all associated conditional logic and imports from the codebase, making the functionality previously gated by this flag always active. Specifically, this involved simplifying logic in subject_page/block.tsx, chart_footer.tsx, and tile_sources.tsx, and ensuring FacetSelector always uses FacetSelectorRich in facet_selector.tsx. A related TODO comment was removed from timeline_test.py, and the METADATA_FEATURE_FLAG constant was deleted from feature_flags/util.ts. Review comments noted that an example in docs/feature_flags.md for enabling multiple features is now inaccurate and should be removed, and suggested refactoring facet_selector.tsx by removing it and renaming FacetSelectorRich to FacetSelector as it is now just a wrapper.

Comment on lines 93 to 95
To enable both the autocomplete and metadata_modal features:
* Enable: https://datacommons.org/explore?enable_feature=autocomplete&enable_feature=metadata_modal
* Enable: https://datacommons.org/explore?enable_feature=autocomplete
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The description on line 93 is now inaccurate since the metadata_modal feature flag is being removed. This example for enabling multiple features is now misleading as it only shows one. Please remove these lines. The example above for a single feature flag is sufficient.

Comment on lines 72 to 74
export function FacetSelector(props: FacetSelectorPropType): ReactElement {
const useRichSelector = isFeatureEnabled(METADATA_FEATURE_FLAG);

if (useRichSelector) {
return <FacetSelectorRich {...props} />;
}
return <FacetSelectorSimple {...props} />;
return <FacetSelectorRich {...props} />;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Now that the feature flag is removed, this component is just a wrapper around FacetSelectorRich. As the TODO comment at the top of the file suggests (lines 22-24), you should consider removing this file and renaming FacetSelectorRich to FacetSelector. This would also involve updating all imports of FacetSelector to point to the new file.

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to streamline the code

@clincoln8 clincoln8 marked this pull request as ready for review December 10, 2025 01:09
// Feature flag names
export const AUTOCOMPLETE_FEATURE_FLAG = "autocomplete";
export const METADATA_FEATURE_FLAG = "metadata_modal";

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: delete newline

Comment on lines 72 to 74
export function FacetSelector(props: FacetSelectorPropType): ReactElement {
const useRichSelector = isFeatureEnabled(METADATA_FEATURE_FLAG);

if (useRichSelector) {
return <FacetSelectorRich {...props} />;
}
return <FacetSelectorSimple {...props} />;
return <FacetSelectorRich {...props} />;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense to streamline the code

>
Data Commons offers data exploration tools and cloud-based
APIs to access and integrate cleaned datasets.
Data Commons offers data exploration tools and cloud-based APIs to
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, this should get cleaned up in #5824

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.

2 participants