Google Analytics fix (#3349)

* ga analytics fix

* changelog

* revert

* tests

* revert

* revert
This commit is contained in:
Abubakar Abid 2023-03-01 11:26:26 -08:00 committed by GitHub
parent 6242b2700e
commit cd99857e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -47,7 +47,7 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3297](https://git
- Fix bug where `height` set in `Gallery.style` was not respected by the front-end by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3343](https://github.com/gradio-app/gradio/pull/3343)
- Ensure markdown lists are rendered correctly by [@pngwn](https://github.com/pngwn) in [PR 3341](https://github.com/gradio-app/gradio/pull/3341)
- Ensure that the initial empty value for `gr.Dropdown(Multiselect=True)` is an empty list and the initial value for `gr.Dropdown(Multiselect=False)` is an empty string by [@pngwn](https://github.com/pngwn) in [PR 3338](https://github.com/gradio-app/gradio/pull/3338)
- Ensure that Google Analytics works correctly when gradio apps are created with `analytics_enabled=True` by [@abidlabs](https://github.com/abidlabs) in [PR 3349](https://github.com/gradio-app/gradio/pull/3349)
## Documentation Changes:
- Added the `types` field to the dependency field in the config by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3315](https://github.com/gradio-app/gradio/pull/3315)

View File

@ -585,7 +585,7 @@ class Blocks(BlockContext):
derived_fields = ["types"]
with Blocks(theme=config["theme"], css=config["theme"]) as blocks:
with Blocks(theme=config["theme"]) as blocks:
# ID 0 should be the root Blocks component
original_mapping[0] = Context.root_block or blocks
@ -1061,6 +1061,7 @@ class Blocks(BlockContext):
"version": routes.VERSION,
"mode": self.mode,
"dev_mode": self.dev_mode,
"analytics_enabled": self.analytics_enabled,
"components": [],
"theme": self.theme,
"css": self.css,

View File

@ -2,6 +2,7 @@ XRAY_CONFIG = {
"version": "3.4b3\n",
"mode": "blocks",
"dev_mode": True,
"analytics_enabled": False,
"components": [
{
"id": 27,
@ -239,6 +240,7 @@ XRAY_CONFIG = {
XRAY_CONFIG_DIFF_IDS = {
"version": "3.4b3\n",
"mode": "blocks",
"analytics_enabled": False,
"dev_mode": True,
"components": [
{
@ -477,6 +479,7 @@ XRAY_CONFIG_DIFF_IDS = {
XRAY_CONFIG_WITH_MISTAKE = {
"mode": "blocks",
"dev_mode": True,
"analytics_enabled": False,
"components": [
{
"id": 1,