Skip to content

Building plugin - #26

Merged
cammace merged 5 commits into
masterfrom
tvn-building-plugin
Jul 18, 2017
Merged

cammace merged 5 commits into
masterfrom
tvn-building-plugin

Conversation

@tobrun

@tobrun tobrun commented Apr 28, 2017

Copy link
Copy Markdown
Member

This PR adds a Building plugin, this plugin API matches Traffic plugin API.

westminster abbey

@tobrun tobrun added the feature label Apr 28, 2017
@tobrun tobrun self-assigned this Apr 28, 2017
@tobrun tobrun mentioned this pull request May 3, 2017
@tobrun
tobrun force-pushed the tvn-building-plugin branch from 78020b1 to 04ccb4e Compare May 10, 2017 11:18
@tobrun

tobrun commented May 10, 2017

Copy link
Copy Markdown
Member Author

I finished the initial stab and this PR is ready for review.

Possible API to add:

  • color?
  • opacity?

@tobrun
tobrun requested a review from zugaldia May 10, 2017 11:27
@tobrun tobrun changed the title WIP add Building plugin Building plugin May 10, 2017
@zugaldia

Copy link
Copy Markdown
Member

@tobrun Agreed. I think an API for the three different values you set on https://github.com/mapbox/mapbox-plugins-android/pull/26/files#diff-a1a6e9c8cc422ca880b018bba0a5741cR101 (minZoom, color, opacity) is all we need for now.

@tobrun
tobrun force-pushed the tvn-building-plugin branch 2 times, most recently from 2f63028 to f994a2c Compare May 15, 2017 12:36
@tobrun

tobrun commented May 15, 2017 •

Copy link
Copy Markdown
Member Author

I have added the API and reworked the code to reflect this. This PR is ready for review, though we should maybe wait with merging until v5.1.0 final is released?

@zugaldia

Copy link
Copy Markdown
Member

This PR is ready for review, though we should maybe wait with merging until v5.1.0 final is released?

👍 Makes sense to me to wait until the underlying API gets stable and published to release 0.1.0. Meanwhile, I suggest we start publishing SNAPSHOTs of the plugin so that interested devs can start playing with it.

@tobrun

tobrun commented Jul 5, 2017

Copy link
Copy Markdown
Member Author

This PR has been updated with latest SDK release and adds Light integration (just a setter for now)

@tobrun
tobrun force-pushed the tvn-building-plugin branch from dbf9674 to 662f33d Compare July 5, 2017 08:22
@cammace

cammace commented Jul 6, 2017

Copy link
Copy Markdown

Duplicate import to line 8 - timber.log.Timber. [RedundantImport]

Checkstyle strikes again 😆

@BindView(R.id.fabBuilding)
View fab;

@BindView(R.id.seekbar_light_radialCoordinate)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

half resources use camel casing, the rest use snake

Comment thread plugins/building/gradle.properties Outdated
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=mapbox-android-building-plugin

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To keep consistency around plugins, the artifact id should be mapbox-android-plugin-building

Comment thread plugins/building/gradle.properties Outdated
@@ -0,0 +1,4 @@
POM_ARTIFACT_ID=mapbox-android-building-plugin
POM_NAME=Mapbox Android Plugins
POM_DESCRIPTION=Mapbox Android Plugins (Building)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mapbox Android Building Plugin

Comment thread plugins/building/proguard-rules.pro Outdated
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

file can be deleted?

@cammace

cammace commented Jul 8, 2017

Copy link
Copy Markdown

Went ahead and fixed the issues I raised previously. One thing I noticed is that we use setVisibility(boolean visible) in this plugin but in traffic we have toggle(). Since they essentially do the same thing, we should make the APIs the same (I prefer the setVisibility API).

Another addition that should be made in this PR would be the zoom function modifies the building height so they don't just pop in.

@cammace

cammace commented Jul 11, 2017

Copy link
Copy Markdown

If this is supported across different styles, we should make sure everything is being redrawn correctly when styles change.

@zugaldia zugaldia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very minor feedback.

Comment thread plugins/build.gradle Outdated
allprojects {
repositories {
jcenter()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's this needed for?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

leftover from when we were using map SDK snapshot I think. I removed it.

}

private void initLightSeekbar() {
seekbarRadialCoordinate.setMax(24); // unknown?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does unknown mean in this context?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@tobrun could speak more on this, I'm not sure either.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add a note on code mentioning this?


@Override
public void onStartTrackingTouch(SeekBar seekBar) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add a comment or a Timber call in the unused methods to explicitly note they aren't used on purpose?

# This is the 1st commit message:
add Building plugin

# The commit message #2 will be skipped:

#	fixed issues reviewed by me

# The commit message #3 will be skipped:

#	fixed bitrise script

# The commit message #4 will be skipped:

#	added DDS for building height

# The commit message #5 will be skipped:

#	removed commented out code
@cammace
cammace force-pushed the tvn-building-plugin branch from 33ca38c to a689a33 Compare July 14, 2017 21:28
@zugaldia zugaldia modified the milestone: v0.2 Jul 17, 2017

@zugaldia zugaldia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's 🏛 this.

}

private void initLightSeekbar() {
seekbarRadialCoordinate.setMax(24); // unknown?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add a note on code mentioning this?

@cammace
cammace merged commit c39ff12 into master Jul 18, 2017
@cammace
cammace deleted the tvn-building-plugin branch July 18, 2017 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants