Top Contributors 목록이 채워지려면 사용자 디렉터리가 활성화되어 있어야 합니다. 목록이 비어 있다면 관리자 설정에서 enable user directory를 검색하여 활성화되어 있는지 확인하세요.
* Calendar 플러그인과 함께 사용할 때만 사용할 수 있습니다.
** Gamification 플러그인과 함께 사용할 때만 사용할 수 있습니다.
사이드바 블록으로 다른 Ember 컴포넌트도 사용할 수 있으며, 올바른 이름만 사용하면 됩니다. 예를 들어, 코어에는 signup-cta Ember 컴포넌트가 포함되어 있으며, 이를 사이드바에서 그대로 사용할 수 있습니다. 매개변수 집합을 기대하는 컴포넌트는 사용할 수 없지만, 별도의 테마에서 자체 Ember 컴포넌트를 구축하고 사이드바의 blocks 설정에서 이름만 참조하여 사용할 수 있습니다.
고급 사용자 전용: 사이드바를 선택된 루트로 제한합니다. 예: discovery.latest, discovery.unread, discovery.new, discovery.top, tag.show, “c/category-slug” (카테고리의 경우), “tag/sample-tag” (태그의 경우). 비어 있으면 사이드바가 모든 목록 루트에 표시됩니다.
blocks: 표시할 블록을 선택하고 순서를 조정합니다
show_in_routes: 사이드바를 표시할 주제 목록 루트를 결정합니다. 기본적으로 /categories를 제외한 모든 탐색(discovery) 루트에 표시됩니다.
컴포넌트는 매우 기본적인 스타일링만 포함된다는 점에 유의하세요. 컴포넌트를 사용하는 관리자가 자신의 테마에서 자체 스타일링을 추가할 것으로 가정합니다.
상호작용
Discourse Calendar 플러그인과 함께 사용할 경우, 다가오는 이벤트를 위한 사이드바 블록을 추가할 수 있습니다. 블록 이름은 upcoming-events-list이며, 날짜 형식은 이 구문을 따르도록 사용자 지정할 수 있습니다(예: MMMM D, YYYY). 미래까지 얼마나 멀리 볼지 및 하위 카테고리 이벤트가 포함되는지 여부도 설정할 수 있습니다(위 표 참조)
Great to see this as an official Theme Component! It certainly opens up a new world of customisations.
I’ve got 2 questions:
In the sidebar, I want to display the /latest topic list similar to the way that category-topics displays them. Is this possible? recent-replies almost gets there (especially if the excerpt is hidden), but I really want to include topics without replies.
Is it possible to only display the sideblocks in certain categories? What I mean is that the only route displayed is the Category Topic List, and only for the categories I specify.
Apologies, the documentation for this is lacking (I will update it now). The name of the param for custom-html is content.
We don’t have anything ready-made for the full /latest list, but you build your own and add it to the configuration using its name. Should be very similar to the category/tag lists, just without a filter.
Currently, no, you can’t show it on specific categories only. You can however use discovery.category in the show in routes setting, that will only show the sidebar on category routes (but on all of them, not a subset).
Just noted a limitation of the component, especially when it comes the category-topics & subcategory-list blocks, and that is adding multiple blocks of either of these types with different id always resulted in them surfacing topics/subcategories of the uppermost block in the launch editor (I assume).
One bug I’m having right now is after playing around with the subcategory-list block for around 10-12 times, it stop showing altogether on our staging site (see video below).
The subcategory-list block does not take a parameter at all. When used, it will show the subcategories of the current category based on which current category you have navigated to… so it doesn’t make sense to use that block more than once.
That is also why the subcategory-list isn’t showing in your video. If you’re on a non-category route, that block does not show.
For category-topics, in your video I see the same ID used twice: 7. I did a local test and with different IDs I get different topics displayed (i.e. I can’t reproduce the reported bug).
Currently, no, this option does not exist. It makes sense to add it, although, I would imagine that it should support multiple IDs so you can show the block for a list of categories (A, B and C, for example). I am happy to review PRs on the repo, if your developers think they can add this, that would be great. (Otherwise, I can add it to a list of nice-to-haves in the theme component.)
Do you mean a) to fetch the results and cache them for a week or b) to fetch the top contributors for the last week on every load? The latter should be easy to add, caching is a little trickier.
I’m not sure where to find the code for that - would you mind directing me? I’d like to look at modifying the category-topics so that having no ID gives you all categories (and thus effectively the /latest list)
Hi! I’m not sure if this component is causing errors. But once disabled, there are no more errors seen. Could someone take a look at this to help me figure out the issue? Would appreciate it a lot.
With it enabled, visiting a certain topic on desktop, clicking the site logo in the top bar in the attempt to return to the homepage would bring me to a never-disappearing loading screen and throw errors in the browser console (as below). No related error logs seen in the mysite/logs path.
d6ca234baf8d2d5e65f414f31e198fe956d9a939.js?__ws=www.bfsu.cafe:98 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'findFiltered')
at new CategoryTopics (d6ca234baf8d2d5e65f414f31e198fe956d9a939.js?__ws=www.bfsu.cafe:98:18)
at h.createComponent (base-component-manager.js:37:1)
at h.createComponent (ember-component-manager.js:54:1)
at C.create (manager.js:558:1)
at Object.evaluate (runtime.js:3301:1)
at Object.evaluate (runtime.js:1312:1)
at Dt.evaluateSyscall (runtime.js:5232:1)
at Dt.evaluateInner (runtime.js:5188:1)
at Dt.evaluateOuter (runtime.js:5180:1)
at Wt.next (runtime.js:6191:1)
at Wt._execute (runtime.js:6175:1)
at Wt.execute (runtime.js:6166:1)
at qt.handleException (runtime.js:5369:1)
at Kt.handleException (runtime.js:5605:1)
at Lt.throw (runtime.js:5302:1)
at Be.evaluate (runtime.js:2580:1)
at Lt._execute (runtime.js:5285:1)
at Lt.execute (runtime.js:5266:1)
at Ht.rerender (runtime.js:5634:1)
at Er.render (index.js:7578:1)
at index.js:7896:1
at It (runtime.js:5074:1)
at Rr._renderRoots (index.js:7876:1)
at Rr._renderRootsTransaction (index.js:7928:1)
at Rr._revalidate (index.js:7970:1)
at invoke (backburner.js:351:1)
at p.flush (backburner.js:241:1)
at h.flush (backburner.js:447:1)
at q._end (backburner.js:999:1)
at _boundAutorunEnd (backburner.js:648:1)
CategoryTopics @ d6ca234baf8d2d5e65f414f31e198fe956d9a939.js?__ws=www.bfsu.cafe:98
createComponent @ base-component-manager.js:37
createComponent @ ember-component-manager.js:54
create @ manager.js:558
(匿名) @ runtime.js:3301
evaluate @ runtime.js:1312
evaluateSyscall @ runtime.js:5232
evaluateInner @ runtime.js:5188
evaluateOuter @ runtime.js:5180
next @ runtime.js:6191
_execute @ runtime.js:6175
execute @ runtime.js:6166
handleException @ runtime.js:5369
handleException @ runtime.js:5605
throw @ runtime.js:5302
evaluate @ runtime.js:2580
_execute @ runtime.js:5285
execute @ runtime.js:5266
rerender @ runtime.js:5634
render @ index.js:7578
(匿名) @ index.js:7896
It @ runtime.js:5074
_renderRoots @ index.js:7876
_renderRootsTransaction @ index.js:7928
_revalidate @ index.js:7970
invoke @ backburner.js:351
flush @ backburner.js:241
flush @ backburner.js:447
_end @ backburner.js:999
_boundAutorunEnd @ backburner.js:648
Promise.then(异步)
n @ backburner.js:28
flush @ index.js:46
_scheduleAutorun @ backburner.js:1218
_end @ backburner.js:1009
_boundAutorunEnd @ backburner.js:648
Promise.then(异步)
n @ backburner.js:28
flush @ index.js:46
_scheduleAutorun @ backburner.js:1218
_end @ backburner.js:1009
_boundAutorunEnd @ backburner.js:648
Promise.then(异步)
n @ backburner.js:28
flush @ index.js:46
_scheduleAutorun @ backburner.js:1218
_end @ backburner.js:1009
_boundAutorunEnd @ backburner.js:648
Promise.then(异步)
n @ backburner.js:28
flush @ index.js:46
_scheduleAutorun @ backburner.js:1218
_ensureInstance @ backburner.js:1206
scheduleOnce @ backburner.js:845
k @ index.js:522
queueRerender @ mount-widget.js:124
scheduleRerender @ widget.js:319
rerenderResult @ widget.js:365
F @ hooks.js:207
(匿名) @ hooks.js:247
dispatch @ jquery.js:5430
_.handle @ jquery.js:5234
frame:251 You dismissed the flag, but third party cookies are disabled on your browser so the flag will come back the next time you visit the page.
I see info about this component in the js file mentioned in the first line of the error log above.
I noticed that my entire header and footer disappears globally when I have this enabled (everything in my header.html and footer.html). Was this intentional? But to work around this I have to use the PluginAPI to manually add a header/footer.