-
Notifications
You must be signed in to change notification settings - Fork 115
[Metadata Modal] Deprecate all code flag guarding the metadata modal #5821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
docs/feature_flags.md
Outdated
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export function FacetSelector(props: FacetSelectorPropType): ReactElement { | ||
| const useRichSelector = isFeatureEnabled(METADATA_FEATURE_FLAG); | ||
|
|
||
| if (useRichSelector) { | ||
| return <FacetSelectorRich {...props} />; | ||
| } | ||
| return <FacetSelectorSimple {...props} />; | ||
| return <FacetSelectorRich {...props} />; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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
| // Feature flag names | ||
| export const AUTOCOMPLETE_FEATURE_FLAG = "autocomplete"; | ||
| export const METADATA_FEATURE_FLAG = "metadata_modal"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: delete newline
| export function FacetSelector(props: FacetSelectorPropType): ReactElement { | ||
| const useRichSelector = isFeatureEnabled(METADATA_FEATURE_FLAG); | ||
|
|
||
| if (useRichSelector) { | ||
| return <FacetSelectorRich {...props} />; | ||
| } | ||
| return <FacetSelectorSimple {...props} />; | ||
| return <FacetSelectorRich {...props} />; | ||
| } |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
No description provided.