Просмотр исходного кода

Merge pull request #18437 from overleaf/rd-bs5-project-dashboard

Enable Bootstrap 5 to load for the project dashboard page

GitOrigin-RevId: 4aa74bd4fde98192b2e5b322bb777a8c8beae237
Rebeka Dekany 2 лет назад
Родитель
Сommit
a0334898db

+ 4 - 0
services/web/app/src/Features/Project/ProjectListController.js

@@ -440,6 +440,10 @@ async function projectListPage(req, res, next) {
     )
   }
 
+  // Get the user's assignment for the Bootstrap 5 split test, which populates
+  // splitTestVariants with a value for 'bootstrap-5' and allows Pug to read it
+  await SplitTestHandler.promises.getAssignment(req, res, 'bootstrap-5')
+
   res.render('project/list-react', {
     title: 'your_projects',
     usersBestSubscription,

+ 3 - 0
services/web/app/views/project/list-react.pug

@@ -6,6 +6,9 @@ block entrypointVar
 block vars
 	- var suppressNavContentLinks = true
 
+block vars
+	- bootstrap5EnabledPage = true
+
 block append meta
 	meta(name="ol-usersBestSubscription" data-type="json" content=usersBestSubscription)
 	meta(name="ol-notifications" data-type="json" content=notifications)