You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/05/04 08:41:32 UTC
[GitHub] [cordova-android] raphinesse opened a new pull request #1227: fix(prepare): delete splash screens if none are used
raphinesse opened a new pull request #1227:
URL: https://github.com/apache/cordova-android/pull/1227
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here. -->
We copy default splash screens to the platform folder during platform creation. But then we do not delete them when the user uses no splash screens at all. This causes #1226 and what is described in #689.
Fixes #1226
### Description
<!-- Describe your changes in detail -->
We do not return early when updating splashes and none are defined. Instead, we let the cleanup map we create initially take care of deleting all unused splash screens. This just happens on the first prepare after platform creation, so I think this is a reasonably clean approach.
### Testing
<!-- Please describe in detail how you tested your changes. -->
Manual testing on a default app.
A regression test would be great but I'm on a tight schedule. Feel free to add one if you feel like it.
### Checklist
- [x] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
- [x] I've updated the documentation if necessary
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] codecov-commenter commented on pull request #1227: fix(prepare): delete splash screens if none are used
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1227:
URL: https://github.com/apache/cordova-android/pull/1227#issuecomment-831779170
# [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1227](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa37f1a) into [master](https://codecov.io/gh/apache/cordova-android/commit/f9e8ce8fab7c4005e110c35fcdcb3ea71e92d41c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f9e8ce8) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1227 +/- ##
==========================================
- Coverage 71.97% 71.95% -0.02%
==========================================
Files 21 21
Lines 1695 1694 -1
==========================================
- Hits 1220 1219 -1
Misses 475 475
```
| [Impacted Files](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [bin/templates/cordova/lib/prepare.js](https://codecov.io/gh/apache/cordova-android/pull/1227/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9wcmVwYXJlLmpz) | `47.78% <ø> (-0.17%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f9e8ce8...fa37f1a](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] raphinesse merged pull request #1227: fix(prepare): delete splash screens if none are used
Posted by GitBox <gi...@apache.org>.
raphinesse merged pull request #1227:
URL: https://github.com/apache/cordova-android/pull/1227
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] codecov-commenter edited a comment on pull request #1227: fix(prepare): delete splash screens if none are used
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1227:
URL: https://github.com/apache/cordova-android/pull/1227#issuecomment-831779170
# [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1227](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa37f1a) into [master](https://codecov.io/gh/apache/cordova-android/commit/f9e8ce8fab7c4005e110c35fcdcb3ea71e92d41c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f9e8ce8) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1227 +/- ##
==========================================
- Coverage 71.97% 71.95% -0.02%
==========================================
Files 21 21
Lines 1695 1694 -1
==========================================
- Hits 1220 1219 -1
Misses 475 475
```
| [Impacted Files](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [bin/templates/cordova/lib/prepare.js](https://codecov.io/gh/apache/cordova-android/pull/1227/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmluL3RlbXBsYXRlcy9jb3Jkb3ZhL2xpYi9wcmVwYXJlLmpz) | `47.78% <ø> (-0.17%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f9e8ce8...fa37f1a](https://codecov.io/gh/apache/cordova-android/pull/1227?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-android] raphinesse commented on a change in pull request #1227: fix(prepare): delete splash screens if none are used
Posted by GitBox <gi...@apache.org>.
raphinesse commented on a change in pull request #1227:
URL: https://github.com/apache/cordova-android/pull/1227#discussion_r625731684
##########
File path: bin/templates/cordova/lib/prepare.js
##########
@@ -328,10 +328,13 @@ function makeSplashCleanupMap (projectRoot, resourcesDir) {
function updateSplashes (cordovaProject, platformResourcesDir) {
var resources = cordovaProject.projectConfig.getSplashScreens('android');
- // if there are "splash" elements in config.xml
+ // if there are no "splash" elements in config.xml
if (resources.length === 0) {
events.emit('verbose', 'This app does not have splash screens defined');
- return;
+ // We must not return here!
+ // If the user defines no splash screens, the cleanup map will cause any
+ // existing splash screen images (e.g. the defaults that we copy into a
+ // new app) to be removed the app folder, which is what we want.
Review comment:
```suggestion
// new app) to be removed from the app folder, which is what we want.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org