跳转到主要内容
本章内容32
-
01
Ember components
In the previous tutorial I showed how to configure both the server and the client side parts of Discourse t...
1 周前
-
02
UI kit
ui-kit is the layer of reusable, domain-free building blocks that core, plugins, and themes compose their i...
1 周前
-
03
Lint and format
Discourse uses lefthook for git hooks, and
bin/lint as the main CLI entry point for running the same check...
1 周前
-
04
Run test suites
Discourse has extensive frontend tests for core, plugins and themes. Once you have a functioning local deve...
1 周前
-
05
Version compatibility
📖 Background
Theme and plugin developers generally want to target the
latest release of Discourse, without...
1 周前
-
06
Ember object ownership
:warning: Importing getOwner from
discourse-common/lib/get-owner is deprecated.
To access e.g. services th...
1 周前
-
07
JS performance
When working on client-side work in Discourse core/plugins/themes, it's important to consider the performan...
1 周前
-
08
CI with GitHub Actions
:mag: Overview
To build a robust extension for Discourse, it can be wise to include Continuous Integration ...
1 周前
-
09
Markdown extensions
Discourse uses a Markdown engine called Markdown-it.
Here are some dev notes that will help you either fix ...
1 周前
-
10
Converting modals
:information_source: If you're implementing a new Modal, check out the main docs here. This topic describes...
1 周前
-
11
DModal API
Discourse 3.1.0.beta6 ships with a brand new
<DModal> component-based API.
DModal is part of the UI kit a...
1 周前
-
12
JS API
Discourse's JavaScript API allows themes and plugins to make extensive customizations to the user experienc...
1 周前
-
13
Plugin outlet connectors
Discourse includes hundreds of Plugin Outlets which can be used to inject new content or replace existing c...
1 周前
-
14
modifyClass
For advanced themes and plugins, Discourse offers the
modifyClass system. This allows you to extend and ov...
1 周前
-
15
Creating routes
Over time Discourse has grown in complexity and it can be daunting for beginners to understand how data get...
1 周前
-
16
Authentication method
Continuing from https://meta.discourse.org/t/future-social-authentication-improvements/94691...
We are now ...
1 周前
-
17
Accidental serialization of ActiveRecord models
We've introduced a patch to prevent the accidental serialization of ActiveRecord models without specifying ...
1 周前
-
18
Overriding templates
Ideally, when customizing Discourse via themes/plugins, you should use CSS, the JavaScript Plugin API, or p...
1 周前
-
19
Service objects
Overview
A service is a small object that encompasses business logic for a given action.
From outside, it s...
1 周前
-
20
System specs
Background
Rails system specs are used to simulate the actions of a real user using the app in a browser. W...
1 周前
-
21
FormKit
Basic Usage
FormKit exposes a single component as its public API:
<Form />. All other elements are yielded...
1 周前
-
22
AppEvents Triggers
AppEvents
The AppEvent system in Discourse provides a pub/sub mechanism for handling UI updates and compone...
1 周前
-
23
Transformers
Discourse core includes a number of "transformer" hooks which can be used to customize client behavior. The...
1 周前
-
24
Topic List Customization
The topic-list is one of the most-used and most-customized user-interfaces in Discourse. There are many dif...
1 周前
-
25
CSS guidelines
Background
When writing CSS classes for Discourse components, themes, or plugins, we follow a modified vari...
1 周前
-
26
JS type hinting & validation
Discourse ships type information for its JavaScript code. This can provide inline documentation, autocomple...
1 周前
-
27
Designing for Devices
This document outlines the APIs used to adapt Discourse's user interface for different devices.
Touch & Hov...
1 周前
-
28
Designing for Responsive Widths
This document outlines the APIs used to adapt Discourse's user interface to different widths — both the bro...
1 周前
-
29
Gesture primitives
ui-kit ships the input-driven gesture primitives: dragging a payload onto a
target, resizing a region, and ...
1 周前
-
30
Bundle splitting
By default, every javascript module in a plugin is loaded when Discourse boots. This guide describes the
s...
1 周前
-
31
Private modules
What
-internals means
A folder named
-internals holds code that is not public API. It may be renamed, res...
1 周前
-
32
Acceptance tests
Automated tests are a great way to protect your code against future regressions. Many people are familiar w...
1 周前