Giter Club home page Giter Club logo

mattermost-plugin-gender-inclusive-language's Introduction

Mattermost Gender Inclusive Language Plugin Logo
Mattermost Gender Inclusive Language Plugin

The gender-inclusive-language is a Mattermost Plugin which actively listens (and prohibits) for language with racist, ableist, sexist, or other exclusionary histories.

The list of gender-inclusive language ideas we used in our project was built by United Nations affiliates, government agencies, multinational organizations and others with the aim of creating work environments that embrace equality. You can see the full list by following this link.


๐Ÿ’ก We welcome constructive feedback


Demo Plugin


Installation

  1. Go to the releases page of this GitHub repository and download the latest release for your Mattermost server.
  2. Upload this file in the Mattermost System Console > Plugins > Management page to install the plugin, and enable it. To learn more about how to upload a plugin, see the documentation.
  3. Start using your plugin and have fun.

mattermost-plugin-gender-inclusive-language's People

Contributors

ftonato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kuuchuu offsoc

mattermost-plugin-gender-inclusive-language's Issues

[FEAT] Ability to modify the suggestions

Feature Suggestion: The ability to modify the plugin's keywords/suggestions on Mattermost's Plugin config page.

Some users may not want it as strict, might want to change the suggested word for a keyword, or may want to add on to the list. Being able to do so directly in Mattermost's System Console would definitely be a plus.

Regex removing all special characters

Description

There is probably an error in the regular expression, it must also be removing the "minus" symbols from our strings.

Context

We have some words in our forbidden list that use minus symbols as: ad-man and white-list. Our app is removing all special characters including the minus symbols, however we should keep this symbol.

// https://github.com/ftonato/mattermost-plugin-gender-inclusive-language/blob/main/src/utils.jsx#L26

static getWords(post) {
  const regex = /[^a-z0-9]/gi;
  const words = post.split(regex);
  return words.filter(word => word.toLowerCase()).filter(word => word.length > 0);
}

Acceptance Criteria

[ ] Update the regular expression to keep the minus symbols;
[ ] Update the method to filter for word.length > 1 instead of word.length > 0;
[ ] Update the suggestion list with same words without the symbols, like: adman (ad-man) and whitelist (white-list);
[ ] Ideally, create the unit tests for the Utils.

[BUG] Mattermost crash on keyword match

Mattermost v9.7.3 crashes when a matching keyword is typed.

TypeError: n.trim is not a function

dev console output:

index.js:150 Loading plugin com.mattermost.gender-inclusive-language, version 1.0.0
com.mattermost.gender-inclusive-language_18464c39fdec57c2_bundle.js:1 com.mattermost.gender-inclusive-language::uninitialize()
index.js:136 Loaded plugin com.mattermost.gender-inclusive-language, version 1.0.0
websocket.js:284 websocket closed
websocket_actions.jsx:141 Initializing or re-initializing WebSocket
websocket.js:74 websocket connecting to wss://chat.****.io/api/v4/websocket
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311274.40] First component subscribing to team f1zzutcwof8gprqxiinsg4nzte
/api/v4/cloud/products/selfhosted:1 
        
        
       Failed to load resource: the server responded with a status of 400 ()
/api/v4/trial-license/prev:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311274.60] WSClient in plugin mode, reusing Mattermost WS connection
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311274.60] Sending commands for the registered subscriptions
websocket.js:284 websocket closed
advanced_create_post.tsx:777 TypeError: n.trim is not a function
    at Y (message_submit_error.tsx:46:31)
    at ao (react-dom.production.min.js:157:137)
    at $u (react-dom.production.min.js:267:460)
    at Ni (react-dom.production.min.js:250:347)
    at _i (react-dom.production.min.js:250:278)
    at Ci (react-dom.production.min.js:250:138)
    at vi (react-dom.production.min.js:243:163)
    at react-dom.production.min.js:123:115
    at n.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Hl (react-dom.production.min.js:122:325)
iu @ react-dom.production.min.js:216
t.callback @ react-dom.production.min.js:216
pa @ react-dom.production.min.js:131
mu @ react-dom.production.min.js:220
Li @ react-dom.production.min.js:259
n.unstable_runWithPriority @ scheduler.production.min.js:18
Hl @ react-dom.production.min.js:122
zi @ react-dom.production.min.js:252
vi @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
n.unstable_runWithPriority @ scheduler.production.min.js:18
Hl @ react-dom.production.min.js:122
Kl @ react-dom.production.min.js:123
ql @ react-dom.production.min.js:122
di @ react-dom.production.min.js:237
enqueueSetState @ react-dom.production.min.js:133
v.setState @ react.production.min.js:12
(anonymous) @ advanced_create_post.tsx:777
await in (anonymous) (async)
(anonymous) @ advanced_create_post.tsx:550
(anonymous) @ advanced_create_post.tsx:735
(anonymous) @ advanced_create_post.tsx:856
Be @ react-dom.production.min.js:52
Ke @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
Pr @ react-dom.production.min.js:100
Nr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
De @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Rr @ react-dom.production.min.js:105
Jn @ react-dom.production.min.js:75
Zn @ react-dom.production.min.js:74
n.unstable_runWithPriority @ scheduler.production.min.js:18
Hl @ react-dom.production.min.js:122
Me @ react-dom.production.min.js:292
Xn @ react-dom.production.min.js:73
Show 32 more frames
Show less
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311342.14] Last subscription to team f1zzutcwof8gprqxiinsg4nzte being removed
websocket.js:74 websocket connecting to wss://chat.****.io/api/v4/websocket
advanced_create_post.tsx:735 Uncaught (in promise) TypeError: n.trim is not a function
    at Y (message_submit_error.tsx:46:31)
    at ao (react-dom.production.min.js:157:137)
    at $u (react-dom.production.min.js:267:460)
    at Ni (react-dom.production.min.js:250:347)
    at _i (react-dom.production.min.js:250:278)
    at Ci (react-dom.production.min.js:250:138)
    at vi (react-dom.production.min.js:243:163)
    at react-dom.production.min.js:123:115
    at n.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Hl (react-dom.production.min.js:122:325)
Y @ message_submit_error.tsx:46
ao @ react-dom.production.min.js:157
$u @ react-dom.production.min.js:267
Ni @ react-dom.production.min.js:250
_i @ react-dom.production.min.js:250
Ci @ react-dom.production.min.js:250
vi @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
n.unstable_runWithPriority @ scheduler.production.min.js:18
Hl @ react-dom.production.min.js:122
Kl @ react-dom.production.min.js:123
ql @ react-dom.production.min.js:122
di @ react-dom.production.min.js:237
enqueueSetState @ react-dom.production.min.js:133
v.setState @ react.production.min.js:12
(anonymous) @ advanced_create_post.tsx:777
await in (anonymous) (async)
(anonymous) @ advanced_create_post.tsx:856
Be @ react-dom.production.min.js:52
Ke @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
Pr @ react-dom.production.min.js:100
Nr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
De @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Rr @ react-dom.production.min.js:105
Jn @ react-dom.production.min.js:75
Zn @ react-dom.production.min.js:74
n.unstable_runWithPriority @ scheduler.production.min.js:18
Hl @ react-dom.production.min.js:122
Me @ react-dom.production.min.js:292
Xn @ react-dom.production.min.js:73
Show 29 more frames
Show less
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311342.28] WSClient in plugin mode, reusing Mattermost WS connection
focalboard_eee5d5f8717cf38e_bundle.js:2 [1715311342.28] Sending commands for the registered subscriptions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.