Skip to content

Conversation

@charlieforward9
Copy link
Contributor

@charlieforward9 charlieforward9 commented Jan 19, 2025

Tried bumping the most important (primarily those within the visgl org) dependencies up to their latest versions and fixing the build issues that came along with them.

Closes #277
Closes #283
For #309

Copy link
Collaborator

@chrisgervang chrisgervang left a comment

Choose a reason for hiding this comment

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

Thank you! This is a great start. I think we'll want to switch to using the MapboxOverlay since MapboxLayer has been deprecated, but it still works as-is we can do that in a follow up PR.

import {MapRef, StaticMap, StaticMapProps} from 'react-map-gl';
import {MapboxLayer} from '@deck.gl/mapbox/typed';
import type {DeckProps, MapViewState} from '@deck.gl/core/typed';
import {MapboxOverlay as MapboxLayer} from '@deck.gl/mapbox';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, this actually isn't a drop-in replacement and will require some changes to work. http://deck.gl/docs/upgrade-guide#deckglmapbox

Copy link
Collaborator

Choose a reason for hiding this comment

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

As a temporary fix I believe we can still import MapboxLayer with import MapboxLayer from '@deck.gl/mapbox/mapbox-layer'

Copy link
Contributor Author

@charlieforward9 charlieforward9 Jan 19, 2025

Choose a reason for hiding this comment

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

Rather get this out of the way now. Im not getting any type errors, and all instances in the src/ folder implement the same props {id: ..., ...deck} where id is a string and deck is a Deck obj that may have also been changed in v9 to reflect the change. Let me know.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The API is different in MapboxOverlay. It creates a deck instance rather than getting passed an instance and that inversion would require a bit of refactoring

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chrisgervang

I replaced the deck instance with the deck props in 03a2f0f

I see that the link shows that MapboxLayer to MapboxOverlay shows interleaved: true as the replacement. Should the updated API include this?

@charlieforward9
Copy link
Contributor Author

Would this also close #251 and #277?

import {MapRef, StaticMap, StaticMapProps} from 'react-map-gl';
import {MapboxLayer} from '@deck.gl/mapbox/typed';
import type {DeckProps, MapViewState} from '@deck.gl/core/typed';
import {MapboxOverlay as MapboxLayer} from '@deck.gl/mapbox';
Copy link
Collaborator

Choose a reason for hiding this comment

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

The API is different in MapboxOverlay. It creates a deck instance rather than getting passed an instance and that inversion would require a bit of refactoring

@chrisgervang
Copy link
Collaborator

Would this also close #251 and #277?

#251, maybe. #277, not yet since it would require the addition of a MapView with a white clearColor in the PR, I imagine.

@chrisgervang
Copy link
Collaborator

Not all users (e.g. Kepler.gl) are able to upgrade to deck v9 yet, so I'm considering a hubble 1.4 release with support for the latest version of deck v8 and bumping Hubble.gl to 2.0 for deck v9 support.

@charlieforward9
Copy link
Contributor Author

charlieforward9 commented Jan 22, 2025

2.0 for deck v9 support

My dependent repo uses deck v9, so I'll aim this PR for 2.0. I am happy to do dig into the MapboxOverlay refactor in the coming days to get that out of the way as well. (Although it strangely does not throw any lint errors when passing deck in as of now)

@charlieforward9
Copy link
Contributor Author

charlieforward9 commented Jan 23, 2025

@chrisgervang can we get a 2.0-alpha version released from this PR? Not entirely sure how that'd happen given its monorepo configuration? I'd like to start testing with my dependent application without having to wait for this to land, especially if youre trying to ship a 1.4 version first.

Thank you.

@charlieforward9
Copy link
Contributor Author

@chrisgervang what your roadmap for this PR looking like?

I've been waiting to see this land before getting back to the side project I've been looking to enhance with this.

Anything I can help with?

@chrisgervang
Copy link
Collaborator

I'm actively updating all of the examples to use MapboxOverlay.

Then I'll be going through the release process of 1.4, which includes updating dependencies in the existing website and publishing a beta (and assuming all is good, immediately graduating to production).

Then we can upgrade to deck 9 with this PR, and I think it could make sense to bump to 2.0 at that point.

At some point soon I'd like to upgrade the website to use the latest vis.gl docusorus template instead of gatsby since it's a lot less painful to maintain. This can happen in parallel to the releases.

@chrisgervang
Copy link
Collaborator

Hey @charlieforward9 you can merge master in, I don't think they'll be many other changes

@charlieforward9
Copy link
Contributor Author

charlieforward9 commented Jan 31, 2025

@chrisgervang Ok, I'll follow your lead. Just keep me in touch and I'll help out.

When you said I can merge master in, what do you mean? I do not have merge access.

@chrisgervang
Copy link
Collaborator

Oh I just meant I've pushed changes to master that you'll need to merge into your branch here

