diff --git a/google/colab/_quickchart_hint_button.py b/google/colab/_quickchart_hint_button.py index e15cdd41..685929ca 100644 --- a/google/colab/_quickchart_hint_button.py +++ b/google/colab/_quickchart_hint_button.py @@ -248,8 +248,10 @@ def register_df_and_get_html(df): (() => {{ let quickchartButtonEl = document.querySelector('#{df_key} button'); + // Check if the suggest_plots experiment flag is enabled in the frontend. + const suggestPlotsEnabled = window.colabExperiments && window.colabExperiments.suggest_plots; quickchartButtonEl.style.display = - google.colab.kernel.accessAllowed ? 'block' : 'none'; + google.colab.kernel.accessAllowed && suggestPlotsEnabled ? 'block' : 'none'; }})(); """)