From caf1bbf1a6f5c8918cebafa5683662727f8d4d00 Mon Sep 17 00:00:00 2001 From: Markus Kreuzer Date: Thu, 21 Sep 2023 15:50:59 +0200 Subject: [PATCH] SHARE-433 Add Studios to sidebar --- .github/workflows/tests.yaml | 4 ++-- config/features.php | 1 + .../Controller/Test/TestFeatureFlagController.php | 5 +++++ .../feature_flag_sidebar_studio_link.html.twig | 8 ++++++++ templates/Default/sidebar.html.twig | 7 +++++++ tests/BehatFeatures/web/admin/feature_flag.feature | 14 +++++++++++++- translations/catroweb.af_ZA.yaml | 1 + translations/catroweb.ar_SA.yaml | 1 + translations/catroweb.az_AZ.yaml | 1 + translations/catroweb.bg_BG.yaml | 1 + translations/catroweb.bn_BD.yaml | 1 + translations/catroweb.bs_BA.yaml | 1 + translations/catroweb.ca_ES.yaml | 1 + translations/catroweb.chr_US.yaml | 1 + translations/catroweb.cs_CZ.yaml | 1 + translations/catroweb.da_DK.yaml | 1 + translations/catroweb.de_DE.yaml | 1 + translations/catroweb.el_GR.yaml | 1 + translations/catroweb.en.yaml | 1 + translations/catroweb.en_AU.yaml | 1 + translations/catroweb.en_CA.yaml | 1 + translations/catroweb.en_GB.yaml | 1 + translations/catroweb.es_ES.yaml | 1 + translations/catroweb.eu_ES.yaml | 1 + translations/catroweb.fa_AF.yaml | 1 + translations/catroweb.fa_IR.yaml | 1 + translations/catroweb.fi_FI.yaml | 1 + translations/catroweb.fr_FR.yaml | 1 + translations/catroweb.gl_ES.yaml | 1 + translations/catroweb.gu_IN.yaml | 1 + translations/catroweb.ha_HG.yaml | 1 + translations/catroweb.he_IL.yaml | 1 + translations/catroweb.hi_IN.yaml | 1 + translations/catroweb.hr_HR.yaml | 1 + translations/catroweb.hu_HU.yaml | 1 + translations/catroweb.id_ID.yaml | 1 + translations/catroweb.ig_NG.yaml | 1 + translations/catroweb.it_IT.yaml | 1 + translations/catroweb.ja_JP.yaml | 1 + translations/catroweb.ka_GE.yaml | 1 + translations/catroweb.kab_KAB.yaml | 1 + translations/catroweb.kk_KZ.yaml | 1 + translations/catroweb.kn_IN.yaml | 1 + translations/catroweb.ko_KR.yaml | 1 + translations/catroweb.lt_LT.yaml | 1 + translations/catroweb.mk_MK.yaml | 1 + translations/catroweb.ml_IN.yaml | 1 + translations/catroweb.ms_MY.yaml | 1 + translations/catroweb.nl_NL.yaml | 1 + translations/catroweb.no_NO.yaml | 1 + translations/catroweb.pa_IN.yaml | 1 + translations/catroweb.pl_PL.yaml | 1 + translations/catroweb.ps_AF.yaml | 1 + translations/catroweb.pt_BR.yaml | 1 + translations/catroweb.pt_PT.yaml | 1 + translations/catroweb.ro_RO.yaml | 1 + translations/catroweb.ru_RU.yaml | 1 + translations/catroweb.sd_PK.yaml | 1 + translations/catroweb.si_LK.yaml | 1 + translations/catroweb.sk_SK.yaml | 1 + translations/catroweb.sl_SI.yaml | 1 + translations/catroweb.sq_AL.yaml | 1 + translations/catroweb.sr_SP.yaml | 1 + translations/catroweb.sv_SE.yaml | 1 + translations/catroweb.sw_KE.yaml | 1 + translations/catroweb.ta_IN.yaml | 1 + translations/catroweb.te_IN.yaml | 1 + translations/catroweb.th_TH.yaml | 1 + translations/catroweb.tl_PH.yaml | 1 + translations/catroweb.tr_TR.yaml | 1 + translations/catroweb.tw_TW.yaml | 1 + translations/catroweb.uk_UA.yaml | 1 + translations/catroweb.ur_PK.yaml | 1 + translations/catroweb.uz_UZ.yaml | 1 + translations/catroweb.vi_VN.yaml | 1 + translations/catroweb.yo_NG.yaml | 1 + translations/catroweb.zh_CN.yaml | 1 + translations/catroweb.zh_TW.yaml | 1 + 78 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 templates/Admin/Tools/feature_flag_sidebar_studio_link.html.twig diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e6bdf0c938..c44b33263a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -90,7 +90,7 @@ jobs: name: PhpUnitTestReport path: tests/TestReports/CoverageReports/PhpUnit - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v4-beta with: # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos file: tests/TestReports/CoverageReports/PhpUnit/coverage.xml @@ -236,7 +236,7 @@ jobs: docker exec app.catroweb bin/behat -s ${{ matrix.testSuite }} -f pretty; fi - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v4-beta with: # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos file: tests/TestReports/CoverageReports/Behat/coverage.xml diff --git a/config/features.php b/config/features.php index 32e4b77a49..07c8039744 100644 --- a/config/features.php +++ b/config/features.php @@ -4,4 +4,5 @@ 'Test-Flag' => false, 'New-Feature' => false, 'Experimental-Feature' => true, + 'Sidebar-Studio-Link-Feature' => false, ]; diff --git a/src/Application/Controller/Test/TestFeatureFlagController.php b/src/Application/Controller/Test/TestFeatureFlagController.php index a7ae714861..3fdefdf7de 100644 --- a/src/Application/Controller/Test/TestFeatureFlagController.php +++ b/src/Application/Controller/Test/TestFeatureFlagController.php @@ -16,4 +16,9 @@ public function testFlagAction(): Response { return $this->render('Admin/Tools/test_feature_flag.html.twig', ['enabled' => $this->manager->isEnabled('Test-Flag')]); } + + public function testFlagSidebarStudioLink(): Response + { + return $this->render('Admin/Tools/feature_flag_sidebar_studio_link.html.twig', ['enabled' => $this->manager->isEnabled('Sidebar-Studio-Link-Feature')]); + } } diff --git a/templates/Admin/Tools/feature_flag_sidebar_studio_link.html.twig b/templates/Admin/Tools/feature_flag_sidebar_studio_link.html.twig new file mode 100644 index 0000000000..a183cef97c --- /dev/null +++ b/templates/Admin/Tools/feature_flag_sidebar_studio_link.html.twig @@ -0,0 +1,8 @@ +{% if enabled %} + +{% endif %} diff --git a/templates/Default/sidebar.html.twig b/templates/Default/sidebar.html.twig index 8eb633d292..e34d21d92a 100644 --- a/templates/Default/sidebar.html.twig +++ b/templates/Default/sidebar.html.twig @@ -113,6 +113,7 @@ {# Always visible #} + + {{ render(controller( + 'App\\Application\\Controller\\Test\\TestFeatureFlagController::testFlagSidebarStudioLink' + )) }} + + +