Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs #132

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions src/pages/maps/ingestion/@id/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 16 additions & 2 deletions src/pages/maps/ingestion/@id/edit-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 }),
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/pages/maps/ingestion/@id/edit-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()) ||
Expand Down
Loading