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

Move some ngeo elements to modules #3257

Merged
merged 13 commits into from
Dec 14, 2017

Conversation

ger-benjamin
Copy link
Member

@ger-benjamin ger-benjamin commented Dec 12, 2017

@ger-benjamin ger-benjamin self-assigned this Dec 12, 2017
@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch 2 times, most recently from 38e6b4c to 7ca9152 Compare December 12, 2017 16:00
@ger-benjamin
Copy link
Member Author

The nego layertree work well, but the test of the layertree not.
The gmf layertree work neither....

@@ -33,7 +33,7 @@
ngeo-desktop-geolocation-options="::ctrl.desktopGeolocationOptions">
</button>
<p id="desc">
This example shows how to use the <code><a href="../apidoc/ngeo.desktopGeolocationDirective.html" title="Read our documentation">ngeo-desktop-geolocation</a></code>
This example shows how to use the <code><a href="../apidoc/ngeo..geolocation.desktop.html" title="Read our documentation">ngeo-desktop-geolocation</a></code>
Copy link
Member

Choose a reason for hiding this comment

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

Extra ..

@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch from 7ca9152 to 449a8be Compare December 13, 2017 08:50
@ger-benjamin
Copy link
Member Author

It works :-)

@ger-benjamin ger-benjamin changed the title [WIP] Move some ngeo elements to modules Move some ngeo elements to modules Dec 13, 2017
@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch 2 times, most recently from 5143329 to 700fda5 Compare December 13, 2017 11:16
@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch 7 times, most recently from 3033632 to 3e1b33b Compare December 13, 2017 14:35
@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch 3 times, most recently from 65148e5 to f583a31 Compare December 13, 2017 15:23
@ger-benjamin ger-benjamin force-pushed the move_some_ngeo_elements_to_modules branch from f583a31 to e164c62 Compare December 13, 2017 15:30
@ger-benjamin
Copy link
Member Author

Not all is perfect, but at least, it passes this time. Anyway, files with unclean things will move in the future

goog.require('ol.Feature');

/** @suppress {extraRequire} */
goog.require('ngeo.measure.module');
Copy link
Member

Choose a reason for hiding this comment

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

That is not good. Directive code should not require a toplevel module.
Only applications and examples require top level modules. Invidivual Angular files must require the fine grained dependency they actually need.

This principle is necessary to avoid bloat. We can discuss if you think there are cases when it does not make sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

No you're right.
(Except eventually for some GMF directive that will be moved soon. But that's not the case here.)



/** @type {!angular.Module} **/
app.module = angular.module('app', [
ngeo.module.name,
ngeo.map.module.name,
ngeo.ToolActivateMgr.module.name,
ngeo.googlestreetview.module.name,
ngeo.ToolActivateMgr.module.name
Copy link
Member

Choose a reason for hiding this comment

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

For information, it is now possible to have dangling comas. It helps get cleaner diffs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've learned this during this PR. Thanks

@ger-benjamin ger-benjamin merged commit bff650d into master Dec 14, 2017
@ger-benjamin ger-benjamin deleted the move_some_ngeo_elements_to_modules branch December 14, 2017 13:32
@sbrunner
Copy link
Member

:-)

@ger-benjamin ger-benjamin restored the move_some_ngeo_elements_to_modules branch December 20, 2017 14:51
@sbrunner sbrunner deleted the move_some_ngeo_elements_to_modules branch January 17, 2018 08:09
@sbrunner sbrunner added this to the 2.3 milestone Apr 12, 2018
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.

3 participants