(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 · GitHub

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개의 좋아요
Introducing Discourse developer toolbar
Plugin Outlet Locations
Is there a theming 'map'? (An easy way to find plugin-outlets etc)
Custom text at top of search results page
Plugin Outlet Locations
List of components or PluginOutlets with explanatory documentation
Locations Plugin :earth_africa:
Add background video to certain user profiles?
Plug in to check HTML tag's Discourse Site
Developing Discourse Plugins - Part 2 - Connect to a plugin outlet
Adding custom html under header (d-header-wrap) instead of main-outlet
I want to insert images (banner) between the topic answers. How do I start?
How to add a link shortcut to the area under the title
Add Banner/HTML (Widget) before reply button
FKB Pro - Social theme
Stat Banner
Total Posts count instead of Post per month
Settings not appearing
Enable Dev Tools Button
Be able to put the banner above the main content but not above the sidebar
Adding new columns to user lists in groups
Featured Lists
Theme Confusion
How to override the site-header.hbs file from custom theme?
Add HTML above
I want to add a message below each question
Add localizable strings to themes and theme components
Developing Discourse Themes & Theme Components
When to use a plugin vs theme component?
How I can add plugin to my discourse
Add custom content that only appears on your homepage
What HTML can you customize?
Fetch third party data for topic list
Is there a theming 'map'? (An easy way to find plugin-outlets etc)
Help me to append html code on Hamburger Section
Using scripts in the topic
Why is the styleguide so well hidden?
api.decorateWidget - how can I find the template's names?
Using Plugin Outlet Connectors from a Theme or Plugin
Can I put the search form at the top of our 404 page?

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개의 좋아요

테마를 몇 개 개발하고 있어서 이 테마 컴포넌트(그리고 테마 미리보기)를 정말 많이 사용하지만, @RGJ에게 감사 인사를 드린 적이 없었습니다.

이 테마 컴포넌트가 얼마나 많은 시간을 절약해 주었는지 말로 다 표현하기 어렵지만, 정말 많았습니다. 정말 잘 만들었고, 매우 유용합니다.

10개의 좋아요

컴포넌트를 설치하려고 할 때 “Bad Gateway” 오류가 발생합니다. 또한 생성된 내용을 head_tag.html 파일에 수동으로 붙여넣으려고 할 때도 같은 오류가 나요.

해당 파일에 길이 제한이 있는 건가요? 내용을 두 개의 별도 파일로 나누면 정상적으로 작동하거든요.

길이 제한이 없습니다(적어도 현재 파일 길이에 근접한 제한은 없습니다).

테마 컴포넌트를 설치하는 데 시간이 좀 걸리며, 서버가 충분히 빠르지 않으면 사용 중인 플러그인 아웃렛/스크립트 조각의 수가 많아 타임아웃이 발생할 수 있습니다.

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개의 좋아요

설정을 하나만 제안해도 될까요? 배경색을 선택하는 설정입니다. 'brutal red’가 ‘poppin’ green’으로 바뀌어서 다행이지만, 개인적으로는 톤 다운된 색상을 더 좋아합니다. :slight_smile:

(원하시면 PR을 올릴 수 있습니다)

4개의 좋아요

새 버전!!

  • 3.2beta PluginOutlets 모두 업데이트됨
  • 색상 설정 가능
  • 아웃렛을 클릭하면 실제 매개변수를 확인할 수 있습니다 :fire:

firefox_whjNGBiVSB

13개의 좋아요

이것은 약간의 버그가 있는 것 같습니다. 이제 제 PC에서는 모든 페이지 새로 고침 시 기본적으로 활성화되며, 몇 가지 비활성화(deprecation) 경고가 발생합니다:

[THEME 105 'Plugin Outlet Locations'] Deprecation notice: The header-icons widget has been deprecated and decorateWidget is no longer a supported override. [deprecated since Discourse v3.3.0.beta1-dev] [deprecation id: discourse.header-widget-overrides] [info: https://meta.discourse.org/t/296544]
[THEME 105 'Plugin Outlet Locations'] Deprecation notice: The header-icons widget has been deprecated and attachWidgetAction is no longer a supported override. [deprecated since Discourse v3.3.0.beta1-dev] [deprecation id: discourse.header-widget-overrides] [info: https://meta.discourse.org/t/296544]
1개의 좋아요

아, 그걸 알려주셔서 감사합니다 @Firepup650 ! :+1:
저는 해당 비권장(deprecation) 항목에 대해 플러그인만 확인하고 테마 컴포넌트에 대해서는 잊고 있었습니다.

해당 비권장 항목을 수정하기 위해 업데이트를 적용했습니다.

조금 더 시간이 걸리겠지만, 새로운 플러그인 아울렛을 포함하도록 컴포넌트도 곧 업데이트할 예정입니다.
새로운 래퍼 아울렛은 추가적인 시간과 리팩토링이 필요하므로 제외하고, 최신 플러그인 아울렛을 포함하도록 컴포넌트도 업데이트했습니다.

8개의 좋아요