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

Major marker support #16

Merged
merged 25 commits into from Jan 3, 2017
Merged

Major marker support #16

merged 25 commits into from Jan 3, 2017

Conversation

donflopez
Copy link
Contributor

@donflopez donflopez commented Dec 13, 2016

With this PR we'll have major support for markers.

  • Re-architecture to allow some new features.
  • Add border-line.
  • Add marker-file.
  • Add marker composition operations.
  • Add marker rectangle type. to be added in other PR tangram doesn't support it yet

cc/ @rochoa, @javisantana & @alonsogarciapablo

@javisantana
Copy link

I think you should include @alonsogarciapablo in this PR so he gets familiar with tangram

@donflopez
Copy link
Contributor Author

Done!

@javisantana
Copy link

also fixing CI would be nice :trollface:

@donflopez
Copy link
Contributor Author

I promise to fix it in my last commit :)

@donflopez
Copy link
Contributor Author

Fixed as I promised @javisantana :)

@donflopez donflopez assigned javisantana and unassigned javisantana Dec 16, 2016
@@ -49,32 +50,35 @@
"license": "MIT",
"dependencies": {
"babel-runtime": "6.11.6",
"carto": "CartoDB/carto#master"
"carto": "CartoDB/carto#master",

Choose a reason for hiding this comment

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

be careful when pointing to a non-tag because you could be generating a version that does not work without noticing

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 change it. Thanks!

export default BaseHelpers;

const OPACITY = {
line: 'stroke-opacity',

Choose a reason for hiding this comment

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

2 spaces identation is what we usually use

Copy link
Contributor Author

@donflopez donflopez Dec 16, 2016

Choose a reason for hiding this comment

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

ups... I'm changing from one project to other and I forgot to change the settings, we need a editorconfig.

@@ -0,0 +1,100 @@
/*

Choose a reason for hiding this comment

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

do we need this banner for each file? :trollface:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hahaha, just to make it beautiful :)

}
};

// NOTE: this no makes sense actually.

Choose a reason for hiding this comment

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

so remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I'm in the middle of something... It is gonna be necessary when we add some more features. It's just to remember.

@donflopez donflopez changed the title Full marker support Major marker support Dec 20, 2016
Copy link
Contributor

@alonsogarciapablo alonsogarciapablo left a comment

Choose a reason for hiding this comment

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

It makes sense so far. Some suggestions:

  1. I'd try to clarify variable/module names a bit, and be a bit more explicit. We're working with objects from different domains (TurboCarto, CartoCSS, Tangram, CARTO, ...). I'd try to be a bit more explicit with names in general.
  2. I'd start adding some tests for src/basic/points.js, src/basic/lines.js, src/basic/polygons.js. Those could help understand the project a bit better.

That's it! Great job so far @donflopez!

INTERNAL LINE FUNCTIONS
*/

const getLineAlpha = function(c3ss) {
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 c3ss mean? Could we find a more explicit variable name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

compiled carto css => c3ss

It is the most repeated variable in the project, so it could be an important effort to write it as compiledCartoCSS 😓

Copy link
Contributor

Choose a reason for hiding this comment

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

It is the most repeated variable in the project

Then it's even more important to find a name that anyone will understand 😝

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't you think that a good documentation could be better? Too much words in the code could make it less readable and more dirty.


return draw;
};

const extractFeatures = function (ccss) {
let layers = CCSS.render(ccss).getLayers(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I find CCSS a bit confusing here... Why not name the variable CartoCSSRenderer?


import BH from './helpers';
import Utils from '../utils/utils';
import TR from '../utils/reference';
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally find TR, BH... and this kind of names a bit confusing. IMO everything would me more clear with names like TangramReference, SomethingHelper, etc.

let ly = layers[i].shader;

draws = getSymbolizers(ly);
let ly = layers[i].shader;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we can infer the type of geometry from the shader?

@@ -0,0 +1,33 @@
import Utils from '../utils/utils';
Copy link
Contributor

Choose a reason for hiding this comment

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

helpers.js... is very generic too... something-helper.js would help us understand that all functions here are related to "something"....

@donflopez donflopez merged commit f5b685d into master Jan 3, 2017
@rochoa rochoa deleted the full-marker-support branch August 31, 2017 10:03
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

3 participants