Skip to content

Conversation

@devotaaabel
Copy link
Contributor

@devotaaabel devotaaabel commented Aug 6, 2018

Left to do:

  • Add everything to landscape layouts and deal with rotation
  • Deal with issues with sub-text
  • Test that abbreviations are still working
  • Make InstructionLoader public-friendly by replacing InstructionTextView with TextView
  • Add support for left/right exits

Moved style attributes into separate branch. Will make a PR when this one lands. Issue is here: #1705

I wanted to add more tests but it is difficult with the nature of the image spans, and I'm assuming that's why there weren't any tests for the highway signs. If anyone has any advice on how to unit test, it would be helpful. Otherwise I'm going to leave it out.

Closes #972

@devotaaabel devotaaabel added ⚠️ DO NOT MERGE PR should not be merged! refactor labels Aug 6, 2018
@devotaaabel devotaaabel self-assigned this Aug 6, 2018
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch 3 times, most recently from 87afe0b to ad4c8d4 Compare August 10, 2018 23:32
@danesfeder danesfeder added this to the 0.18.0 milestone Aug 14, 2018
@akitchen
Copy link

Related to #972

@danesfeder
Copy link
Contributor

@devotaaabel are the tests updated here? I see some were removed from InstructionLoaderTest. Please tag when ready and remove the DO NOT MERGE > Ready for Review thanks!

@devotaaabel devotaaabel added ✓ ready for review ⚠️ DO NOT MERGE PR should not be merged! and removed ⚠️ DO NOT MERGE PR should not be merged! ✓ ready for review labels Aug 22, 2018
@danesfeder danesfeder modified the milestones: 0.18.0, 0.19.0 Sep 4, 2018
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from ad4c8d4 to f73829c Compare September 19, 2018 16:47
@akitchen akitchen removed this from the 0.19.0 milestone Sep 24, 2018
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch 2 times, most recently from 75b6294 to 0885230 Compare December 20, 2018 19:09
@codecov-io
Copy link

codecov-io commented Dec 20, 2018

Codecov Report

Merging #1195 into master will decrease coverage by 0.46%.
The diff coverage is 28.57%.

@@             Coverage Diff              @@
##             master    #1195      +/-   ##
============================================
- Coverage     29.32%   28.86%   -0.47%     
+ Complexity      820      815       -5     
============================================
  Files           203      212       +9     
  Lines          7924     7993      +69     
  Branches        619      622       +3     
============================================
- Hits           2324     2307      -17     
- Misses         5379     5468      +89     
+ Partials        221      218       -3

@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch 2 times, most recently from de73fa7 to d4a7864 Compare January 2, 2019 21:52
@devotaaabel
Copy link
Contributor Author

@Guardiola31337 @danesfeder This is ready for review. I still want to do some more thorough testing. I cleaned up the unit tests and made them a little more useful, but I need help understanding the code cov report, I'm not sure how to see the changes that I made that it's complaining about. I could add tests to the Verifiers and Nodes, but that doesn't seem very useful, but I can do it if we need it for code coverage.

@devotaaabel devotaaabel changed the title Refactored to make InstructionLoader more modular in preparation for … Refactored InstructionLoader and added exit signs to the instruction banner Jan 3, 2019
@devotaaabel

This comment has been minimized.

@devotaaabel devotaaabel changed the title Refactored InstructionLoader and added exit signs to the instruction banner Added exit signs to the instruction banner and refactored instruction loader Jan 3, 2019
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from a571be1 to 8ae2926 Compare January 7, 2019 15:29
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from 4d88d8c to 21ae19b Compare January 24, 2019 20:20
@devotaaabel devotaaabel removed the ⚠️ DO NOT MERGE PR should not be merged! label Jan 24, 2019
@danesfeder danesfeder added this to the v0.28.0 milestone Jan 28, 2019
danesfeder
danesfeder previously approved these changes Jan 28, 2019
Copy link
Contributor

@danesfeder danesfeder left a comment

Choose a reason for hiding this comment

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

@devotaaabel thanks for addressing the feedback, I have no further comments. We should mark this as SEMVER due to the renaming of ImageCoordinator > ImageCreator. Also can we cut a ticket to track the styling of the exits if that's considered out-of-scope for this PR?

