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

transition existing vue app to new modernized gauge API #591

Merged
merged 70 commits into from
Oct 30, 2024

Conversation

ngottlieb
Copy link
Contributor

@ngottlieb ngottlieb commented Apr 3, 2024

This PR will hold most of the changes for #585, but not the edit flows interface (since that can be released separately, later, if needed).

Currently, it includes:

@@ -25,6 +25,8 @@
"@mapbox/mapbox-gl-draw": "^1.1.2",
"@mapbox/mapbox-gl-draw-static-mode": "^1.0.1",
"@tinymce/tinymce-vue": "^3.2.8",
"@trpc/client": "^11.0.0-next-beta.264",
"@trpc/server": "^11.0.0-next-beta.264",
Copy link
Member

Choose a reason for hiding this comment

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

Does the vue app need to depend on the server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, unfortunately you can't just use the client

@@ -25,6 +25,8 @@
"@mapbox/mapbox-gl-draw": "^1.1.2",
"@mapbox/mapbox-gl-draw-static-mode": "^1.0.1",
"@tinymce/tinymce-vue": "^3.2.8",
"@trpc/client": "^11.0.0-next-beta.264",
Copy link
Member

Choose a reason for hiding this comment

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

I recall having issues with diverging versions. Right now, everything else is on 10.43.0 should we standardize?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll drop back to 10.43 and report back if I have any issues!

}),
readingIsEstimated () {
return this.river?.readingsummary?.gauge_estimated
// TODO: decide how to handle secondary gauges. do we fall back if primary isn't reporting?
Copy link
Member

Choose a reason for hiding this comment

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

cc @AWKevin - I think we decided that not falling back is ultimately more clear.

@ngottlieb ngottlieb force-pushed the feature/migrate-to-modernized-gauge-api branch from 7e08087 to b3ce1d4 Compare April 10, 2024 02:05
Copy link
Member

@tallowen tallowen left a comment

Choose a reason for hiding this comment

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

Looks great! What's our plan for landing this - will does it need anything else before it can go live?

},
adjustedReachGrade () {
if (this.gaugeCorrelation && this.gaugeCorrelation.status && this.gaugeCorrelation.correlationDetails) {
const adjustedGradeKey = this.gaugeCorrelation.status.status.replace(/-([a-z])/g, g => g[1].toUpperCase());
Copy link
Member

Choose a reason for hiding this comment

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

We can probably render something different serverside if that's helpful?

@ngottlieb
Copy link
Contributor Author

@tallowen I guess broadly speaking, I was imagining I would finish the read components of https://github.com/orgs/AmericanWhitewater/projects/4?pane=issue&itemId=57895707 (i.e. everything except the edit flows interface) before we launched it. And that we would take some steps to establish that we were, I guess, ready to be in "production mode" with the new gauge API.

but maybe I'm overthinking and we should just go for it? not a lot to lose...

@tallowen
Copy link
Member

Makes sense! I think there are a couple things to get done on the backend before general availability but I'd love to start trying the read versions on beta or something.

@ngottlieb ngottlieb force-pushed the feature/migrate-to-modernized-gauge-api branch from 2e0a078 to b7d55ca Compare May 20, 2024 22:17
@ngottlieb ngottlieb force-pushed the feature/migrate-to-modernized-gauge-api branch from ad905b5 to 2cff69b Compare June 3, 2024 17:01
ngottlieb added 28 commits July 4, 2024 11:41
@ngottlieb ngottlieb merged commit c7a1ea2 into development Oct 30, 2024
1 check passed
@ngottlieb ngottlieb deleted the feature/migrate-to-modernized-gauge-api branch October 30, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants