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

Superschemes follow up #384

Open
Pete-Y-CS opened this issue Nov 6, 2023 · 2 comments
Open

Superschemes follow up #384

Pete-Y-CS opened this issue Nov 6, 2023 · 2 comments
Assignees

Comments

@Pete-Y-CS
Copy link
Contributor

  • Rename subschemes to scheme (consistently)
  • Always list all interventions (they're currently in a collapsing card per scheme/subscheme), but group them by scheme/subscheme
@Pete-Y-CS Pete-Y-CS self-assigned this Nov 6, 2023
@dabreegster
Copy link
Contributor

There are some notes in both #387 and #379 (comment) about how this should all work. Since it's a complex change, we could find a way to break it down into a few PRs with smaller steps. I haven't thought about it carefully, but how about:

  1. First change the GJ format to make room for multiple schemes in a single file. We already have scheme_reference in InterventionProps and AllSchemeGJ used in the browse page. The Scheme interface has 4 foreign member properties, but I think scheme_name and the optional pipeline should both get moved into a new place. We can first define what the new thing looks like, make the backfill function convert the old single-scheme file into a multi-scheme file with just one scheme filled out. No UI changes yet, and some tests (that may already exist) to make sure the old format loads fine.

  2. Then the basic UI elements, maybe following the mockup with layer style in one of the PRs linked. Add a new scheme, delete a scheme, move interventions between schemes.

  3. Then the nicer UI bits -- color things in a scheme, show/hide the whole thing as a layer.

The GJ file should be usable in browse mode, and nothing should be tied to the pipeline schema at all. You should be able to load multiple ATF4 or v1 schemes at the same time. If you filtered the all_schemes.geojson file we're using in browse mode right now for one authority, that should work in the sketch page

@dabreegster
Copy link
Contributor

Copying the draft from the call:

// TODO this name is now wrong
export interface Scheme {
  type: "FeatureCollection";
  features: FeatureUnion[];
  // Foreign members
  authority?: string;
  origin?: string;

  // scheme_reference in each FeatureUnion is keyed to this
  schemes: { [name: string]: SchemeData };
}

interface SchemeData {
        scheme_name: string;
        pipeline?: PipelineScheme;
        browse?: BrowseSchemeData;
}

interface BrowseSchemeData {
  num_features: number;
  authority_or_region: string;
  capital_scheme_id: string;
  funding_programme: string;
} 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants