This commit is contained in:
Mathieu Rivest 2018-06-25 00:17:24 +02:00
Родитель 46170bfbd3
Коммит 235dd647fa
22 изменённых файлов: 439 добавлений и 0 удалений

8
.npmignore Normal file
Просмотреть файл

@ -0,0 +1,8 @@
.npmrc
.npmignore
.gitignore
QAReport.md
QAReport.md.meta
.vscode
.idea
.gitlab-ci.yml

113
CHANGELOG.md Normal file
Просмотреть файл

@ -0,0 +1,113 @@
# Changelog
All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [2.0.0] - 2018-06-11
- Fixed cropped error message
- Disabled downgrading Package Manager UI to incompatible versions
- Updated docs to reflect the new UI
- Fix incorrect verified tag on preview packages
- UI Fixes:
- Change mouse cursor when hovering over links
- Tweak UI layout for better alignment
- Fixed dropdown to work with 2018.3 editor
- Updated style to reflect changes in VisualElements
- Added packages serialization to avoid unnecessary refreshes
- Enable "View Documentation" Button on built-in packages, and make it point to the url contained in the description string
- Added persistent error icon when there are package add or remove errors
- Filter by name, category, version and release tag
- Show All Package by default
- MenuDropdown for All packages/In project/Built-in
- UI redesign
- Remove sentence "This package is installed for..." and all other sentence regarding status of the package
- Hide buttons for embedded, git and local packages
- Display "No results for ""
## [1.9.9] - 2018-05-09
- Only show user visible versions in the UI
## [1.9.8] - 2018-05-01
- Fixed package to work with 2018.3
- Deprecated 2018.1 because of its inability to update without error
## [1.9.6] - 2018-04-10
- Added ability to choose a package version
- Added loading indicator when retrieving package lists
## [1.9.5] - 2018-03-28
- Optimize packages list loading
- Fixes for UXML factories changes in Unity
- UI Fixes:
- "View changes" update position and label should say "View Changelog"
- Packages list should not have padding
- preview and verified tags should be lower case everywhere
- the package displayed name should stay on 1 line
## [1.9.3] - 2018-03-11
- Added caching for faster UI response time
- Exposed APIs for the Package Manager UI extension mechanism
## [1.8.2] - 2018-03-02
- Modified Tags to reflect new package workflow (Preview -> Released(no tag) -> Verified)
## [1.8.1] - 2018-02-23
- Removed Recommended tag if package version is alpha, beta or experimental
## [1.8.0] - 2018-02-16
- Removed support built-in packages
- Fixed packages sorting in All tab
- Fixed error reporting with an invalid manifest
## [1.7.2] - 2018-02-08
- Fixed errors when an exception is thrown during an operation
- Changed to only show "View Changes" when there is an update button
- Fixed typos in dialog when updating package manager ui
## [1.7.0] - 2018-02-05
- Added 'View Documentation' link to package details
- Added 'View changes' link to package details
## [1.6.1] - 2018-01-30
### Fixes
- When updating from 1.5.1, ask user to confirm close of window prior to update
- Made window dockable
- Reworked UI styles
- Enhanced keyboard navigation
## [1.5.1] - 2018-01-18
### Fixes
- Replaced VisualContainer by VisualElement in code and templates
- Moved "Project->Packages->Manage" menu item to "Window->Package Manager"
- Showed the latest version and description in tab "Install" instead of the current version
- Added "Recommended" tag properly
- Added "Go back to" when latest version is less than current one
- Removed "Update to" when current version is greater than lastest one. (case for embedded or local packages)
- Replaced packages action button label:
- "Install" instead of "Add" for packages
- "Enable/Disable" instead of "Add/Remove" for built-in packages
- Added "alpha", "beta", "experimental" and "recommended" tags support
- Added loading progress while opening window
- Added package description and display name update
- Added extra messaging on package state
- Performed Documentation update
## [1.3.0] - 2017-12-12
### Changes
- Added assembly definition files
- Forced SemVer to use .NetStandard
- Fixed ValidationSuiteTests tests
- Handled compatible versions returned in PackageInfo
## [1.2.0] - 2017-11-16
### Fixes
- Fixed flickering test When_Default_FirstPackageUIElement_HasSelectedClass, use package only
- Fixed documentation
- Added Doxygen configuration file
- Removed unused fields in package.json
- Changed 'Modules' for 'Built In Packages'
- Removed version display for Built In Packages
## [1.0.0] - 2017-11-10
### This is the first release of *Unity Package Manager UI*.

