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

Mobx SOS #4167

Merged
merged 14 commits into from
May 4, 2020
Merged

Mobx SOS #4167

merged 14 commits into from
May 4, 2020

Conversation

na9da
Copy link
Collaborator

@na9da na9da commented Mar 27, 2020

What this PR does

Partially Fixes #3896

Ports SensorObservationCatalogItem:

  • Mode 1 - fetching features data and observation data separately
  • Show units for charts
  • Show multiple selectors one for each observed property
  • The generated XML should confirm to the XSD spec (Invalid SOS requests #3705)

Not handled in this PR:

  • Mode 2 - fetching features and observation data together. This requires timeseries tables to be ported first
  • Refactor ChartCustomComponent to be more generic so that a single '' component can handle all chart components instead of introducing new ones like <air-quality-chart> or <sos-chart>

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated CHANGES.md with what I changed.

@na9da na9da changed the title Mobx sos Mobx SOS Mar 31, 2020
@na9da
Copy link
Collaborator Author

na9da commented Apr 1, 2020

@soyarsauce
Copy link
Contributor

image
One thing I noticed was the misplaced icon in the dropdown menu here

@nf-s
Copy link
Contributor

nf-s commented Apr 16, 2020

image
One thing I noticed was the misplaced icon in the dropdown menu here

I fix this in #4219 :
csv-dimensions

@na9da na9da marked this pull request as ready for review April 22, 2020 01:05
@steve9164 steve9164 self-requested a review April 22, 2020 05:03
@steve9164
Copy link
Member

Reviewing now.

@@ -29,7 +29,7 @@ module.exports = function(hot, dev) {
{
// Don't let jasmine-ajax detect require and import jasmine-core, because we bring
// in Jasmine via a script tag instead.
test: require.resolve('terriajs-jasmine-ajax'),
test: require.resolve('jasmine-ajax'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @na9da. Can you explain changing terriajs-jasmine-ajax to jasmine-ajax?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it one/a mix of:

  • Everything we needed in jasmine-ajax got merged upstream
  • We no longer need the things we did need to make the custom package for because we're not using Browserify any more

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial reasoning was that our fork is 4 years old and hey this change didn't break any tests so lets ship it 😄 I was also looking to use a feature that didn't exist in our fork.

Then I found this PR from Kevin. I think the code he is trying to fix is no longer present in upstream. We are also not using browserify any more. So I guess it ticks both of your rationale.

lib/Table/TableAutomaticStylesStratum.ts Outdated Show resolved Hide resolved
checkAllPropertyKeys(node.attribs, this.attributes);

const catalogItem: SensorObservationServiceCatalogItem = <any>(
context.catalogItem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be certain this is a SOS catalog item? If not it might be better to throw a TerriaError if it's not SOS chart compatible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by throwing DeveloperError. I think that's more appropriate here.

@@ -19,6 +20,7 @@ import CustomComponent from "./CustomComponent";
*/
const registerCustomComponentTypes = function(terria) {
CustomComponent.register(new ChartCustomComponent());
CustomComponent.register(new SOSChartCustomComponent());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a custom chart component for SOS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current chart component is dependent on CsvCatalogItem. I have created a ticket for writing a more generic chart component #4264.

lib/Table/TableStyle.ts Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

None yet

4 participants