From 23f4300c62ce1fb750f3bbde854e895976ae3014 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Wed, 8 Feb 2023 21:27:15 -0800 Subject: [PATCH] Update TypeScript, remove JQuery UI --- .../APIView/APIViewUITests/SmokeTests.cs | 4 +- .../APIView/APIViewWeb/Client/package.json | 4 +- .../APIView/APIViewWeb/Client/tsconfig.json | 4 +- .../APIViewWeb/Pages/Shared/_Layout.cshtml | 267 +++++++++--------- 4 files changed, 136 insertions(+), 143 deletions(-) diff --git a/src/dotnet/APIView/APIViewUITests/SmokeTests.cs b/src/dotnet/APIView/APIViewUITests/SmokeTests.cs index 5009e923ffb8..a0615baf4783 100644 --- a/src/dotnet/APIView/APIViewUITests/SmokeTests.cs +++ b/src/dotnet/APIView/APIViewUITests/SmokeTests.cs @@ -100,7 +100,7 @@ public async Task SmokeTest_CSharp() driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(WaitTime); driver.Navigate().GoToUrl(_fixture._endpoint); - var createReviewBtn = driver.FindElement(By.XPath("//button[@data-target='#uploadModel']")); + var createReviewBtn = driver.FindElement(By.XPath("//button[@data-bs-target='#uploadModel']")); createReviewBtn.Click(); var fileSelector = driver.FindElement(By.Id("Upload_Files")); fileSelector.SendKeys(fileAPath); @@ -120,7 +120,7 @@ public async Task SmokeTest_CSharp() Assert.Equal("Reviews - apiview.dev", driver.Title); // Select C# language - var languageSelector = driver.FindElement(By.Id("language-filter-bootstraps-select")); + var languageSelector = driver.FindElement(By.Id("language-filter-select")); var languageSelectElement = new SelectElement(languageSelector); languageSelectElement.SelectByText("C#"); var reviewNames = driver.FindElements(By.ClassName("review-name")); diff --git a/src/dotnet/APIView/APIViewWeb/Client/package.json b/src/dotnet/APIView/APIViewWeb/Client/package.json index c0a8889dd79c..e40e0f723f00 100644 --- a/src/dotnet/APIView/APIViewWeb/Client/package.json +++ b/src/dotnet/APIView/APIViewWeb/Client/package.json @@ -13,12 +13,10 @@ "acorn": "^8.0.0", "core-js": "^3.3.2", "jquery": "3.6.0", - "jquery-ui": "1.13.2", "underscore": "^1.13.4" }, "devDependencies": { "@types/jquery": "3.3.31", - "@types/jqueryui": "1.12.16", "@types/split.js": "^1.4.0", "@types/webpack-env": "^1.14.1", "@typescript-eslint/parser": "5.16.0", @@ -32,7 +30,7 @@ "sass-loader": "^8.0.2", "style-loader": "^3.3.1", "ts-loader": "^6.2.0", - "typescript": "^3.5.3", + "typescript": "^3.6.0", "webpack": "^5.70.0", "webpack-cli": "^4.9.2" }, diff --git a/src/dotnet/APIView/APIViewWeb/Client/tsconfig.json b/src/dotnet/APIView/APIViewWeb/Client/tsconfig.json index c1a76b12743c..c6faa1bcedec 100644 --- a/src/dotnet/APIView/APIViewWeb/Client/tsconfig.json +++ b/src/dotnet/APIView/APIViewWeb/Client/tsconfig.json @@ -14,9 +14,7 @@ "noImplicitAny": false, "types": [ "webpack-env", - "jquery", - "jqueryui", - "node" + "jquery" ], "paths": { "@/*": [ diff --git a/src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml b/src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml index b394130083d9..8a5aa4e94b5a 100644 --- a/src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml +++ b/src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml @@ -1,135 +1,132 @@ -@using APIViewWeb.Models; - - - - - - - @ViewData["Title"] - apiview.dev - - - - - - - - - - - - - @RenderSection("Styles", required: false) - -@{ - var userPreference = (TempData["UserPreference"] as UserPreferenceModel) ?? new UserPreferenceModel(); - var theme = userPreference.Theme; - var fixedPageHeightClass = String.Empty; - var pageName = ViewContext.RouteData.Values["page"]?.ToString(); - if (pageName.Equals("/Assemblies/Review") || pageName.Equals("/Assemblies/Conversation") || pageName.Equals("/Assemblies/Revisions") || pageName.Equals("/Assemblies/Samples")) - { - fixedPageHeightClass = " fixed-page-height"; } -} - -
- -
- -
- @RenderBody() -
- - - - - - - - - - - - - - - @*The ResizeSensor is used by the sticky-sidebar to handle resizing content.*@ - - - - - - - - - - - - @RenderSection("Scripts", required: false) - - +@using APIViewWeb.Models; + + + + + + + @ViewData["Title"] - apiview.dev + + + + + + + + + + + + + @RenderSection("Styles", required: false) + +@{ + var userPreference = (TempData["UserPreference"] as UserPreferenceModel) ?? new UserPreferenceModel(); + var theme = userPreference.Theme; + var fixedPageHeightClass = String.Empty; + var pageName = ViewContext.RouteData.Values["page"]?.ToString(); + if (pageName.Equals("/Assemblies/Review") || pageName.Equals("/Assemblies/Conversation") || pageName.Equals("/Assemblies/Revisions") || pageName.Equals("/Assemblies/Samples")) + { + fixedPageHeightClass = " fixed-page-height"; + } +} + +
+ +
+ +
+ @RenderBody() +
+ + + + + + + + + + + + + + + @*The ResizeSensor is used by the sticky-sidebar to handle resizing content.*@ + + + + + + + + + + + @RenderSection("Scripts", required: false) + +