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

website: Upgrade to Mapbox v3 #8600

Merged
merged 2 commits into from Mar 7, 2024
Merged

website: Upgrade to Mapbox v3 #8600

merged 2 commits into from Mar 7, 2024

Conversation

felixpalmer
Copy link
Collaborator

For #8582 fixes https://felixpalmer.github.io/deck.gl/examples/mapbox

Change List

  • Upgrade Mapbox to v3 on website
  • Handle crash when _view is uninitialized in componentDidUpdate

@coveralls
Copy link

coveralls commented Mar 7, 2024

Coverage Status

coverage: 81.582%. remained the same
when pulling 06d796a on felix/website-mapbox-v3
into 5aef807 on master.

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

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

Approving since this PR does strictly improve the example, but I think there is an issue with renderToDOM as currently implemented on master.

@@ -43,7 +43,7 @@ class MapboxDemo extends Component {
}

componentDidUpdate(prevProps) {
if (this.props.data && !prevProps.data) {
if (this.props.data && !prevProps.data && this._view) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like renderToDOM never returns anything ...

https://github.com/visgl/deck.gl/blame/5aef80773cd47d58eccc3e35481bd765f26fcb5f/examples/website/mapbox/app.jsx#L143-L150

... so this._view is never defined? I don't know if it should block this PR, but something seems broken here.

Related:

Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought renderToDOM is only used when running the example standalone (see index.html in the example's folder), whereas the website imports App directly.

Edit: Oh, nevermind. It mounts the example as a react root within our react website using renderToDOM.. that might be fine, but I see a bug in the signatures. I dropped the data parameter when I ported it. I'll take a look today

@felixpalmer felixpalmer merged commit 25584ff into master Mar 7, 2024
3 checks passed
@felixpalmer felixpalmer deleted the felix/website-mapbox-v3 branch March 7, 2024 16:40
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