Git Product home page Git Product logo

Comments (4)

gino-m avatar gino-m commented on September 1, 2024 1

Records are stored in the Ground database at the following path:
/projects/<PROJECT_ID>/records/<RECORD_ID>

Schema template:

{
  featureId: ...,      // Associated feature
  featureTypeId: ...,  // "layerId" in future versions.
  formId: ...,         // Associated observation form layout
  responses: {
    <FIELD_ID>:  // Id of related field element in form
    <RESPONSE>   // Value(s) entered by user
    ...
  }
  created: <AUDIT_METADATA>,
  lastModified: <AUDIT_METADATA>
}

<RESPONSE>'s type varies depending on the field type:

  • String: Text values (e.g., "Pandas")
  • float: Numeric value (e.g., 12.4)
  • String array: Select one/many (e.g., ["A"] or ["A", "B"]). String values correspond to codes defined by user for each multiple choice option.

<AUDIT_METADATA> :=

  user: {
    id: ...,
    displayName: ...,
    email: ...
  },
  clientTimestamp: ..., // Time on client, timestamp datatype.
  serverTimestamp: ..., // Time on server, timestamp datatype.

Creation/modified dates differs slightly from the current schema, but we are reimplementing these in the Android app now, so it's a good time to consolidate them.

Note that Record will be renamed Observation in future versions (#81).

TODO(#84): Add this to the Wiki.

from ground-platform.

gino-m avatar gino-m commented on September 1, 2024

Hi @gyarill!

Some notes from our recent design discussions:

  1. We'll use the URL for project and feature select, in the format /p/{projectId}/f/{featureId}
  2. We'll create a separate js module with the matchers for these paths to be used by the custom path change reducer, and by React routers
  3. The path reducer will put the selectedFeatureId into the Redux store as global state (note that selected != active as in activeProject..).
  4. The selected feature is already be in the Redux store thanks to this. It will then be accessible using the selectedProjectId.
  5. The connected Firestore HOC will bind to that id and load the relevant records for the selected feature.

Makes sense? Please feel free to reorganize as you see fit! Please send a PR to the branch feature-details.

~gm

from ground-platform.

gino-m avatar gino-m commented on September 1, 2024

@hintzemichael Could you kindly past in the latest mock for this, with new "Add" button label/style? Let's discuss.

from ground-platform.

gino-m avatar gino-m commented on September 1, 2024

Moved URL update to separate issue #69

from ground-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.