Skip to content

Commit b5122f7

Browse files
No public description
PiperOrigin-RevId: 806465909
1 parent d7a289f commit b5122f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google/colab/_quickchart_hint_button.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ def register_df_and_get_html(df):
248248
(() => {{
249249
let quickchartButtonEl =
250250
document.querySelector('#{df_key} button');
251+
// Check if the suggest_plots experiment flag is enabled in the frontend.
252+
const suggestPlotsEnabled = window.colabExperiments && window.colabExperiments.suggest_plots;
251253
quickchartButtonEl.style.display =
252-
google.colab.kernel.accessAllowed ? 'block' : 'none';
254+
google.colab.kernel.accessAllowed && suggestPlotsEnabled ? 'block' : 'none';
253255
}})();
254256
</script>
255257
</div>""")

0 commit comments

Comments
 (0)