@devotaaabel devotaaabel added the backwards incompatible Requires a SEMVER major version change. label Jan 28, 2019
@devotaaabel
Copy link
Contributor Author

devotaaabel commented Jan 28, 2019

Created an issue here #1705 will open another PR after this PR lands. Thanks!

Copy link
Contributor

@Guardiola31337 Guardiola31337 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 looking great @devotaaabel

While testing this, I've noticed some weird issues that we need to 👀 before landing this 👇

This seems not abbreviated properly

exit_signs_instruction_loader_ellipsized_issue

Left exit icon not drawn

exit_signs_instruction_loader_left_icon_arrow_missing

I also left some minor comments / questions.


AbbreviationCoordinator() {
this(new TextViewUtils());
AbbreviationCreator(AbbreviationVerifier abbreviationVerifier) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed internally, should we remove this constructor? IMO it's not adding any value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Guardiola31337 What discussion? Are you talking about the discussion about Dan's PR? If you are, you said that you didn't feel strongly about that either way. I think this is adding the value of not making the InstructionLoader instantiate the hashmap and text utils while still making this testable. It's basically acting as a dependency injection utility method

@Override
BannerComponentNode setupNode(BannerComponents components, int index, int startIndex, String
modifier) {
if (components.type().equals("exit")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we thought about extracting these magic numbers i.e. "exit", "exit-number" and "left" into constants?

@danesfeder danesfeder dismissed their stale review January 29, 2019 20:00

Going to hold on the approval until we do some more field testing.

@Guardiola31337
Copy link
Contributor

Guardiola31337 commented Jan 29, 2019

I kept testing this locally and I found the following 👀

Pixel XL Android 9

Exit sign loaded intermittently

exit_sign_loaded_ intermittently

Abbreviation issue and hidden secondary banner

abbreviation_and_hidden_secondary_banner

Primary text empty

primary_text_empty

Shield not loaded

shield_not_loaded

Saw the following log trace when ☝️ happened

2019-01-29 15:01:28.654 24575-24575/com.mapbox.services.android.navigation.app E/InstructionTarget: com.squareup.picasso.NetworkRequestHandler$ResponseException: HTTP 403
        at com.squareup.picasso.NetworkRequestHandler.load(NetworkRequestHandler.java:51)
        at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:219)
        at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:175)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
        at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:354)

cc @devotaaabel

@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from f41f0fa to de9a31a Compare January 30, 2019 12:41
@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from 20a59cb to 92bc66a Compare January 30, 2019 15:41
@devotaaabel
Copy link
Contributor Author

Maybe to keep the APIs tightly scoped, we can accept an array of enum that defines the types we want to create for the dev? NodeCreator.TEXT, NodeCreater.SHIELD, etc. - idk just a thought.

@danesfeder So I like this idea, but I'm thinking, let's not do that until there's a need for it, either on our side or a customer request, unless there is one that I'm not aware of. Just to keep it simple for now until there's a need. Let me know what you think.

@Guardiola31337
Copy link
Contributor

After rolling back abbreviations fixes 7be09d2 I wasn't able to reproduce the issues found in #1195 (comment) so it seems that was the reason. Per internal discussion we're going to keep discussing on a solution for landscape issues and will follow up in a different PR.

I was able to reproduce the Left exit icon not drawn #1195 (review) though. Apparently, there's some issue with Android 6.0 and rotating the vector to the left. We've tested and we're going to generate a new left asset to workaround this.

@devotaaabel
Copy link
Contributor Author

@Guardiola31337 The left exit android 6.0 fix is pushed

@devotaaabel
Copy link
Contributor Author

@Guardiola31337 @danesfeder This is ready for re-review, I've addressed all relevant issues

Copy link
Contributor

@danesfeder danesfeder left a comment

Choose a reason for hiding this comment

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

@devotaaabel great work here and thanks for addressing the feedback 👍

@devotaaabel devotaaabel force-pushed the devota-add-master-coordinator branch from ef9943b to 5f477ae Compare January 30, 2019 19:56
@devotaaabel devotaaabel merged commit 82e63fd into master Jan 30, 2019
@devotaaabel devotaaabel deleted the devota-add-master-coordinator branch January 30, 2019 20:37
@danesfeder danesfeder mentioned this pull request Jan 30, 2019
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards incompatible Requires a SEMVER major version change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants