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

Protobuf changes #472

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Protobuf changes #472

wants to merge 5 commits into from

Conversation

bukue
Copy link

@bukue bukue commented Oct 30, 2020

Adding some changes to add compatibility with protobuf

@bukue bukue requested a review from twojtasz October 30, 2020 01:35
@CLAassistant
Copy link

CLAassistant commented Oct 30, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bukue bukue marked this pull request as draft October 30, 2020 01:37
"@deck.gl/layers": "^8.1.5",
"@deck.gl/mesh-layers": "^8.1.5",
"@deck.gl/react": "^8.1.5",
"@deck.gl/core": "8.1.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not be using fixed versions. Why is this necessary. Is there a patch version that is required? Otherwise ^ should cover this already.

Copy link
Author

Choose a reason for hiding this comment

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

I partially agree with you, unfortunately dependencies among the whole viz.gl packages are complex and having fuzzy versions leads to tons of conflicts. Some of them can be solved with resolutions, but a lot of them cannot.

Copy link
Contributor

Choose a reason for hiding this comment

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

we've made it this far? Do we have a concise statement of the problem? This does not seem to be a streetscape.gl issue, but an application issue. So the solution should be placed there, not in streetscape.gl

const XVIZ_TO_LAYER_TYPE = {
// V1
points2d: 'scatterplot',
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets not change the existing style unless there is some reason. When in rome ...

const {objectStates} = this.props;
const {layerProps} = this.state;
const {updateTriggers} = layerProps;
const { objectStates } = this.props;
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto on the spacing


if (changeFlags.dataChanged) {
// Pre-process data
let data = props.data;
const dataType = this._getLayerType(data);
type = XVIZ_TO_LAYER_TYPE[dataType];

if (type === 'scatterplot' && data[0].vertices && Array.isArray(data[0].vertices[0])) {
if (
!data.vertexBuffer &&
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this vertexBuffer? it's related other work but I don't think it exists here yet correct?

@@ -331,7 +382,10 @@ export default class XVIZLayer extends CompositeLayer {
length: data[0].points.length / 3,
attributes: {
getPosition: data[0].points,
getColor: data[0].colors
getColor: {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fixing the difference between rgb and rgba? We should make sure we have a test for this

Copy link
Author

Choose a reason for hiding this comment

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

yep, I will add some tests

@@ -378,6 +432,7 @@ export default class XVIZLayer extends CompositeLayer {
data,
lightSettings,
wireframe: layerProps.stroked,
extruded: layerProps.stroked,
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't make sense to me. Do we know where this comes from?

Copy link
Author

Choose a reason for hiding this comment

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

this could better check if we have a height instead, I will make the change

// TODO (mauricio): adjust this once we can send mime type from the backend
new Blob([data[0].data], { type: "image/png" })
),
bounds: [-1, -1, 1, 1]
Copy link
Contributor

Choose a reason for hiding this comment

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

add comment on this. We need to get the actual width changes added to xviz.

@@ -400,6 +455,22 @@ export default class XVIZLayer extends CompositeLayer {
})
);

case XVIZ_PRIMITIVE_TYPES.image:
// TODO (mauricio): images stream is being filtered out, figure out why
// TODO (mauricio): also figure out wht a box appears on top of the stadium
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this comment be next to the stadium case?

@@ -13395,7 +13417,7 @@ run-queue@^1.0.0, run-queue@^1.0.3:

rw@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
resolved "https://unpm.uberinternal.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you forgot to change your npmrc. Can't use uber internal repo

@@ -400,6 +448,21 @@ export default class XVIZLayer extends CompositeLayer {
})
);

case XVIZ_PRIMITIVE_TYPES.image:
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this constant buy us? The rest of the code is just using a string. Just curious if i'm missing something.
Mainly this creates a dissonance in the code and prompts the question "why"

layerProps,
this.getSubLayerProps({
id: XVIZ_PRIMITIVE_TYPES.image,
image: URL.createObjectURL(
Copy link
Contributor

Choose a reason for hiding this comment

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

URL is not defined.

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.

4 participants