You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2022/09/28 20:54:46 UTC

[cordova-plugin-splashscreen] 01/01: fix!: remove deprecated windows platform

This is an automated email from the ASF dual-hosted git repository.

jcesarmobile pushed a commit to branch remove-windows
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-splashscreen.git

commit 359f3f7627cf8f832e23079f1501cd827f33b7ef
Author: Julio César <jc...@gmail.com>
AuthorDate: Wed Sep 28 22:54:31 2022 +0200

    fix!: remove deprecated windows platform
---
 README.md                        | 63 +---------------------------------------
 package-lock.json                |  3 +-
 package.json                     |  5 ++--
 plugin.xml                       | 16 ----------
 src/windows/SplashScreenProxy.js | 35 ----------------------
 5 files changed, 5 insertions(+), 117 deletions(-)

diff --git a/README.md b/README.md
index 54d6b10..008d4db 100644
--- a/README.md
+++ b/README.md
@@ -32,12 +32,10 @@ This plugin displays and hides a splash screen while your web application is lau
   - [Supported Platforms](#supported-platforms)
   - [Platform Splash Screen Image Configuration](#platform-splash-screen-image-configuration)
     - [Example Configuration](#example-configuration)
-    - [Windows-specific Information](#windows-specific-information)
   - [Preferences](#preferences)
     - [config.xml](#configxml)
     - [Quirks](#quirks)
       - [Browser Quirks](#browser-quirks)
-      - [Windows Quirks](#windows-quirks)
   - [Methods](#methods)
     - [splashscreen.hide](#splashscreenhide)
     - [splashscreen.show](#splashscreenshow)
@@ -52,8 +50,6 @@ This plugin displays and hides a splash screen while your web application is lau
 
 ## Supported Platforms
 
-- Windows (`cordova-windows` version >= 4.4.0 is required)  
-  __Note__: Extended splashscreen does not require the plugin on Windows in case you don't use the plugin API, i.e. programmatic hide/show.
 - Browser
 
 ## Platform Splash Screen Image Configuration
@@ -77,50 +73,12 @@ projectRoot
         js
     res
         screen
-            windows
 ```
 
 ```xml
-<!-- Configuration using MRT concept (Recommended, see "Windows-specific information" section for details): -->
-<platform name="windows">
-    <splash src="res/screen/windows/splashscreen.png" target="SplashScreen"/>
-    <splash src="res/screen/windows/splashscreenphone.png" target="SplashScreenPhone"/>
-</platform>
-
-<!-- Configuration using image size: -->
-<!--<platform name="windows">
-    <splash src="res/screen/windows/splashscreen.png" width="620" height="300"/>
-    <splash src="res/screen/windows/splashscreenphone.png" width="1152" height="1920"/>
-</platform>-->
-
 <preference name="SplashScreenDelay" value="10000" />
 ```
 
-### Windows-specific Information
-
-Splash screen images can be defined using the [MRT](https://cordova.apache.org/docs/en/dev/config_ref/images.html#windows) concept.  
-If you specify `src="res/windows/splashscreen.png"` the following files will be copied into the application's images folder:  
-`res/windows/splashscreen.png` | `res/windows/splashscreen.scale-100.png`, `res/windows/splashscreen.scale-125.png`, etc.  
-
-The following are supported:
-
-|   Scale, %   |       Project       |    Width    |    Height    |             Filename              |
-|:------------:|:-------------------:|:-----------:|:------------:|:---------------------------------:|
-|     100      |  Windows 10/8.1     |     620     |     300      | `splashscreen.png` \| `splashscreen.scale-100.png`              |
-|     125      |  Windows 10         |     775     |     375      | `splashscreen.scale-125.png`      |
-|     150      |  Windows 10         |     930     |     450      | `splashscreen.scale-150.png`      |
-|     200      |  Windows 10         |     1240    |     600      | `splashscreen.scale-200.png`      |
-|     400      |  Windows 10         |     2480    |     1200     | `splashscreen.scale-400.png`      |
-|     140      |  Windows 8.1        |     868     |     420      | `splashscreen.scale-140.png`      |
-|     180      |  Windows 8.1        |     1116    |     540      | `splashscreen.scale-180.png`      |
-|     100      |  Windows Phone 8.1  |     480     |     800      | `splashscreenphone.png` \| `splashscreenphone.scale-100.png`         |
-|     140      |  Windows Phone 8.1  |     672     |     1120     | `splashscreenphone.scale-140.png` |
-|     240      |  Windows Phone 8.1  |     1152    |     1920     | `splashscreenphone.scale-240.png` |
-
-__Note__: SplashScreens size for Windows 10 project should not exceed 200 KBytes.  
-__Note__: Supported formats are `.png`, `.jpg`, `.jpeg`. Mixing of the extensions within a target is not supported. I.e. you can have `splashscreen.jpg` and `splashscreenphone.png` but not `splashscreen.scale-100.png`, `splashscreen.scale-400.jpg`.  
-__Note__: You may need to reopen Visual Studio solution after changing the images and doing a `cordova prepare` for the changes to take effect.
-
 ## Preferences
 
 ### config.xml
@@ -144,9 +102,6 @@ __Note__: You may need to reopen Visual Studio solution after changing the image
     <preference name="SplashScreenDelay" value="0"/>
     ```
 
-    **Windows Quirk**: You should disable the splashscreen in case you are updating the entire document body dynamically (f.e. with a SPA router) to avoid affecting UI/controls.  
-    Note that you should also directly reference `WinJS/base.js` in the page HTML in this case to avoid the issues with activation context ([CB-11658](https://issues.apache.org/jira/browse/CB-11658)).
-
 - `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
   prevent the splash screen from fading in and out when its display
   state changes.
@@ -186,7 +141,7 @@ __Note__: You may need to reopen Visual Studio solution after changing the image
     <preference name="ShowSplashScreenSpinner" value="false"/>
     ```
     
-    _Note_: Does not work on Browser or Windows platforms.
+    _Note_: Does not work on Browser
 
 ### Quirks
 
@@ -208,22 +163,6 @@ You can use the following preferences in your `config.xml`:
 
 __Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen` value is used only for the browser platform. The value will be ignored for other platforms.
 
-#### Windows Quirks
-
-- `SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation or CSS color name.
-
-    ```xml
-    <preference name="SplashScreenSpinnerColor" value="#242424"/>
-    <preference name="SplashScreenSpinnerColor" value="DarkRed"/>
-    <preference name="SplashScreenSpinnerColor" value="rgb(50,128,128)"/>
-    ```
-
-- `SplashScreenBackgroundColor` (string, defaults to #464646): hex notation.
-
-    ```xml
-    <preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/>
-    ```
-
 ## Methods
 
 - splashscreen.show
diff --git a/package-lock.json b/package-lock.json
index 59c6b2e..b6c90fa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,7 +17,8 @@
             "cordova-ios": "<6.0.0"
           },
           "<7.0.0": {
-            "cordova-android": ">=3.6.0 <11.0.0"
+            "cordova-android": ">=3.6.0 <11.0.0",
+            "cordova-windows": ">=4.4.0"
           },
           ">=4.0.0": {
             "cordova-android": ">=3.6.0",
diff --git a/package.json b/package.json
index c107e2d..82b4f25 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,6 @@
   "cordova": {
     "id": "cordova-plugin-splashscreen",
     "platforms": [
-      "windows",
       "browser"
     ]
   },
@@ -16,7 +15,6 @@
     "cordova",
     "splashscreen",
     "ecosystem:cordova",
-    "cordova-windows",
     "cordova-browser"
   ],
   "scripts": {
@@ -40,7 +38,8 @@
         "cordova-windows": ">=4.4.0"
       },
       "<7.0.0": {
-        "cordova-android": ">=3.6.0 <11.0.0"
+        "cordova-android": ">=3.6.0 <11.0.0",
+        "cordova-windows": ">=4.4.0"
       },
       "8.0.0": {
         "cordova": ">100"
diff --git a/plugin.xml b/plugin.xml
index 6dc202d..c401e50 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -27,22 +27,6 @@
     <keywords>cordova,splashscreen</keywords>
     <repo>https://github.com/apache/cordova-plugin-splashscreen.git</repo>
     <issue>https://github.com/apache/cordova-plugin-splashscreen/issues</issue>
-
-    <engines>
-        <engine name="cordova-windows" version=">=4.4.0" />
-    </engines>
-
-    <!-- windows -->
-    <platform name="windows">
-        <js-module src="src/windows/SplashScreenProxy.js" name="SplashScreenProxy">
-            <runs />
-        </js-module>
-
-        <js-module src="www/splashscreen.js" name="SplashScreen">
-            <clobbers target="navigator.splashscreen" />
-        </js-module>
-    </platform>
-
     <!-- browser -->
     <platform name="browser">
         <js-module src="src/browser/SplashScreenProxy.js" name="SplashScreenProxy">
diff --git a/src/windows/SplashScreenProxy.js b/src/windows/SplashScreenProxy.js
deleted file mode 100644
index b359df6..0000000
--- a/src/windows/SplashScreenProxy.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var splash = require('cordova/splashscreen');
-
-var SplashScreen = {
-    show: function () {
-        splash.show();
-    },
-    hide: function () {
-        splash.hide();
-    }
-};
-
-module.exports = SplashScreen;
-
-require('cordova/exec/proxy').add('SplashScreen', SplashScreen);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org