From cdf1ef567e01407ba6ce46e9999f3a9188fe6e81 Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Wed, 24 Jan 2024 11:58:14 -0600 Subject: [PATCH 1/2] Add stars to Final Columns --- src/pages/maps/ingestion/@id/edit-table.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/maps/ingestion/@id/edit-table.ts b/src/pages/maps/ingestion/@id/edit-table.ts index b0538d42..9e1deb7e 100644 --- a/src/pages/maps/ingestion/@id/edit-table.ts +++ b/src/pages/maps/ingestion/@id/edit-table.ts @@ -396,7 +396,10 @@ export default function TableInterface({ url }: EditTableProps) { }, }, [ - h("span.selected-column", {}, [columnName]), + h("span.selected-column", {}, [ + columnName, + h.if(FINAL_COLUMNS.includes(columnName))(Icon, {icon: "star-empty", size: "12", color: "#333333", style: {marginLeft: "5px", marginBottom: "2px"}}) + ]), h.if( (columnName in dataParameters.filter && dataParameters.filter[columnName].is_valid()) || From 1d0af97b54e65e877f4ce14dd659565bc40fd600 Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Wed, 24 Jan 2024 12:07:37 -0600 Subject: [PATCH 2/2] Add docs and a link to them --- src/pages/maps/ingestion/@id/README.md | 79 +++++++++++++++++++++++ src/pages/maps/ingestion/@id/edit-page.ts | 18 +++++- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/src/pages/maps/ingestion/@id/README.md b/src/pages/maps/ingestion/@id/README.md index 829bac84..da695b84 100644 --- a/src/pages/maps/ingestion/@id/README.md +++ b/src/pages/maps/ingestion/@id/README.md @@ -12,3 +12,82 @@ Features: - View of running operations, as well as push and clear functionality - Virtualized 'infinite' scrolling of table data to keep data downloads web friendly - Group based auth to prevent outside changes + + +## Using the Editing Interface + +- [Overview](#overview) +- [Starred Column Descriptions](#starred-column-description) +- [Table Commands]() + +### Overview + +This ingestion interface is used to clean/transform ingested maps legend data. + +The starred columns (★) denote the columns +that are intended to be populated by the non-star columns which are populated via the ingestion process. + +### Starred Column Description + +All the columns in addition to these are filled in from the ingested map and can typically be transformed via the +table interface to populate these values. Otherwise, we provide the original .zip file that was ingested to help locate the +appropriate README files. + +#### orig_id + +This columns is composed of ids for each polygon. The best way to populate this is to copy and paste the column from +the ingestion that most closely resembles a list of discrete values. + +#### descrip + +This column is the description of the polygon. + +#### ready + +This column is a **True/False** column used to denote a row as "Ready". These "Ready" rows can then be removed by a column filter. + +#### name + +Name of the polygon, typically taken from the ingestion. + +#### strat_name + +Name of the stratigraphy. + +#### age + +Age of the polygon. + +#### comments + +Any comments that you would like to make can be entered here. + +#### t_interval + +? + +#### b_interval + +? + +#### lith + +? + +### Table Commands + +**tab/shift + tab** + +Navigate Cells Horizontally + +**enter/shift + enter** + +Navigate Cells Vertically + +**cmd + c ( Well a column is selected )** + +Copy a column + +**cmd + v ( Well a column is selected )** + +Paste a column \ No newline at end of file diff --git a/src/pages/maps/ingestion/@id/edit-page.ts b/src/pages/maps/ingestion/@id/edit-page.ts index 83b6c106..218f237a 100644 --- a/src/pages/maps/ingestion/@id/edit-page.ts +++ b/src/pages/maps/ingestion/@id/edit-page.ts @@ -8,7 +8,7 @@ import { WidthAdjustablePanel } from "./components"; import MapInterface from "./map-interface"; import { useStoredState } from "@macrostrat/ui-components"; import { ParentRouteButton } from "~/components/map-navbar"; -import { Button, HotkeysProvider } from "@blueprintjs/core"; +import { Button, AnchorButton, HotkeysProvider, Icon } from "@blueprintjs/core"; export const h = hyper.styled(styles); @@ -56,7 +56,10 @@ export default function EditInterface({ h([ h("div.edit-page-header", [ h(ParentRouteButton, { parentRoute: "/maps/" }), - h("h2", title), + h("h2", {}, [ + `${title} Ingestion`, + h(ShowDocsButton, {href: "https://github.com/UW-Macrostrat/web/blob/main/src/pages/maps/ingestion/%40id/README.md"}), + ]), h("div.spacer"), h("div.edit-page-buttons", [ h(ShowMapButton, { showMap, setShowMap }), @@ -85,6 +88,17 @@ export default function EditInterface({ ]); } +function ShowDocsButton({href}: {href: string}) { + return h(AnchorButton, { + minimal: true, + title: "View Ingestion Documentation", + icon: "manual", + target: "_blank", + large: true, + href: href + }); +} + function ShowMapButton({ showMap, setShowMap }) { return h(Button, { minimal: true,