-
Notifications
You must be signed in to change notification settings - Fork 319
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
Refactor: Move classes to internal package #3074
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3074 +/- ##
============================================
+ Coverage 38.27% 38.68% +0.41%
Complexity 2245 2245
============================================
Files 546 542 -4
Lines 19765 19596 -169
Branches 1871 1850 -21
============================================
+ Hits 7565 7581 +16
+ Misses 11321 11137 -184
+ Partials 879 878 -1 |
ff2a4c2
to
25687b7
Compare
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/InstructionView.java
Show resolved
Hide resolved
@abhishek1508 - qq: what's the purpose of moving the class into |
There are public classes, that have been written so that they can be used across different packages. But, these classes are not meant to be used by external developers or rather they should not depend on it. Moving it to |
1521390
to
65b0c55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good starting @abhishek1508
Left some comments.
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/DamerauLevenshteinAlgorithm.java
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/NavigationViewModel.java
Outdated
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/BannerInstructionModel.java
Outdated
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/InstructionView.java
Outdated
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/NavigationLauncher.java
Show resolved
Hide resolved
...ui/src/test/java/com/mapbox/navigation/ui/internal/summary/InstructionListPresenterTest.java
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/map/MapFpsDelegate.java
Outdated
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/route/NavigationMapRoute.java
Show resolved
Hide resolved
libnavigation-ui/src/main/java/com/mapbox/navigation/ui/NavigationViewModel.java
Show resolved
Hide resolved
36bee7d
to
c878f6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments / questions 👇 (we don't need to address all of these as part of these PR but wanted to keep track of them)
- We're mixing Java and Kotlin docs, could that be an issue? cc @langsmith
- Does
FeedbackSubTypeAdapter
need theinternal constructor
if the class isinternal
? - Does
TurnLaneAdapter
need to be public? - Does
BannerInstructionModel
need to be public? - Unnecessary
public
modifiers inBannerShield
- Unnecessary
public
modifiers inImageCreator
- Why is
TurnLaneView
internal? - Why all the listeners under
internal.listeners
are internal? - Some constants in
RouteConstants
are never usedVANISHING_ROUTE_LINE_UPDATE_DELAY
for instance - Does
CompareUtils
need to be underinternal
? It has theinternal
modifier already
This is the only kotlin file inUtils
. Doesn't make sense to have anotherutil
package outside internal just to host 1 file. Will let it be insideinternal
- Should
MapUtils#addLayerToMap
be removed for1.0
? It's@Deprecated
and internal - Does
MobileNetworkChecker
need to be underinternal
? It isinternal
already
Yes. It is package private. ButConnectivityStatusProvider
ispublic
and lives insideinternal
package.ConnectivityStatusProvider
usesMobileNetworkChecker
and hence it needs to be live in the same package asConnectivityStatusProvider
or be made public. - Does
WifiNetworkChecker
need to be underinternal
? It isinternal
already
Yes. It is package private. ButConnectivityStatusProvider
ispublic
and lives insideinternal
package.ConnectivityStatusProvider
usesWifiNetworkChecker
and hence it needs to be live in the same package asConnectivityStatusProvider
or be made public. - Could we remove the
legacy
package? Moving out the classes in there into other modules - Some constants in
NavigationConstants
are never used - Does
DefaultMapboxPuckDrawableSupplier
need to be public? - Does
NavigationPuckPresenter
need to be public? - Does the
NavigationViewModel
need to be public?
Moving this to internal will result in a whole lot files being changed. It is not worth going through that amount of changes. Will leave it as is.
96b3c4f
to
453999a
Compare
453999a
to
69271e2
Compare
We are not forced to create a package 😅 Pointed it out to be consistent across the codebase.
Maybe now that both
👍
👍
These seem that need to be exposed publicly. Am I missing something? |
Description
Move appropriate classes to internal package. (Fixes #2864)
bug
,feature
,new API(s)
,SEMVER
, etc.)Goal
Move appropriate classes to internal package.
Implementation
Move appropriate classes to internal package.
Testing
Please describe the manual tests that you ran to verify your changes
SNAPSHOT
upstream dependencies if needed) through testapp/demo app and run all activities to avoid regressionsChecklist
CHANGELOG
including this PR