Skip to content

Commit

Permalink
Make the schema browser section a subheading on table page (#831)
Browse files Browse the repository at this point in the history
This makes more sense and paves the way for other refactoring in #828.
  • Loading branch information
wlach authored Sep 14, 2021
1 parent 12068e5 commit 30cebd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2340,12 +2340,6 @@ exports[`Storyshots Schema Viewer Basic 1`] = `
<div
class="schema-viewer svelte-i7idum"
>
<h1
class="svelte-df8e92"
>
Schema
</h1>
<div
class="svelte-ggdpb7"
>
Expand Down
4 changes: 0 additions & 4 deletions src/components/SchemaViewer.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<script>
import SchemaNode from "./SchemaNode.svelte";
import FilterInput from "./FilterInput.svelte";
import PageTitle from "./PageTitle.svelte";
import { pageState } from "../state/stores";
export let app;
Expand Down Expand Up @@ -50,8 +48,6 @@
</script>

<div class="schema-viewer">
<PageTitle text={"Schema"} />

<FilterInput />
<div class="schema-browser">
<p>
Expand Down
6 changes: 6 additions & 0 deletions src/pages/TableDetail.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
import HelpHoverable from "../components/HelpHoverable.svelte";
import SchemaViewer from "../components/SchemaViewer.svelte";
import SubHeading from "../components/SubHeading.svelte";
import { getTableData } from "../state/api";
import { pageTitle } from "../state/stores";
Expand Down Expand Up @@ -70,6 +71,11 @@
<a href="https://docs.telemetry.mozilla.org">docs.telemetry.mozilla.org</a>
.
</p>

<SubHeading
title={"Schema Browser"}
helpText={"Browse and filter the BigQuery schema for this table."}
/>
<SchemaViewer app={params.app} nodes={table.bq_schema} />
{:catch}
<NotFound pageName={params.appId} itemType="table" />
Expand Down

0 comments on commit 30cebd8

Please sign in to comment.