7
CHANGELOG.md.meta Normal file
Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3d9dc1812bac34a5bba275762ffb1cc3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Documentation.meta Normal file
Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 59baf689e1122479c96c4ec9975d4f17
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.meta Normal file
Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a4b052e48c8fb4079bda74b557cfa46b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor/Sources.meta Normal file
Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b9db772508c39436daec2fbf7055c5c2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a6694c8ab26ae45a28910e09accd0d28
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor/Sources/UI.meta Normal file
Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7ebb925653017460093b66356e655bf7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,69 @@
using System.Linq;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEditor.Experimental.UIElements;
using Microsoft.CodeAnalysis.CSharp.Scripting;
namespace UnityEditor.PackageManager.UI
{
internal class ImmediateWindow : EditorWindow
{
public const string PackagePath = "Packages/com.unity.immediate-window/";
public const string ResourcesPath = PackagePath + "Editor/Resources/";
private const string TemplatePath = ResourcesPath + "Templates/ImmediateWindow.uxml";
private const string DarkStylePath = ResourcesPath + "Styles/Main_Dark.uss";
private const string LightStylePath = ResourcesPath + "Styles/Main_Light.uss";
private const double targetVersionNumber = 2018.3;
async public void OnEnable()
{
int result = await CSharpScript.EvaluateAsync<int>("1 + 2");
Debug.Log("Result: " + result);
/*
//PackageCollection.InitInstance(ref Collection);
this.GetRootVisualContainer().AddStyleSheetPath(EditorGUIUtility.isProSkin ? DarkStylePath : LightStylePath);
var windowResource = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(TemplatePath);
if (windowResource != null)
{
var template = windowResource.CloneTree(null);
this.GetRootVisualContainer().Add(template);
template.StretchToParentSize();
PackageList.OnSelected += OnPackageSelected;
PackageList.OnLoaded += OnPackagesLoaded;
PackageList.OnFocusChange += OnListFocusChange;
PackageManagerToolbar.SearchToolbar.OnSearchChange += OnSearchChange;
PackageManagerToolbar.SearchToolbar.OnFocusChange += OnToolbarFocusChange;
// Disable filter while fetching first results
if (!PackageCollection.Instance.LatestListPackages.Any())
PackageManagerToolbar.SetEnabled(false);
else
PackageList.SelectLastSelection();
}
*/
}
public void OnDisable()
{
}
public void OnDestroy()
{
}
//internal Alert ErrorBanner { get { return this.GetRootVisualContainer().Q<Alert>("errorBanner"); } }
[MenuItem("Window/Debug/Immediate Window", priority = 1500)]
internal static void ShowPackageManagerWindow()
{
var window = GetWindow<ImmediateWindow>(false, "Immediate", true);
window.minSize = new Vector2(700, 250);
window.Show();
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 89b058850dff34b9eaede1ac3aa71a29
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
{
"name": "Unity.ImmediateWindow.Editor",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": []
}

Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3096c4e1b00f64aca9351cba856d48c4
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

31
LICENSE.md Normal file
Просмотреть файл

@ -0,0 +1,31 @@
**Unity Companion License ("_License_")**
Software Copyright © 2018 Unity Technologies ApS** **
Unity Technologies ApS ("**_Unity_**") grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available under this License (“**_Software_**”), subject to the following terms and conditions:
1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity content authoring and rendering engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted, and in no event may the Software be used for competitive analysis or to develop a competing product or service.
2. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way.
3. *Ownership & Grant Back to You*.
3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content.
3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity.
3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License.
4. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unitys Branding Usage Guidelines at[ https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand).
5. *Notices & Third-Party Rights*. This License, including the copyright notice associated with the Software, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms.
6. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License.
8. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License.
9. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect.
10. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute.

7
LICENSE.md.meta Normal file
Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d5f852039810a4170893d7d853214f6d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

90
QAReport.md Normal file
Просмотреть файл

@ -0,0 +1,90 @@
# Quality Report
Use this file to outline the test strategy for this package.
## QA Owner: [Pedro Albuquerque](mailto:pedroa@unity3d.com)
* __Note:__ No QA for this release
## UX Owner: [Maddalena Vismara](mailto:maddalena@unity3d.com)
## Test strategy
* A link to the Test Plan (Test Rails, other)
* Results from the package's editor and runtime test suite.
```
./utr.pl --suite=editor --testprojects=PackageManagerUI
Completed tests for project PackageManagerUI ExitCode:0
Overall result: PASS
Total Tests run: 54, Passed: 54, Failures: 0, Errors: 0, Inconclusives: 0
Total not run : 0, Invalid: 0, Ignored: 0, Skipped: 0
```
* Link to automated test results (if any)
```
- Verify_Package_Exists: Passed
- Verify_Package_Exists_Extra: Passed
- PackageCollectionTests.AddPackageInfo_PackagesChangeEventIsPropagated: Passed
- PackageCollectionTests.AddPackageInfos_PackagesChangeEventIsPropagated: Passed
- PackageCollectionTests.ClearPackages_PackagesChangeEventIsPropagated: Passed
- PackageCollectionTests.Constructor_Instance_FilterIsLocal: Passed
- PackageCollectionTests.Constructor_Instance_PackageInfosIsEmpty: Passed
- PackageCollectionTests.SetFilter_WhenFilterChange_FilterChangeEventIsPropagated: Passed
- PackageCollectionTests.SetFilter_WhenFilterChange_FilterIsChanged: Passed
- PackageCollectionTests.SetFilter_WhenFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated: Passed
- PackageCollectionTests.SetFilter_WhenNoFilterChange_FilterChangeEventIsNotPropagated: Passed
- PackageCollectionTests.SetFilter_WhenNoFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated: Passed
- PackageCollectionTests.SetFilter_WhenNoFilterChangeRefresh_PackagesChangeEventIsNotPropagated: Passed
- PackageCollectionTests.SetPackageInfos_PackagesChangeEventIsPropagated: Passed
- PackageDetailsTests.Show_CorrectPackage: Passed
- PackageDetailsTests.Show_CorrectTag: Passed
- PackageInfoTests.HasTag_WhenPackageVersionTagIsAnyCase_ReturnsTrue: Passed
- PackageInfoTests.HasTag_WhenPreReleasePackageVersionTagWithPreReleaseName_ReturnsTrue: Passed
- PackageInfoTests.VersionWithoutTag_WhenVersionContainsTag_ReturnsVersionOnly: Passed
- PackageInfoTests.VersionWithoutTag_WhenVersionDoesNotContainTag_ReturnsVersionOnly: Passed
- PackageManagerWindowTests.When_Default_FirstPackageUIElement_HasSelectedClass: Passed
- PackageManagerWindowTests.When_Default_PackageGroupsCollapsedState: Passed
- PackageManagerWindowTests.When_Default_PackageGroupsCollapsedState_Has_NoChildren: Passed
- PackageManagerWindowTests.When_Filter_Changes_Shows_Correct_List: Passed
- PackageManagerWindowTests.When_PackageCollection_Changes_PackageList_Updates: Passed
- PackageManagerWindowTests.When_PackageCollection_Remove_Fails_PackageLists_NotUpdated: Passed
- PackageManagerWindowTests.When_PackageCollection_Remove_PackageLists_Updated: Passed
- PackageManagerWindowTests.When_PackageCollection_Update_Fails_Package_Stay_Current: Passed
- PackageManagerWindowTests.When_PackageCollection_Updates_PackageList_Updates: Passed
- PackageTests.Add_WhenPackageInfoIsCurrent_AddOperationIsNotCalled: Passed
- PackageTests.Add_WhenPackageInfoIsNotCurrent_AddOperationIsCalled: Passed
- PackageTests.CanBeRemoved_WhenNotPackageManagerUIPackage_ReturnsTrue: Passed
- PackageTests.CanBeRemoved_WhenPackageManagerUIPackage_ReturnsFalse: Passed
- PackageTests.Constructor_WithEmptyPackageInfos_ThrowsException: Passed
- PackageTests.Constructor_WithEmptyPackageName_ThrowsException: Passed
- PackageTests.Constructor_WithMultiplePackagesInfo_VersionsCorrespond: Passed
- PackageTests.Constructor_WithNullPackageInfos_ThrowsException: Passed
- PackageTests.Constructor_WithNullPackageName_ThrowsException: Passed
- PackageTests.Constructor_WithOnePackageInfo_CurrentIsFirstVersion: Passed
- PackageTests.Constructor_WithOnePackageInfo_LatestAndCurrentAreEqual: Passed
- PackageTests.Constructor_WithOnePackageInfo_LatestIsLastVersion: Passed
- PackageTests.Constructor_WithTwoPackageInfos_CurrentIsFirstVersion: Passed
- PackageTests.Constructor_WithTwoPackageInfos_LatestIsLastVersion: Passed
- PackageTests.Constructor_WithTwoPackagesInfo_LatestAndCurrentAreNotEqual: Passed
- PackageTests.Display_WhenCurrentAndLatest_ReturnsLatest: Passed
- PackageTests.Display_WhenCurrentIsNotNull_ReturnsCurrent: Passed
- PackageTests.Display_WhenCurrentIsNull_ReturnsLatest: Passed
- PackageTests.DocumentationLink_ReturnsNotEmptyString: Passed
- PackageTests.Name_ReturnsExpectedValue: Passed
- PackageTests.Remove_RemoveOperationIsCalled: Passed
- PackageTests.Update_WhenCurrentIsLatest_AddOperationIsNotCalled: Passed
- PackageTests.Update_WhenCurrentIsNotLatest_AddOperationIsCalled: Passed
- PackageTests.Versions_WhenOrderedPackageInfo_ReturnsOrderedValues: Passed
- PackageTests.Versions_WhenUnorderedPackageInfo_ReturnsOrderedValues: Passed
```
* Manual test results, [Package Manager UI - QA Matrix](https://docs.google.com/a/unity3d.com/spreadsheets/d/1Vh4x1Tjk1Pvv9NER6mFShBIwNvN6wOtjVlo89OTfunY/edit?usp=sharing)
## Package Status
* package stability
* Stable-ish
* known issues
* Modifying the `manifest.json` by hand doesn't update the package list. You need to either re-open the window or change filters to force an update.
* Built-In packages cannot be enabled/disabled
* Package Manager UI is not taking care whether or not the package you want to install/update has no compilation error.
* Package Manager UI refreshes on Domain Reload and go back to Project tab
* Using a cache server may not update your assemblies properly, please turn it off

7
QAReport.md.meta Normal file
Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5ccb22eb9a5694cc885ce6eb1c103470
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

3
README.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Unity Package Manager UI
Unity Package Manager UI as a Unity Package

7
README.md.meta Normal file
Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 49df11157e681433282bc8d5488c3797
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
Third Party Notices.md Normal file
Просмотреть файл

@ -0,0 +1,7 @@
This package contains third-party software components governed by the license(s) indicated below:
Component Name: Semver
License Type: "MIT"
[SemVer License](https://github.com/maxhauser/semver/blob/master/License.txt)

Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 00342f5cb3cad41768ff4dc553cedde4
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
package.json Normal file
Просмотреть файл

@ -0,0 +1,9 @@
{
"name": "com.unity.immediate-window",
"displayName": "Immediate Window",
"version": "0.0.1-preview.1",
"unity": "2018.3",
"description": "Gives you immediate access to your code.",
"author": {"name": "Mathieu Rivest", "email": "mathieur@unity3d.com", "url": ""},
"dependencies": {}
}

7
package.json.meta Normal file
Просмотреть файл

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 313bce7b8813346e59d451636d2579aa
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: