2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00
A platform for community discussion. Free, open, simple. https://www.discourse.org
Find a file
David Battersby 16f555b477
DEV: simplify composer mentions plugin code (#33174)
We recently added validation for mentions in rich text editor mode of
composer in #32879.

In an effort to eliminate potential edge cases for non-text nodes, I
have restored the input rules and simplified the approach used in the
plugin code.

This change means that Instead of finding and inserting mention nodes
within text while the user is typing, we let the input rules handle the
mention node creation part. This allows the plugin code to focus
entirely on validating nodes within the document.

As part of this change we introduced a new data attribute ("data-valid")
which will assume by default that mentions are valid and therefore be
"true", but will proceed to invalidate them by changing to false for
mentions that were not found. It also means that invalid mentions are
retained as mention nodes, whereas previously we would convert them to
text.
2025-06-16 11:58:12 +04:00
.devcontainer
.github DEV: Add SKIP_DB_AND_REDIS bootability check to CI (#33158) 2025-06-11 16:25:24 +01:00
.vscode
app DEV: simplify composer mentions plugin code (#33174) 2025-06-16 11:58:12 +04:00
bin
config DEV: Add setting to tag s3 objects enabling tag based access control policies (#32988) 2025-06-16 13:26:18 +08:00
db FEATURE: Add description to invites (#33207) 2025-06-16 11:31:07 +08:00
docs
images
lib DEV: Add setting to tag s3 objects enabling tag based access control policies (#32988) 2025-06-16 13:26:18 +08:00
log
migrations FIX: Stop silently dropping first two rows during load_mapping (#33076) 2025-06-09 23:26:59 +02:00
patches
plugins FIX: Chat video thumbnails in Safari (#33199) 2025-06-13 13:04:35 -06:00
public
script DEV: Import user title in generic_bulk 2025-06-15 15:56:36 +02:00
spec DEV: simplify composer mentions plugin code (#33174) 2025-06-16 11:58:12 +04:00
test
themes/foundation Revert "FIX: import Horizon system theme" (#33196) 2025-06-13 14:32:45 +01:00
vendor
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.ignore
.jsdoc
.licensed.yml
.licensee.json
.npmrc
.pnpmfile.cjs DEV: Improve pnpmfile workspace workaround (#29881) 2024-11-21 22:36:55 +00:00
.prettierignore
.prettierrc.cjs
.rspec
.rspec_parallel DEV: Introduce parallel rspec testing 2019-04-01 11:06:47 -04:00
.rubocop.yml
.ruby-gemset.sample
.streerc
.template-lintrc.cjs
Brewfile
CODEOWNERS
config.ru
CONTRIBUTING.md
COPYRIGHT.md
d
discourse.sublime-project
eslint.config.mjs
Gemfile
Gemfile.lock Build(deps-dev): Bump mime-types-data from 3.2025.0603 to 3.2025.0610 (#33189) 2025-06-13 14:16:36 +02:00
jsconfig.json
lefthook.yml
LICENSE.txt
package.json Build(deps-dev): Bump puppeteer-core from 24.10.0 to 24.10.1 (#33192) 2025-06-13 14:15:40 +02:00
pnpm-lock.yaml Build(deps-dev): Bump puppeteer-core from 24.10.0 to 24.10.1 (#33192) 2025-06-13 14:15:40 +02:00
pnpm-workspace.yaml
Rakefile
README.md
stylelint.config.mjs
translator.yml

The online home for your community.

readme

You can self-host Discourse on your own infrastructure. But if you'd rather skip the setup, maintenance, and server management, we offer official Discourse hosting.

👉 Learn more about Discourse hosting

Discourse is a 100% open-source community platform for those who want complete control over how and where their site is run.

Our platform has been battle-tested for over a decade and continues to evolve to meet users needs for a powerful community platform.

With Discourse, you can:

  • 💬 Create discussion topics to foster meaningful conversations.

  • Connect in real-time with built-in chat.

  • 🎨 Customize your experience with an ever-growing selection of official and community themes.

  • 🤖 Enhance your community with plugins, from chatbots powered by Discourse AI to advanced tools like SQL analysis with the Data Explorer plugin.

To learn more, visit discourse.org and join our support community at meta.discourse.org.

Here are just a few of the incredible communities using Discourse:

discourse-communities

👉 Discover more communities using Discourse

Development

To get your environment set up, follow one of the setup guides:

Before you get started, ensure you have the following minimum versions: Ruby 3.3+, PostgreSQL 13, Redis 7.

For more information, check out the Developer Documentation.

Setting up Discourse

If you want to set up a Discourse forum for production use, see our Discourse Install Guide.

If you're looking for official hosting, see discourse.org/pricing.

Requirements

Discourse supports the latest, stable releases of all major browsers and platforms:

Browsers Tablets Phones
Apple Safari iPadOS iOS
Google Chrome Android Android
Microsoft Edge
Mozilla Firefox

Additionally, we aim to support Safari on iOS 15.7+.

Built With

  • Ruby on Rails — Our back end API is a Rails app. It responds to requests RESTfully in JSON.
  • Ember.js — Our front end is an Ember.js app that communicates with the Rails API.
  • PostgreSQL — Our main data store is in Postgres.
  • Redis — We use Redis as a cache and for transient data.
  • BrowserStack — We use BrowserStack to test on real devices and browsers.

Plus lots of Ruby Gems, a complete list of which is at /main/Gemfile.

Contributing

Build Status

Discourse is 100% free and open source. We encourage and support an active, healthy community that accepts contributions from the public including you!

Before contributing to Discourse:

  1. Please read the complete mission statements on discourse.org. Yes we actually believe this stuff; you should too.
  2. Read and sign the Electronic Discourse Forums Contribution License Agreement.
  3. Dig into CONTRIBUTING.MD, which covers submitting bugs, requesting new features, preparing your code for a pull request, etc.
  4. Always strive to collaborate with mutual respect.
  5. Not sure what to work on? We've got some ideas.

We look forward to seeing your pull requests!

Security

We take security very seriously at Discourse; all our code is 100% open source and peer reviewed. Please read our security guide for an overview of security measures in Discourse, or if you wish to report a security issue.

Security fixes are listed in the release notes for each version.

The Discourse Team

The original Discourse code contributors can be found in AUTHORS.MD. For a complete list of the many individuals that contributed to the design and implementation of Discourse, please refer to the official Discourse blog and GitHub's list of contributors.

Copyright 2014 - 2025 Civilized Discourse Construction Kit, Inc.

Licensed under the GNU General Public License Version 2.0 (or later); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Discourse logo and “Discourse Forum” ®, Civilized Discourse Construction Kit, Inc.

Accessibility

To guide our ongoing effort to build accessible software we follow the W3Cs Web Content Accessibility Guidelines (WCAG). If you'd like to report an accessibility issue that makes it difficult for you to use Discourse, email accessibility@discourse.org. For more information visit discourse.org/accessibility.

Dedication

Discourse is built with love, Internet style.

For over a decade, our amazing community has helped shape Discourse into what it is today. Your support, feedback, and contributions have been invaluable in making Discourse a powerful and versatile platform.

Were deeply grateful for every feature request, bug report, and discussion that has driven Discourse forward. Thank you for being a part of this journey—we couldnt have done it without you!