-
Notifications
You must be signed in to change notification settings - Fork 51
[WIP] Overhaul symbology schema and menus #754
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
base: main
Are you sure you want to change the base?
Conversation
27220fa
to
71b761b
Compare
71b761b
to
966064c
Compare
@martinRenou @arjxn-py @gjmooney I'd love to hear anyone's thoughts about what I'm doing in c6af37c. Read the commit message for context. It's not ideal, but I believe it's a necessary cost to using our code generation tools. This will enable us to extract common field definitions into separate files that can be shared between schemas. This presents a new problem, however; the TypeScript type generation dereferences schemas instead of importing from referenced schemas. So when we include references, we render both the referenced schema and also render the same schema within schemas that reference it. So when we attempt to import those referenced schemas in Having different code generation tools which expect different things and have different output behaviors is very difficult to reason about! |
@@ -10,7 +10,6 @@ | |||
}, | |||
"selectedAttribute": { | |||
"type": "string", | |||
"title": "Attribute", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use this for form generation, but it's also affecting type generation.
c69adb6
to
5875068
Compare
We don't use the "state" suffix for anything else :) Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: Kristin Davis <kristin.p.davis@gmail.com>
Co-authored-by: Kristin Davis <kristin.p.davis@gmail.com> Co-authored-by: martinRenou <martin.renou@gmail.com>
…work with $refs The root problem is that our TS-type-generation tool, jsonschema-to-typescript, expects $ref paths to be relative to the schema root directory, while our Python-type-generation tool, datamodel-codegen, expects $ref paths to be relative to the file containing the $ref. To work around this, I'm adding a pre-processing step to the Python type generation code which converts the paths to look like datamodel-codegen expects.
5875068
to
85901c5
Compare
Description
The functionality we offer in the symbology menu has diverged from the schema. For example, we now offer the ability to set render type for color and radius independently, and the schema doesn't support that yet.
We also recognized that having a heatmap layer type is a mismatched abstraction; it should just be a render type. We're planning to remove that layer type in this PR as well.
TODO:
SUPPORTED_SCHEMA_BOUNDS = ["0.6.0", "*"]
and raise error if the project file's schema version is outside the bounds)create_color_expr
-- rethink the API from scratch maybe? Make aSymbology
class? Use generated class from the schema?add_heatmap_layer
Checklist
Resolves #XXX
.Failing lint checks can be resolved with:
pre-commit run --all-files
jlpm run lint