@chrisgervang
Copy link
Collaborator

Just released 1.4! If you have time, I would appreciate it if you could merge in the latest changes and test the examples in the website

yarn bootstrap
cd website && yarn
yarn start

Then navigate to the examples in the site and try rendering different formats.
Then let's try a website static build.. yarn build then yarn serve

I think getting 9.0 in the examples, and keeping some kind of compatibility with kepler.gl (which is on deck 8.9) are the high priority issues to release 2.0. I'm hoping to include #305, #300, and #231 in 2.0 but we don't need to consider them blockers.

@charlieforward9
Copy link
Contributor Author

@chrisgervang thanks! Looking forward to it.

Just an fyi, I tried an example in the website last night, specifically the Kepler one, and tried exporting some of the sample datasets as GIF, and it would not download, eventually crashing the page.

Not sure if I'm doing something wrong here as I'm not too experienced with Kepler, but I wanted to point that out as I dove into this.

@chrisgervang
Copy link
Collaborator

Good to know - kepler is the most complicated example, maybe try the simplest quick start one and move up to the trips one

@chrisgervang chrisgervang changed the title chore: bump deps chore: bump to deck 9.1 Feb 8, 2025
"build-bundle": "ocular-bundle ./bundle.ts"
},
"dependencies": {
"@loaders.gl/core": "^3.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to use the version of loaders on master since there's an issue with GIF encoding the videos module in later versions, and we're not using anything from the newer version of loaders

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^3.4.13 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to bump to deck9.1, I need @loaders.gl/core@"^4.2.0", where is the encoding issue discussed?

Copy link
Collaborator

@chrisgervang chrisgervang Feb 10, 2025

Choose a reason for hiding this comment

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

visgl/loaders.gl#2164

A fix was attempted, but it's still an issue. I have a reproduction in #305

Copy link
Collaborator

Choose a reason for hiding this comment

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

It actually still affects this branch too after removing the resolution

@charlieforward9
Copy link
Contributor Author

charlieforward9 commented Feb 8, 2025

if you could merge in the latest changes

@chrisgervang Im seeing master and 1.4-release, which one should I be pulling from? I could wait till they merge to resolve conflicts once.

Then let's try a website static build.. yarn build then yarn serve

I am unable to run yarn build without resolving these comments, can you provide guidance?

ibgreen pushed a commit to visgl/luma.gl that referenced this pull request Mar 15, 2025
Copy link
Collaborator

@chrisgervang chrisgervang left a comment

Choose a reason for hiding this comment

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

This is close! I'm making a series of updates to prepare it for merge, and will split the features, tar/zip commits into their own PR.

For features, I may instead only go with #310, which internalizes the features prop rather than fully remove it. It does the same thing as your version but with a simpler type.

@charlieforward9
Copy link
Contributor Author

Ok, great to hear.

@chrisgervang

Let me know if there's anything I can help with. I am eagerly waiting to implement this and advance it's capabilities with the new release.

@chrisgervang chrisgervang mentioned this pull request Mar 20, 2025
8 tasks
@coveralls
Copy link

coveralls commented Mar 20, 2025

Pull Request Test Coverage Report for Build 13978428409

Details

  • 25 of 53 (47.17%) changed or added relevant lines in 13 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 49.415%

Changes Missing Coverage Covered Lines Changed/Added Lines %
modules/react/src/components/quick-animation.tsx 5 6 83.33%
modules/react/src/components/export-video/export-video-panel-preview.tsx 7 10 70.0%
modules/core/src/adapters/deck-adapter.ts 1 5 20.0%
modules/core/src/capture/video-capture.ts 0 20 0.0%
Totals Coverage Status
Change from base Build 13962009025: -0.04%
Covered Lines: 2449
Relevant Lines: 5014

💛 - Coveralls

@chrisgervang
Copy link
Collaborator

@charlieforward9 I got ci tests working again, and the maplibre-based website examples all work 100%.

The remaining issue is background color on the camera and quick-start examples is not setting. We can merge this PR in and cut an alpha with this bug unresolved.

Screenshot 2025-03-20 at 12 29 43 PM

The backround is supposed to be a purple color matching the polygon stroke color.

Comment on lines +114 to +119
new MapView({
farZMultiplier: 3,
clear: {
color: [61 / 255, 20 / 255, 76 / 255, 1]
}
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem to be working yet
Screenshot 2025-03-20 at 12 29 43 PM

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 Ive struggled to get that working, but as I integrate it into my codebase, Ill have much more time to learn and explore its internals.

Let me know when the release goes live. Thanks!

@chrisgervang chrisgervang merged commit f653adb into visgl:master Mar 20, 2025
1 check passed
@chrisgervang
Copy link
Collaborator

@charlieforward9 just released 2.0.0-alpha.3

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.

[Bug] Incompatible with deck.gl v9.x , react v18/v19 Compatibility with deck.gl and luma.gl v9

3 participants