diff --git a/apps/wizard/app_pages/chart_diff/chart_diff_show.py b/apps/wizard/app_pages/chart_diff/chart_diff_show.py index 904ebf49e18..c7ba8b98c8d 100644 --- a/apps/wizard/app_pages/chart_diff/chart_diff_show.py +++ b/apps/wizard/app_pages/chart_diff/chart_diff_show.py @@ -28,16 +28,19 @@ gm.ChartStatus.APPROVED.value: { "label": "Approve", "color": "green", + # "icon": ":material/done_outline:", "icon": "✅", }, gm.ChartStatus.REJECTED.value: { "label": "Reject", "color": "red", + # "icon": ":material/delete:", "icon": "❌", }, gm.ChartStatus.PENDING.value: { "label": "Pending", "color": "gray", + # "icon": ":material/schedule:", "icon": "⏳", }, } @@ -89,20 +92,20 @@ def box_label(self): This contains the state of the approval (by means of an emoji), the slug of the chart, and any tags (like "NEW" or "DRAFT"). """ - label = self.diff.slug + label = f"{self.diff.slug} " tags = [] if self.diff.is_new: - tags.append(" :blue-background[**NEW**]") + tags.append(" :blue-background[:material/grade: **NEW**]") if self.diff.is_draft: - tags.append(" :gray-background[**DRAFT**]") + tags.append(" :gray-background[:material/draft: **DRAFT**]") for change in self.diff.change_types: - tags.append(f":red-background[**{change.upper()} CHANGE**]") + tags.append(f":red-background[:material/refresh: **{change.upper()} CHANGE**]") # Add TAG if modified and no change_types is provided if (self.diff.is_modified) and (tags == []): - label += ":break[:rainbow-background[**UNKNOWN -- REPORT THIS**]]" + label += ":rainbow-background[**UNKNOWN -- REPORT THIS**]" else: - label += f":break[{' '.join(tags)}]" + label += f"{' '.join(tags)}" return label @property @@ -497,7 +500,7 @@ def _show(self) -> None: # SHOW MODIFIED CHART if self.diff.is_modified: - tab1, tab2, tab3 = st.tabs(["Charts", "Config diff", "Change history"]) + tab1, tab2, tab3 = st.tabs(["Charts", "Config diff", "Status log"]) with tab1: self._show_chart_comparison() with tab2: @@ -507,7 +510,7 @@ def _show(self) -> None: # SHOW NEW CHART elif self.diff.is_new: - tab1, tab2 = st.tabs(["Chart", "Change history"]) + tab1, tab2 = st.tabs(["Chart", "Status log"]) with tab1: self._show_chart_comparison() with tab2: diff --git a/apps/wizard/app_pages/expert/prompts.py b/apps/wizard/app_pages/expert/prompts.py index 83ec8c2dbcd..364deecede3 100644 --- a/apps/wizard/app_pages/expert/prompts.py +++ b/apps/wizard/app_pages/expert/prompts.py @@ -153,6 +153,7 @@ def read_page_md(page_path: str) -> str: """ # DATASETTE ORACLE +# TODO: Schema should be auto-generated. Maybe extract from http://analytics/private.json? Problem: how can one get the variable names linking tables? SYSTEM_PROMPT_DATASETTE = """ ## Datasette Oracle V2 @@ -635,5 +636,5 @@ def read_page_md(page_path: str) -> str: Your job is to create a SQL query for the user that answers their question given the schema above. You may ask the user for clarification, e.g. if it is unclear if unpublished items should be included (when applicable) or if there is ambiguity in which tables to use to answer a question. -Upon generating a query, Datasette Oracle will always provide the SQL query both as text and as a clickable Datasette link, formatted for the user's convenience. The datasette URL is http://datasette-private and the database name is owid. An example query to get all rows from the algolia_searches_by_week table is this one that demonstrates the escaping: `http://datasette-private/owid?sql=select+*+from+algolia_searches_by_week` Remember, you cannot actually run the SQL query, you are just to output the query as text and a datasette link that will run that query! +Upon generating a query, Datasette Oracle will always provide the SQL query both as text and as a clickable Datasette link, formatted for the user's convenience. The datasette URL is http://analytics/private and the database name is owid. An example query to get all rows from the algolia_searches_by_week table is this one that demonstrates the escaping: `http://analytics/private?sql=select+*+from+algolia_searches_by_week` Remember, you cannot actually run the SQL query, you are just to output the query as text and a datasette link that will run that query! """