Compare commits

..
19 Commits
Author SHA1 Message Date
Kim Gardner 4b9f3390d3 Merge pull request #739 from coralproject/bump-version-2-2-1
Update version 2.2.1
2017-07-05 11:57:27 +01:00
Kim Gardner f94c36e9c9 Update version 2.2.1 2017-07-05 11:43:18 +01:00
Kim Gardner 4d71a5a448 Merge pull request #737 from coralproject/fix-plugin-slot-logic
Fix isSlotEmpty logic and handle empty plugin_config
2017-07-04 16:35:05 +01:00
Chi Vinh Le cfa7a74742 Fix isSlotEmpty logic and handle empty plugin_config 2017-07-04 22:22:52 +07:00
David Erwin c5203e3460 Merge pull request #734 from coralproject/dont-show-popup-when-empty
Don't show popup when empty
2017-07-03 14:40:31 -04:00
David Erwin 79c1bd9bdd Merge branch 'master' into dont-show-popup-when-empty 2017-07-03 14:35:44 -04:00
David Erwin e2575cb346 Merge pull request #733 from coralproject/disable-plugin-components-via-config
Disable plugin components via plugin_config
2017-07-03 14:28:54 -04:00
Belén Curcio 4d821afa6a Merge branch 'master' into disable-plugin-components-via-config 2017-07-03 15:08:36 -03:00
David Erwin c16278221c Merge pull request #719 from coralproject/docs-contribution-guide
Rewrite contributor's guide
2017-07-03 10:24:28 -04:00
David Erwin a50b39091f ABC Always Be Clarifying 2017-07-03 10:13:09 -04:00
David Erwin 4c7506e4f5 Merge branch 'docs-contribution-guide' of https://github.com/coralproject/talk into docs-contribution-guide 2017-07-03 10:06:56 -04:00
David Erwin 2f06281439 Move contributor's guide 2017-07-03 10:03:51 -04:00
Chi Vinh Le fd1f8b24c1 Don't show popup when empty 2017-07-03 19:40:26 +07:00
Chi Vinh Le 270c3b7634 Disable plugin components via plugin_config 2017-07-03 19:01:17 +07:00
Kim Gardner e4647cab98 Merge branch 'master' into docs-contribution-guide 2017-07-03 12:12:56 +01:00
Kim Gardner 4319bb9da3 Merge branch 'master' into docs-contribution-guide 2017-06-29 17:31:33 +01:00
Belén Curcio d55fc6b601 Merge branch 'master' into docs-contribution-guide 2017-06-28 12:08:40 -03:00
David Erwin 3695ce5cb7 Update links 2017-06-27 15:08:21 -04:00
David Erwin d68169757d Rewrite contributor's guide 2017-06-27 15:04:00 -04:00
8 changed files with 95 additions and 48 deletions
+51 -42
View File
@@ -6,16 +6,46 @@ This document is a companion to help you approach contributing. If it does not d
By contributing to this project you agree to the [Code of Conduct](https://coralproject.net/code-of-conduct.html).
## Product Roadmap
## What should I Contribute?
You can view what the Coral Team is working on next here https://www.pivotaltracker.com/n/projects/1863625.
There are at least three ways to contribute to Talk:
If you'd like to see our longer term roadmap, [get in touch.](https://coralproject.net/contact.html)
* Writing Code
* Writing Docs
* Providing Translations
## Writing Code
## Contribute to the documentation
Conversation surrounding contributions begins in [issues](https://github.com/coralproject/talk/issues).
Clear docs are a prerequisite for a successful open source project. We value non-code and code contributions equally.
### When should I Create an Issue?
File an issue as soon as you have an idea of something you'd like to contribute. We would love to hear what you're thinking and help refine the idea to make it into the Talk ecosystem.
Please file issues if:
* you would like to contribute to Talk Core.
* you are building a Plugin that the current Plugin API doesn't support.
* you are building a Plugin and want advice.
### What should I include?
Coral has adopted an iterative, agile development philosophy. All contributions that make it into the Talk repo should start with a story or this form:
`As a [type of person] I'd like to be able to [do something] so that I can [get some result].`
This exercise does two things:
* allows us to ground our technical choices in a clear, simple product need.
* expresses that product need in a way that doesn't imply a specific technical solution allowing for debate as to the best way to solve the problem.
Please feel free to provide as much detail as possible when filing the issue but please do keep the initial issue specific to one need and try to avoid including technical or design solutions.
If you have a specific technical or design solution in mind, please submit it as the first comment on the thread.
## Contributing Documentation
Clear docs are a prerequisite for a successful open source project. Contributing to the documentation is often more important than contributing to the code!
We are looking for _documentarians_ to:
@@ -23,55 +53,34 @@ We are looking for _documentarians_ to:
* create new / missing sections, and
* take the lead in making sections, or the over all structure better.
### But how?
Information about how to update docs can be found in our [FAQ](faq.html#how-do-i-contribute-to-these-docs).
* Our public docs site can be updated [here](https://github.com/coralproject/docs).
* [Let us know](https://github.com/coralproject/talk/wiki/Contact-Us) if you'd like permission to update our wiki.
* Update any of our .md docs files by following [this guide](https://github.com/coralproject/talk/wiki/Forking,-Branching-and-Merging).
* Our API docs need to be kept honest. [Update them here](https://github.com/coralproject/talk/blob/master/docs/swagger.yaml).
If you'd like to discuss a contribution, please [file an issue](https://github.com/coralproject/talk/issues) describing the changes you would like to see.
## Integrate into your environment
## Contributing Translations
First, [set up a dev environment](https://github.com/coralproject/talk/blob/master/INSTALL.md). Please let us know how this goes!
Talk's tranlations are stored in `.yml` files [here](https://github.com/coralproject/talk/tree/master/locales).
Talk is designed to integrate into existing environments in a variety of ways:
Translations can be submitted via pull request. If you do not use github, you can use 'en.yml' as a template and [email](https://coralproject.net/contact.html) the translations to us. We can import it into the repo.
* [Auth integrations](https://github.com/coralproject/talk/wiki/Security#authentication-strategies)
* [Push assets into Talk](https://github.com/coralproject/talk/blob/master/routes/api/assets/index.js)
* Monitoring Hooks (coming in 2017)
## I want to contribute but I'm not sure what to do!
If you're considering deploying Talk, [please let us know](https://github.com/coralproject/talk/wiki/Contact-Us)! We are quite literally doing this for you and want to help you succeed any way we can.
If you want to contribute but don't have a clear idea of exactly what that may be, here are some resources that may help:
If you are writing custom integration code in your fork of Talk, please consider keeping it generic and filing a Pull Request to contribute it back to the project! See our [forking and merging guidelines](https://github.com/coralproject/talk/wiki/Forking,-Branching-and-Merging) for more info.
### Product Roadmap
## Write some code
Please visit our product roadmap here: https://www.pivotaltracker.com/n/projects/1863625. If you'd like to take on any of our scheduled tasks we'd be forever grateful!
First, [set up a dev environment](https://github.com/coralproject/talk/blob/master/INSTALL.md). Please let us know how this goes!
### Discussion Forum
### Build a New Feature / Plugin
If you'd like to discuss what we're up to, please visit or [community](https://community.coralproject.net/) or [contact us](https://coralproject.net/contact.html).
Talk is beginning life as a Commenting Platform, but is architected to support many varieties of community engagement.
### Integrations
Please [contact us](https://github.com/coralproject/talk/wiki/Contact-Us) early and often if you'd like to help. We would love to hear your ideas for features and plugins and help you find a way to productively engage the project.
Have a favorite analytics engine? Data science service? CMS? Auth platform? Deployment platform or pipeline? Pet project? Consider building a plugin to integrate them!
To get an idea of where the Coral Team is going, see:
### Favorite Features?
* our [Slack channel](https://coralprojectslackin.herokuapp.com/), where you can talk directly with the Team and other community members,
* our [current stories](https://www.pivotaltracker.com/n/projects/1863625), and
* our [issues](https://github.com/coralproject/talk/issues).
Do you have a favorite feature of an existing platform that's not yet been done in Talk? Sounds like Talk needs that feature.
Examples:
* [Add An Emoji Button to Comments](https://github.com/coralproject/talk/wiki/Add-An-Emoji-Button-to-Comments)
### Work on the Core
There is always more work to be done to make an application more stable, scaleable and secure.
If you see issues in the code or have ideas on how we may improve Talk, please consider:
* [contributing a fix](https://github.com/coralproject/talk/wiki/Forking,-Branching-and-Merging),
* [filing an issue](https://github.com/coralproject/talk/issues), or
* or otherwise [letting us know](https://github.com/coralproject/talk/wiki/Contact-Us).
## Thanks!
+4
View File
@@ -7,8 +7,12 @@ import pym from '../services/PymConnection';
import {resetWebsocket} from 'coral-framework/services/client';
import t from 'coral-framework/services/i18n';
import {isSlotEmpty} from 'plugin-api/beta/client/services';
export const showSignInDialog = () => (dispatch, getState) => {
if (isSlotEmpty('login')) {
return;
}
const signInPopUp = window.open(
'/embed/stream/login',
'Login',
+19 -5
View File
@@ -7,17 +7,31 @@ import flatten from 'lodash/flatten';
import flattenDeep from 'lodash/flattenDeep';
import {getDefinitionName, mergeDocuments} from 'coral-framework/utils';
import {loadTranslations} from 'coral-framework/services/i18n';
import {injectReducers} from 'coral-framework/services/store';
import {injectReducers, getStore} from 'coral-framework/services/store';
import camelize from './camelize';
function getSlotComponents(slot) {
const pluginConfig = getStore().getState().config.plugin_config;
// Filter out components that have been disabled in `plugin_config`
return flatten(plugins
// Filter out components that have been disabled in `plugin_config`
.filter((o) => !pluginConfig || !pluginConfig[o.plugin] || !pluginConfig[o.plugin].disable_components)
.filter((o) => o.module.slots[slot])
.map((o) => o.module.slots[slot]));
}
export function isSlotEmpty(slot) {
return getSlotComponents(slot).length === 0;
}
/**
* Returns React Elements for given slot.
*/
export function getSlotElements(slot, props = {}) {
const components = flatten(plugins
.filter((o) => o.module.slots[slot])
.map((o) => o.module.slots[slot]));
return components
return getSlotComponents(slot)
.map((component, i) => React.createElement(component, {key: i, ...props}));
}
+3
View File
@@ -11,6 +11,9 @@ entries:
- title: About
url: /index.html
output: web
- title: Contribute
url: /contribute.html
output: web
- title: FAQ
url: /faq.html
output: web
+9
View File
@@ -0,0 +1,9 @@
---
title: Contributor's Guide
keywords: homepage
sidebar: talk_sidebar
permalink: contribute.html
summary:
---
Our Contributor's Guide can be found [here](https://github.com/coralproject/talk/blob/master/CONTRIBUTING.md).
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "talk",
"version": "2.2.0",
"version": "2.2.1",
"description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net",
"main": "app.js",
"scripts": {
+1
View File
@@ -1,2 +1,3 @@
export {t} from 'coral-framework/services/i18n';
export {can} from 'coral-framework/services/perms';
export {isSlotEmpty} from 'coral-framework/helpers/plugins';
+7
View File
@@ -31,6 +31,13 @@
asset_id: '<%= asset_id ? asset_id : '' %>',
auth_token: '',
plugin_config: {
/**
* You can disable rendering slot components of a plugin by doing:
*
* 'coral-plugin-love': {
* disable_components: true,
* },
*/
test: 'data',
debug: false
}