(deprecated) Plugin outlet locations theme component

:mega: the ability to debug plugin outlets is now included in core. Check out this topic for more details

Original theme component info

Continuing the discussion from Plugin Outlet Locations:

I needed an updated version with all the plugin outlets that have been added recently and then I realised that it would be really easy to create a theme component for this, so there is no need to install a plugin any more.

Repository: GitHub - communiteq/plugin-outlets-theme-component

The repository includes a script (gen/generate.rb) that will auto-generate the outlets based on the Discourse source code.

To toggle the plugin outlets, click the “connector” icon in the top right.

When you click a specific plugin outlet, the display will change and you will be able to see all the arguments to the plugin outlet. Click it again to change it back.

firefox_whjNGBiVSB

Install this theme component

Theme preview: Theme Creator

「いいね!」 63

Didn’t @Mittineague write something like this before?

「いいね!」 1

Yes, see the link at the very top of this topic, that refers to the topic about that. @Mittineague wrote a plugin in 2015. I was using it and then I found out that it needed to be updated (it hadn’t been updated for over 2 years).

The next step was me realizing that this could be done much easier now using a theme component.

「いいね!」 7

Yes, I had started to update the plugin to take into account the changes in the number and locations of plugin outlets a few weeks ago, but other priorities moved it down on my ever growing todo list.

If the same information can be provided as a theme component that works in the GUI and doesn’t require editing app.yml and running launcher I think it would be easier for most. I may be wrong, but I have a feeling most prefer GUI over CLI.

「いいね!」 6

I use this theme component (and the theme preview) a lot since I develop a few themes but I never thanked @RGJ

I can’t say how much time this theme component helped me save, but it’s a lot. Great job, very very useful.

「いいね!」 10

I’m getting a “Bad Gateway” error when trying to install the component. Also when trying to paste the generated content into head_tag.html manually.

Is there a length limit for that file? Because it works fine when I split the content into two separate files.

There is no length limit (at least not one that is close to the current length of the file).

The theme component does take a while to install, your server might be not fast enough and time out because of the large number of plugin outlets / script fragments that are being used.

「いいね!」 2

開発中にプラグアウトレットを確認するために、このテーマの追加/削除を常に行っていました。開発環境でこれを容易にするために、プラグアウトレットの表示/非表示を切り替えるトグルボタンを追加しました。他の人も役立つかもしれないと思ったので、PRを作成しました。

「いいね!」 13

素晴らしいです。ありがとうございます!
PRがマージされました。

「いいね!」 9

素晴らしいアイデアです!プラグインボタンのアイコンが気に入りました :slight_smile:

一点だけ問題があります。異なるルートに移動すると、上部のトグルがコンテンツのアウトレットと同期しなくなり、すべてを同時にオンまたはオフにすることができなくなるようです :sweat_smile: (私の場合は便利でしたが、一般的には望ましくないかもしれません)。

「いいね!」 2

@merefield
ああ、そうですね。:sweat_smile: bodyにクラスを追加して表示/非表示を切り替えるように変更したところ、解決したようです。PRはこちらです。

「いいね!」 6

何が足りないのでしょうか?コンポーネントはインストールしましたが、これが機能するためにはまだスクリプトを実行する必要がありますか?スクリプトはサーバーのどこかにあり、実行できますか?それともコピー&ペーストする必要がありますか?common/head_tag.htmlを編集している場合、このコンポーネントを無効にするために元に戻す必要がありますか?
:folded_hands:

スクリプトはプラグインのメンテナンス用であり、必要ありません。

テーマコンポーネントをインストールし、メインテーマに追加して、「プラグ」アイコンを押すだけです。

firefox_jDikn4jVrC

「いいね!」 6

Custom Header Links (icons) と併用すると、小さなバグが発生します。
カスタムヘッダーアイコンをクリックすると、アウトレットボタンがトリガーされます。

「いいね!」 1

新しいユーザーカードに小さなバグがあります。これはコアに搭載される場合(もし搭載されるなら)でも発生するかわかりませんが、実験的なユーザーカードのコンセントは、コンセントがオフになっている場合でも表示されます。

ちなみに、以前言わなかったかもしれませんが、このテーマコンポーネントは本当に素晴らしいです。

「いいね!」 2

はい、再現できました。ご報告ありがとうございます!:+1:
来週初めにテーマコンポーネントの新しいバージョンをリリースします。3.1用の新しいアウトレットとこのバグの修正が含まれます。

「いいね!」 3

単一の設定を提案してもよろしいでしょうか?背景色を選択できるようにすることです。「ブルータル・レッド」が「ポップなグリーン」に変更されたのは嬉しいですが、個人的には落ち着いた色が好みです。:slight_smile:

(プルリクエストは可能です。)

「いいね!」 4

新しいバージョンです!!

  • すべての 3.2beta PluginOutlets で更新されました
  • 設定可能な色
  • コンセントをクリックして実際のパラメータを表示します :fire:

firefox_whjNGBiVSB

「いいね!」 13

これは少しバグがあるようです。PCでページをリロードするたびにデフォルトで有効になり、いくつかの非推奨事項が通知されています。

[THEME 105 'Plugin Outlet Locations'] 非推奨通知: header-icons ウィジェットは非推奨となり、decorateWidget はサポートされるオーバーライドではなくなりました。[非推奨バージョン: Discourse v3.3.0.beta1-dev] [非推奨ID: discourse.header-widget-overrides] [情報: https://meta.discourse.org/t/296544]
[THEME 105 'Plugin Outlet Locations'] 非推奨通知: header-icons ウィジェットは非推奨となり、attachWidgetAction はサポートされるオーバーライドではなくなりました。[非推奨バージョン: Discourse v3.3.0.beta1-dev] [非推奨ID: discourse.header-widget-overrides] [情報: https://meta.discourse.org/t/296544]
「いいね!」 1

Firepup650さん、ご指摘ありがとうございます!:+1:
プラグインは確認していましたが、テーマコンポーネントについては忘れていました。

この非推奨の修正のため、アップデートをプッシュしました。

近日中に新しいラッパーアウトレットのため、さらに時間がかかりますが、コンポーネントを更新して最新のプラグインアウトレットを含める予定です。
ラッパーアウトレットはさらに時間とリファクタリングが必要なため、それ以外は最新のプラグインアウトレットを含めるようにコンポーネントを更新しました。

「いいね!」 8