OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
New onboarding videos on s3
Oliver Güntherdc2b8c3f2617
diff --git a/app/components/enterprise_trials/welcome_dialog_component.html.erb b/app/components/enterprise_trials/welcome_dialog_component.html.erbindex 630c3ec6a6c..8aa6b2f7aaf 100644--- a/app/components/enterprise_trials/welcome_dialog_component.html.erb+++ b/app/components/enterprise_trials/welcome_dialog_component.html.erb@@ -3,7 +3,7 @@Primer::Alpha::Dialog.new(id: "enterprise-trial-welcome-dialog",data: {- controller: "auto-show-dialog iframe-media-dialog"+ controller: "auto-show-dialog media-dialog"},title: I18n.t("ee.trial.welcome_title"),size: :xlarge@@ -17,13 +17,17 @@endflex.with_row(mt: 2) docontent_tag :div, class: "onboarding--video" do- content_tag(:iframe,- "",- frameborder: "0",- height: "400",- width: "100%",- src: OpenProject::Static::Links.url_for(:enterprise_welcome_video),- allowfullscreen: true)+ render(Primer::BaseComponent.new(+ my: 2,+ tag: :video,+ frameborder: "0",+ height: "430",+ width: "100%",+ autoplay: "autoplay",+ controls: true,+ src: OpenProject::Static::Links.url_for(:enterprise_welcome_video),+ allowfullscreen: true+ ))endendenddiff --git a/app/components/onboarding/video_dialog_component.html.erb b/app/components/onboarding/video_dialog_component.html.erbindex 30269834f5f..083533cc895 100644--- a/app/components/onboarding/video_dialog_component.html.erb+++ b/app/components/onboarding/video_dialog_component.html.erb@@ -2,6 +2,9 @@render(Primer::Alpha::Dialog.new(id: "onboarding-video-dialog",+ data: {+ controller: "media-dialog"+ },title:,size: :xlarge)@@ -16,11 +19,14 @@render(Primer::BaseComponent.new(tag: :div, classes: "onboarding--video")) dorender(Primer::BaseComponent.new(- tag: :iframe,+ my: 2,+ tag: :video,frameborder: "0",height: "430",width: "100%",- src: iframe_src,+ autoplay: "autoplay",+ controls: true,+ src: video_src,allowfullscreen: true))diff --git a/app/components/onboarding/video_dialog_component.rb b/app/components/onboarding/video_dialog_component.rbindex 72497c5782b..24463392b43 100644--- a/app/components/onboarding/video_dialog_component.rb+++ b/app/components/onboarding/video_dialog_component.rb@@ -37,8 +37,8 @@ module OnboardingI18n.t("onboarding.welcome", app_title: Setting.app_title)end- def iframe_src- OpenProject::Configuration.onboarding_video_url+ def video_src+ OpenProject::Static::Links.url_for(:onboarding_video_url)endendenddiff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rbindex b6b6a89265c..ad7f2b5dbe2 100644--- a/config/constants/settings/definition.rb+++ b/config/constants/settings/definition.rb@@ -758,10 +758,6 @@ module Settingsdefault: nil,writable: false # this changes a global variable and must therefore not be writable at runtime},- onboarding_video_url: {- description: "Onboarding guide instructional video URL",- default: "https://player.vimeo.com/video/163426858?autoplay=1"- },onboarding_enabled: {description: "Enable or disable onboarding guided tour for new users",default: truediff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rbindex 9969096f567..811e35c8989 100644--- a/config/initializers/content_security_policy.rb+++ b/config/initializers/content_security_policy.rb@@ -43,8 +43,8 @@ Rails.application.config.after_initialize doassets_src << asset_host if asset_host.present?# Valid for iframes- frame_src = %w['self' https://player.vimeo.com https://www.youtube.com] # rubocop:disable Lint/PercentStringArray- frame_src << OpenProject::Configuration[:security_badge_url]+ frame_src = []+ frame_src << OpenProject::Configuration[:security_badge_url] if OpenProject::Configuration[:security_badge_displayed]# Default srcdefault_src = %w('self') # rubocop:disable Lint/PercentStringArray@@ -65,6 +65,12 @@ Rails.application.config.after_initialize do# Rules for media (e.g. video sources)media_src = default_srcmedia_src << asset_host if asset_host.present?+ # Getting started video+ onboarding = Addressable::URI.parse(OpenProject::Static::Links.url_for(:onboarding_video_url))+ media_src << "#{onboarding.scheme}://#{onboarding.host}"+ enterprise_video = Addressable::URI.parse(OpenProject::Static::Links.url_for(:enterprise_welcome_video))+ media_src << "#{enterprise_video.scheme}://#{enterprise_video.host}"+ media_src.uniq!if OpenProject::Configuration.appsignal_frontend_keyconnect_src += ["https://appsignal-endpoint.net"]diff --git a/config/locales/en.yml b/config/locales/en.ymlindex a17e1c17a8b..a7501fd02e3 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -3120,7 +3120,7 @@ en:label_integer: "Integer"label_interface: "Interface"label_internal: "Internal"- label_introduction_video: "Introduction video"+ label_introduction_video: "Getting started video"label_invite_user: "Invite user"label_item: "Item"label_item_plural: "Items"diff --git a/config/static_links.yml b/config/static_links.ymlindex 6d977946df6..d8dbde9be05 100644--- a/config/static_links.yml+++ b/config/static_links.yml@@ -77,7 +77,7 @@ enterprise_support_as_community:href: https://www.openproject.org/pricing/#supportlabel: :label_enterprise_supportenterprise_welcome_video:- href: https://www.youtube.com/embed/zLMSydhFSkw?autoplay=1'+ href: https://openproject-docs.s3.eu-central-1.amazonaws.com/videos/OpenProject-Enterprise-add-ons.mp4forums:href: https://community.openproject.org/projects/openproject/forumslabel: homescreen.links.forums@@ -109,6 +109,9 @@ security_alerts:oauth_authorization_code_flow:href: https://oauth.net/2/grant-types/authorization-code/label: oauth.flows.authorization_code+onboarding_video_url:+ href: https://openproject-docs.s3.eu-central-1.amazonaws.com/videos/Getting_started_with_OpenProject.mp4+ label: top_menu.getting_startedopenproject_docs:href: https://www.openproject.org/docs/origin_mdn_documentation:diff --git a/docs/installation-and-operations/configuration/README.md b/docs/installation-and-operations/configuration/README.mdindex 37a1d3b2188..868b2cff449 100644--- a/docs/installation-and-operations/configuration/README.md+++ b/docs/installation-and-operations/configuration/README.md@@ -719,9 +719,8 @@ OPENPROJECT_AFTER__LOGIN__DEFAULT__REDIRECT__URL="/my/page"### Onboarding video url-`onboarding_video_url`: An URL for the video displayed on the onboarding modal. This is only shown when the user logs in for the first time.--*default="[https://player.vimeo.com/video/163426858?autoplay=1](https://player.vimeo.com/video/163426858?autoplay=1)"*+`onboarding_video_url`: A URL for the video displayed on the onboarding modal.+This video URL is whitelisted in the content security policy.### Enterprise fail fastdiff --git a/frontend/src/stimulus/controllers/dynamic/iframe-media-dialog.controller.ts b/frontend/src/stimulus/controllers/dynamic/media-dialog.controller.tssimilarity index 83%rename from frontend/src/stimulus/controllers/dynamic/iframe-media-dialog.controller.tsrename to frontend/src/stimulus/controllers/dynamic/media-dialog.controller.tsindex b1d11adf9e4..be05628f747 100644--- a/frontend/src/stimulus/controllers/dynamic/iframe-media-dialog.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/media-dialog.controller.ts@@ -30,11 +30,14 @@import { Controller } from '@hotwired/stimulus';-export default class AutoShowDialogController extends Controller<HTMLDialogElement> {+export default class MediaDialogController extends Controller<HTMLDialogElement> {connect() {- // Remove the iframe element on close to prevent background play+ // Remove the video element on close to prevent background playthis.element.addEventListener('close', () => {- this.element.querySelector('iframe')?.remove();+ this+ .element+ .querySelectorAll('iframe,video,embed')+ .forEach(el => el.remove());});}}