We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
On rerun, faded elements are becoming opaque one by one. Instead they become opaque all at once.
Steps to repro:
1. Run `examples/reference.py`
2. When done, rerun it.

**Expected:** on rerun, all elements fade out and then become opaque one by one even before the run is done.
**Actual:** on rerun, all elements fade out and only become opaque when the entire run is done.

I believe this bug was introduced with the Sidebar code.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # Configuration file for the Sphinx documentation builder.
2 # -*- coding: utf-8 -*-
3 
4 import recommonmark
5 from recommonmark.transform import AutoStructify
6 
7 # -- Path setup --------------------------------------------------------------
8 
9 # If extensions (or modules to document with autodoc) are in another directory,
10 # add these directories to sys.path here. If the directory is relative to the
11 # documentation root, use os.path.abspath to make it absolute, like shown here.
12 
13 import os
14 import sys
15 
16 sys.path.insert(0, os.path.abspath(".."))
17 sys.path.append(os.path.abspath("./_ext"))
18 
19 
20 # -- Project information -----------------------------------------------------
21 
22 project = u"Streamlit"
23 copyright = u"2019, Streamlit Inc."
24 author = u"Streamlit Inc."
25 display_version = True
26 
27 # The full version, including alpha/beta/rc tags
28 import streamlit as st
29 
30 release = st.__version__
31 
32 # The short X.Y version
33 version = ".".join(st.__version__.split(".")[0:2])
34 
35 
36 # -- General configuration ---------------------------------------------------
37 
38 # If your documentation needs a minimal Sphinx version, state it here.
39 #
40 # needs_sphinx = '1.0'
41 
42 # Add any Sphinx extension module names here, as strings. They can be
43 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44 # ones.
45 extensions = [
46     "sphinx.ext.autodoc",
47     "sphinx.ext.autosummary",
48     "sphinx.ext.githubpages",
49     "sphinx.ext.napoleon",
50     "recommonmark",
51     "stoutput",
52 ]
53 
54 # Add any paths that contain templates here, relative to this directory.
55 templates_path = ["_templates"]
56 
57 # The suffix(es) of source filenames.
58 # You can specify multiple suffix as a list of string:
59 source_suffix = [".rst", ".md"]
60 
61 # The master toctree document.
62 master_doc = "index"
63 
64 # The language for content autogenerated by Sphinx. Refer to documentation
65 # for a list of supported languages.
66 #
67 # This is also used if you do content translation via gettext catalogs.
68 # Usually you set "language" from the command line for these cases.
69 language = None
70 
71 # List of patterns, relative to source directory, that match files and
72 # directories to ignore when looking for source files.
73 # This pattern also affects html_static_path and html_extra_path.
74 with open(os.path.abspath("./exclude")) as exclude_file:
75     exclude_patterns = [line.strip() for line in exclude_file.readlines()]
76 
77 # The name of the Pygments (syntax highlighting) style to use.
78 pygments_style = None
79 
80 
81 # -- Options for HTML output -------------------------------------------------
82 
83 # The theme to use for HTML and HTML Help pages.  See the documentation for
84 # a list of builtin themes.
85 #
86 # html_theme = 'alabaster'
87 html_theme = "sphinx_rtd_theme"
88 
89 
90 # Theme options are theme-specific and customize the look and feel of a theme
91 # further.  For a list of options available for each theme, see the
92 # documentation.
93 #
94 # html_theme_options = {}
95 
96 # Add any paths that contain custom static files (such as style sheets) here,
97 # relative to this directory. They are copied after the builtin static files,
98 # so a file named "default.css" will overwrite the builtin "default.css".
99 html_static_path = ["_static"]
100 
101 # Custom sidebar templates, must be a dictionary that maps document names
102 # to template names.
103 #
104 # The default sidebars (for documents that don't match any pattern) are
105 # defined by theme itself.  Builtin themes are using these templates by
106 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
107 # 'searchbox.html']``.
108 #
109 # html_sidebars = {}
110 
111 html_show_sourcelink = False
112 
113 
114 # -- Options for HTMLHelp output ---------------------------------------------
115 
116 # Output file base name for HTML help builder.
117 htmlhelp_basename = "Streamlitdoc"
118 
119 
120 # -- Options for LaTeX output ------------------------------------------------
121 
122 latex_elements = {
123     # The paper size ('letterpaper' or 'a4paper').
124     #
125     # 'papersize': 'letterpaper',
126     # The font size ('10pt', '11pt' or '12pt').
127     #
128     # 'pointsize': '10pt',
129     # Additional stuff for the LaTeX preamble.
130     #
131     # 'preamble': '',
132     # Latex figure (float) alignment
133     #
134     # 'figure_align': 'htbp',
135 }
136 
137 # Grouping the document tree into LaTeX files. List of tuples
138 # (source start file, target name, title,
139 #  author, documentclass [howto, manual, or own class]).
140 latex_documents = [
141     (
142         master_doc,
143         "Streamlit.tex",
144         u"Streamlit Documentation",
145         u"Streamlit Inc.",
146         "manual",
147     )
148 ]
149 
150 
151 # -- Options for manual page output ------------------------------------------
152 
153 # One entry per manual page. List of tuples
154 # (source start file, name, description, authors, manual section).
155 man_pages = [(master_doc, "streamlit", u"Streamlit Documentation", [author], 1)]
156 
157 
158 # -- Options for Texinfo output ----------------------------------------------
159 
160 # Grouping the document tree into Texinfo files. List of tuples
161 # (source start file, target name, title, author,
162 #  dir menu entry, description, category)
163 texinfo_documents = [
164     (
165         master_doc,
166         "Streamlit",
167         u"Streamlit Documentation",
168         author,
169         "Streamlit",
170         "One line description of project.",
171         "Miscellaneous",
172     )
173 ]
174 
175 
176 # -- Options for Epub output -------------------------------------------------
177 
178 # Bibliographic Dublin Core info.
179 epub_title = project
180 
181 # The unique identifier of the text. This can be a ISBN number
182 # or the project homepage.
183 #
184 # epub_identifier = ''
185 
186 # A unique identification for the text.
187 #
188 # epub_uid = ''
189 
190 # A list of files that should not be packed into the epub file.
191 epub_exclude_files = ["search.html"]
192 
193 
194 # -- Extension configuration -------------------------------------------------
195 
196 
197 autodoc_default_flags = ["members"]
198 autosummary_generate = True
199 html_copy_source = False
200 
201 # At the bottom of conf.py
202 def setup(app):
203     app.add_config_value(
204         "recommonmark_config",
205         {
206             "url_resolver": lambda url: github_doc_root + url,
207             "auto_toc_tree_section": "Contents",
208         },
209         True,
210     )
211     app.add_transform(AutoStructify)
212
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -90,8 +90,10 @@
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#
-# html_theme_options = {}
+
+html_theme_options = {
+    "analytics_id": "UA-122023594-3",
+}
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -90,8 +90,10 @@\n # Theme options are theme-specific and customize the look and feel of a theme\n # further.  For a list of options available for each theme, see the\n # documentation.\n-#\n-# html_theme_options = {}\n+\n+html_theme_options = {\n+    \"analytics_id\": \"UA-122023594-3\",\n+}\n \n # Add any paths that contain custom static files (such as style sheets) here,\n # relative to this directory. They are copied after the builtin static files,\n", "issue": "On rerun, faded elements are becoming opaque one by one. Instead they become opaque all at once.\nSteps to repro:\r\n1. Run `examples/reference.py`\r\n2. When done, rerun it.\r\n\r\n**Expected:** on rerun, all elements fade out and then become opaque one by one even before the run is done.\r\n**Actual:** on rerun, all elements fade out and only become opaque when the entire run is done.\r\n\r\nI believe this bug was introduced with the Sidebar code.\n", "before_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n# -*- coding: utf-8 -*-\n\nimport recommonmark\nfrom recommonmark.transform import AutoStructify\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n\nimport os\nimport sys\n\nsys.path.insert(0, os.path.abspath(\"..\"))\nsys.path.append(os.path.abspath(\"./_ext\"))\n\n\n# -- Project information -----------------------------------------------------\n\nproject = u\"Streamlit\"\ncopyright = u\"2019, Streamlit Inc.\"\nauthor = u\"Streamlit Inc.\"\ndisplay_version = True\n\n# The full version, including alpha/beta/rc tags\nimport streamlit as st\n\nrelease = st.__version__\n\n# The short X.Y version\nversion = \".\".join(st.__version__.split(\".\")[0:2])\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.githubpages\",\n    \"sphinx.ext.napoleon\",\n    \"recommonmark\",\n    \"stoutput\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\nsource_suffix = [\".rst\", \".md\"]\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nwith open(os.path.abspath(\"./exclude\")) as exclude_file:\n    exclude_patterns = [line.strip() for line in exclude_file.readlines()]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'alabaster'\nhtml_theme = \"sphinx_rtd_theme\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\n# html_theme_options = {}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\nhtml_show_sourcelink = False\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Streamlitdoc\"\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\n        master_doc,\n        \"Streamlit.tex\",\n        u\"Streamlit Documentation\",\n        u\"Streamlit Inc.\",\n        \"manual\",\n    )\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"streamlit\", u\"Streamlit Documentation\", [author], 1)]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"Streamlit\",\n        u\"Streamlit Documentation\",\n        author,\n        \"Streamlit\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    )\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = [\"search.html\"]\n\n\n# -- Extension configuration -------------------------------------------------\n\n\nautodoc_default_flags = [\"members\"]\nautosummary_generate = True\nhtml_copy_source = False\n\n# At the bottom of conf.py\ndef setup(app):\n    app.add_config_value(\n        \"recommonmark_config\",\n        {\n            \"url_resolver\": lambda url: github_doc_root + url,\n            \"auto_toc_tree_section\": \"Contents\",\n        },\n        True,\n    )\n    app.add_transform(AutoStructify)\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n# -*- coding: utf-8 -*-\n\nimport recommonmark\nfrom recommonmark.transform import AutoStructify\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n\nimport os\nimport sys\n\nsys.path.insert(0, os.path.abspath(\"..\"))\nsys.path.append(os.path.abspath(\"./_ext\"))\n\n\n# -- Project information -----------------------------------------------------\n\nproject = u\"Streamlit\"\ncopyright = u\"2019, Streamlit Inc.\"\nauthor = u\"Streamlit Inc.\"\ndisplay_version = True\n\n# The full version, including alpha/beta/rc tags\nimport streamlit as st\n\nrelease = st.__version__\n\n# The short X.Y version\nversion = \".\".join(st.__version__.split(\".\")[0:2])\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.githubpages\",\n    \"sphinx.ext.napoleon\",\n    \"recommonmark\",\n    \"stoutput\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\nsource_suffix = [\".rst\", \".md\"]\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nwith open(os.path.abspath(\"./exclude\")) as exclude_file:\n    exclude_patterns = [line.strip() for line in exclude_file.readlines()]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\n# html_theme = 'alabaster'\nhtml_theme = \"sphinx_rtd_theme\"\n\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n\nhtml_theme_options = {\n    \"analytics_id\": \"UA-122023594-3\",\n}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\nhtml_show_sourcelink = False\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Streamlitdoc\"\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\n        master_doc,\n        \"Streamlit.tex\",\n        u\"Streamlit Documentation\",\n        u\"Streamlit Inc.\",\n        \"manual\",\n    )\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"streamlit\", u\"Streamlit Documentation\", [author], 1)]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"Streamlit\",\n        u\"Streamlit Documentation\",\n        author,\n        \"Streamlit\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    )\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = [\"search.html\"]\n\n\n# -- Extension configuration -------------------------------------------------\n\n\nautodoc_default_flags = [\"members\"]\nautosummary_generate = True\nhtml_copy_source = False\n\n# At the bottom of conf.py\ndef setup(app):\n    app.add_config_value(\n        \"recommonmark_config\",\n        {\n            \"url_resolver\": lambda url: github_doc_root + url,\n            \"auto_toc_tree_section\": \"Contents\",\n        },\n        True,\n    )\n    app.add_transform(AutoStructify)\n", "path": "docs/conf.py"}]}