From d5f8c46f2c9ced480f075c8299c22d5bb14ad84b Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Wed, 1 Sep 2021 19:49:44 +0800 Subject: [PATCH 01/13] COMPATIBILITY: Add new textarea-text-manipulation mixin --- assets/javascripts/wizard-custom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index d0fef99a..625a1542 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -3,6 +3,7 @@ //= require discourse/app/mixins/singleton //= require discourse/app/mixins/upload //= require discourse/app/mixins/composer-upload +//= require discourse/app/mixins/textarea-text-manipulation //= require discourse/app/adapters/rest From 65e269c71fffe2d3f3ec29e4abcb2b1ea0bed192 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Fri, 3 Sep 2021 09:41:11 +0800 Subject: [PATCH 02/13] IMPROVE: by default every tag should be available in tag field --- .../wizard/templates/components/wizard-field-tag.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs b/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs index 5dd81c99..8ebc56eb 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs @@ -1 +1 @@ -{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex}} +{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex everyTag=true}} From 89118623206827cf2b0c995252a8e80c401ca633 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Mon, 6 Sep 2021 10:30:04 +0800 Subject: [PATCH 03/13] COMPATIBILITY: pin current stable prior to tests-passed compatibility changes --- .discourse-compatibility | 1 + 1 file changed, 1 insertion(+) diff --git a/.discourse-compatibility b/.discourse-compatibility index cfb01c11..d1408e07 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1 +1,2 @@ +2.7.8: e865516f48e49fc5b87ce83aa151305d33a3d0c8 2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c \ No newline at end of file From 481e9e668ca093f62603f599020a96acdd07fb7c Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Mon, 6 Sep 2021 10:45:41 +0800 Subject: [PATCH 04/13] IMPROVE: by default every tag should be available in admin tag selector --- .../discourse/templates/components/wizard-mapper-selector.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs index 94870416..60f4c0cf 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs @@ -58,6 +58,7 @@ {{tag-chooser tags=value onChange=(action "changeValue") + everyTag=true options=(hash none=placeholderKey filterable=true From 2362478c9c75281146b551f326f86f5e3513029d Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Fri, 3 Sep 2021 09:41:11 +0800 Subject: [PATCH 05/13] IMPROVE: by default every tag should be available in tag field --- .../wizard/templates/components/wizard-field-tag.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs b/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs index 5dd81c99..8ebc56eb 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-tag.hbs @@ -1 +1 @@ -{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex}} +{{tag-chooser tags=field.value maximum=field.limit tabindex=field.tabindex everyTag=true}} From e07a57e398b6b1676ab42a7e34467556fca5416b Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Mon, 6 Sep 2021 10:45:41 +0800 Subject: [PATCH 06/13] IMPROVE: by default every tag should be available in admin tag selector --- .../discourse/templates/components/wizard-mapper-selector.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs index 94870416..60f4c0cf 100644 --- a/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs @@ -58,6 +58,7 @@ {{tag-chooser tags=value onChange=(action "changeValue") + everyTag=true options=(hash none=placeholderKey filterable=true From 9db8ce908aeb4ecb881f23327e5dca493aaef157 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Tue, 31 Aug 2021 11:25:06 +0800 Subject: [PATCH 07/13] COMPATIBILITY: Add new composer-upload mixin --- assets/javascripts/wizard-custom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index 8b30ad94..d0fef99a 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -2,6 +2,7 @@ //= require discourse/app/mixins/singleton //= require discourse/app/mixins/upload +//= require discourse/app/mixins/composer-upload //= require discourse/app/adapters/rest From a5b0cf95ba3a9bb44c69cf79238e6a94e1e12baf Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Wed, 1 Sep 2021 19:49:44 +0800 Subject: [PATCH 08/13] COMPATIBILITY: Add new textarea-text-manipulation mixin --- assets/javascripts/wizard-custom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index d0fef99a..625a1542 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -3,6 +3,7 @@ //= require discourse/app/mixins/singleton //= require discourse/app/mixins/upload //= require discourse/app/mixins/composer-upload +//= require discourse/app/mixins/textarea-text-manipulation //= require discourse/app/adapters/rest From 4b20542251b2dc3750d59e5935463cfa6d19d380 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Mon, 6 Sep 2021 10:30:04 +0800 Subject: [PATCH 09/13] COMPATIBILITY: pin current stable prior to tests-passed compatibility changes --- .discourse-compatibility | 1 + 1 file changed, 1 insertion(+) diff --git a/.discourse-compatibility b/.discourse-compatibility index cfb01c11..d1408e07 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1 +1,2 @@ +2.7.8: e865516f48e49fc5b87ce83aa151305d33a3d0c8 2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c \ No newline at end of file From 1d70232952bd24bd4e12f965c9fc354d7dcfc50f Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Mon, 6 Sep 2021 10:53:53 +0800 Subject: [PATCH 10/13] COMPATIBILITY: update stable commit after rebase --- .discourse-compatibility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.discourse-compatibility b/.discourse-compatibility index d1408e07..b2f02cc7 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,2 +1,2 @@ -2.7.8: e865516f48e49fc5b87ce83aa151305d33a3d0c8 +2.7.8: e07a57e398b6b1676ab42a7e34467556fca5416b 2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c \ No newline at end of file From 208cb1229a72acc4e8c02d6e9c0e23980b25c5d9 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Tue, 7 Sep 2021 11:11:29 +0800 Subject: [PATCH 11/13] FIX: Minor bugfixes in manager and create_group action --- controllers/custom_wizard/admin/manager.rb | 11 ++++++----- lib/custom_wizard/mapper.rb | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/controllers/custom_wizard/admin/manager.rb b/controllers/custom_wizard/admin/manager.rb index 2277de48..7dcc662c 100644 --- a/controllers/custom_wizard/admin/manager.rb +++ b/controllers/custom_wizard/admin/manager.rb @@ -48,20 +48,21 @@ class CustomWizard::AdminManagerController < CustomWizard::AdminController imported = [] failures = [] + templates = template_json.is_a?(Array) ? template_json : [template_json] - template_json.each do |json| - template = CustomWizard::Template.new(json) + templates.each do |raw_template| + template = CustomWizard::Template.new(raw_template) template.save(skip_jobs: true, create: true) if template.errors.any? failures.push( - id: json['id'], + id: template.data['id'], messages: template.errors.full_messages.join(', ') ) else imported.push( - id: json['id'], - name: json['name'] + id: template.data['id'], + name: template.data['name'] ) end end diff --git a/lib/custom_wizard/mapper.rb b/lib/custom_wizard/mapper.rb index 0c3543cf..3ba52cb0 100644 --- a/lib/custom_wizard/mapper.rb +++ b/lib/custom_wizard/mapper.rb @@ -225,7 +225,7 @@ class CustomWizard::Mapper end def interpolate(string, opts = { user: true, wizard: true, value: true, template: false }) - return string if string.blank? + return string if string.blank? || string.frozen? if opts[:user] string.gsub!(/u\{(.*?)\}/) { |match| map_user_field($1) || '' } From 61f7cf64aff4e7fffdc31a919ffac1fb94c9b331 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Tue, 7 Sep 2021 11:11:59 +0800 Subject: [PATCH 12/13] COMPATIBILITY: add new vendor require --- assets/javascripts/wizard-custom.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index 625a1542..d76665b0 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -1,4 +1,6 @@ //= require_tree_discourse discourse/app/lib +//= require_tree_discourse discourse/app/mixins +// //= require discourse/app/mixins/singleton //= require discourse/app/mixins/upload @@ -66,6 +68,7 @@ //= require template_include.js //= require caret_position.js //= require popper.js +//= require uppy.js //= require bootstrap-modal.js //= require bootbox.js //= require discourse-shims From 2cd02a15fe7e68b04f0a00a462ed18a924f7abaf Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Thu, 9 Sep 2021 14:39:36 +0800 Subject: [PATCH 13/13] COMPATIBILITY: remove removed vendor --- assets/javascripts/wizard-custom.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index d76665b0..768719c9 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -64,7 +64,6 @@ //= require markdown-it-bundle //= require lodash.js -//= require mousetrap.js //= require template_include.js //= require caret_position.js //= require popper.js