Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2648 from withspectrum/2.1.13
Browse files Browse the repository at this point in the history
2.1.13
  • Loading branch information
brianlovin authored Mar 24, 2018
2 parents 803fdd5 + b608fb3 commit ed992e8
Show file tree
Hide file tree
Showing 26 changed files with 644 additions and 970 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Spectrum aims to be the best platform to build any kind of community online by c
### Status

Spectrum has been under full-time development since March, 2017. See [the roadmap](TK) for up-to-date information about our current areas of focus.
Spectrum has been under full-time development since March, 2017. See [the roadmap](https://github.com/withspectrum/spectrum/projects/19) for up-to-date information about our current areas of focus.

<div align="center">
<img height="50px" src="public/img/cluster-1.svg" />
Expand All @@ -38,6 +38,7 @@ Spectrum has been under full-time development since March, 2017. See [the roadma
- [Code Style](#code-style)
- [First time setup](#first-time-setup)
- [Running the app locally](#running-the-app-locally)
- [Roadmap](https://github.com/withspectrum/spectrum/projects/19)
- Technical
- [Testing](docs/testing.md)
- [Background Jobs](docs/backend/background-jobs.md)
Expand All @@ -50,7 +51,7 @@ Spectrum has been under full-time development since March, 2017. See [the roadma

## Contributing

**We heartily welcome any and all contributions that match our product roadmap and engineering standards!**
**We heartily welcome any and all contributions that match [our product roadmap](https://github.com/withspectrum/spectrum/projects/19) and engineering standards!**

That being said, this codebase isn't your typical open source project because it's not a library or package with a limited scope—it's our entire product.

Expand All @@ -66,7 +67,9 @@ If you found a technical bug on Spectrum or have ideas for features we should im

#### Fixing a bug or implementing a new feature

If you find a bug on Spectrum and open a PR that fixes it we'll review it as soon as possible to ensure it matches our engineering standards. If you want implement a new feature, open an issue first to discuss what it'd look like and to ensure it fits in our roadmap and plans for the app.
If you find a bug on Spectrum and open a PR that fixes it we'll review it as soon as possible to ensure it matches our engineering standards. If you want implement a new feature, open an issue first to discuss what it'd look like and to ensure it fits in [our roadmap](https://github.com/withspectrum/spectrum/projects/19) and plans for the app.

If you want to contribute but are unsure to start, we have [a "good first issue" label](https://github.com/withspectrum/spectrum/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) which is applied to newcomer-friendly issues. Take a look at [the full list of good first issues](https://github.com/withspectrum/spectrum/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and pick something you like!

Want to fix a bug or implement an agreed-upon feature? Great, jump to the [local setup instructions](#first-time-setup)!

Expand Down
2 changes: 1 addition & 1 deletion config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = function override(config, env) {
return;
}
},
requestType: ['same-origin'],
requestType: ['navigate'],
},
],
ServiceWorker: {
Expand Down
7 changes: 6 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"baseUrl": "http://localhost:3000",
"viewportWidth": 1300
"viewportWidth": 1300,
"defaultCommandTimeout": 10000,
"blacklistHosts": ["*.google-analytics.com"],
"env": {
"DEBUG": "src*,testing*,build*"
}
}
26 changes: 26 additions & 0 deletions cypress/integration/thread_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,29 @@ describe('Thread View', () => {
});
});
});

describe('/new/thread', () => {
beforeEach(() => {
cy.auth(author.id);
cy.visit('/new/thread');
});

it('should allow composing new threads', () => {
const title = 'Some new thread';
const body = "with some fresh content you've never seen before";
cy.get('[data-e2e-id="rich-text-editor"]').should('be.visible');
cy.get('[data-e2e-id="composer-community-selector"]').should('be.visible');
cy.get('[data-e2e-id="composer-channel-selector"]').should('be.visible');
// Type title and body
cy
.get('[data-e2e-id="composer-title-input"]')
.should('be.visible')
.type(title);
// TODO: Cypress doesn't handle DraftJS very well, it only inlcudes the first character
//cy.get('[contenteditable="true"]').type(body)
cy.get('[data-e2e-id="composer-publish-button"]').click();
cy.location('pathname').should('contain', 'thread');
cy.get('[data-e2e-id="thread-view"]');
cy.contains(title);
});
});
15 changes: 2 additions & 13 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { warn, fail, message, markdown, schedule, danger } from 'danger';
import yarn from 'danger-plugin-yarn';
import jest from 'danger-plugin-jest';
import flow from 'danger-plugin-flow';
import labels from 'danger-plugin-labels';
import noTestShortcuts from 'danger-plugin-no-test-shortcuts';
import noConsole from 'danger-plugin-no-console';

Expand All @@ -26,17 +25,6 @@ if (danger.github.pr.body.length < 10) {
fail('Please add a description to your PR.');
}

// Add automatic labels to the PR
schedule(
labels({
labels: {
wip: 'WIP: Building',
'needs testing': 'WIP: Needs Testing',
'ready for review': 'WIP: Ready for Review',
},
})
);

// Make sure the yarn.lock file is updated when dependencies get added and log any added dependencies
APP_FOLDERS.forEach(folder => {
schedule(yarn(path.join(__dirname, folder, 'package.json')));
Expand All @@ -47,7 +35,8 @@ jest();

// Make sure nobody does a it.only and blocks our entire test-suite from running
noTestShortcuts({
testFilePredicate: filePath => filePath.endsWith('.test.js'),
testFilePredicate: filePath =>
filePath.endsWith('.test.js') || filePath.endsWith('_spec.js'),
});

schedule(noConsole({ whitelist: ['error'] }));
Expand Down
1 change: 0 additions & 1 deletion iris/models/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const DEFAULT_CONFIG = {
max: 500, // Maximum number of connections, default is 1000
buffer: 5, // Minimum number of connections open at any given moment, default is 50
timeoutGb: 60 * 1000, // How long should an unused connection stick around, default is an hour, this is a minute
pingInterval: 300, // Ping the connection every 5 minutes (300 seconds) to keep it alive and prevent rethinkdbdash#192
};

const PRODUCTION_CONFIG = {
Expand Down
10 changes: 9 additions & 1 deletion iris/queries/community/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ export default (
const lastUserIndex =
lastDigits && lastDigits.length > 0 && parseInt(lastDigits[1], 10);

// Note @brian: this is a shitty hack, but if we want to show both
// moderators and admins in a single list, I need to tweak the inbound
// filter here
let dbfilter = filter;
if (filter && (filter.isOwner && filter.isModerator)) {
dbfilter = row => row('isModerator').or(row('isOwner'));
}

// $FlowFixMe
return getMembersInCommunity(id, { first, after: lastUserIndex }, filter)
return getMembersInCommunity(id, { first, after: lastUserIndex }, dbfilter)
.then(users => {
const permissionsArray = users.map(userId => [userId, id]);
// $FlowIssue
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Spectrum",
"version": "2.1.12",
"version": "2.1.13",
"private": true,
"devDependencies": {
"babel-cli": "^6.24.1",
Expand Down Expand Up @@ -83,7 +83,7 @@
"draft-js-image-plugin": "2.0.0-rc8",
"draft-js-import-markdown": "^1.2.0",
"draft-js-linkify-plugin": "^2.0.0-beta1",
"draft-js-markdown-plugin": "^1.0.0",
"draft-js-markdown-plugin": "1.2.0",
"draft-js-plugins-editor": "^2.0.3",
"draft-js-prism-plugin": "0.1.1",
"draftjs-to-markdown": "^0.4.2",
Expand All @@ -109,7 +109,7 @@
"imgix-core-js": "^1.0.6",
"ioredis": "3.1.4",
"isomorphic-fetch": "^2.2.1",
"jest": "^22.1.0",
"jest": "22.4.3",
"json-stringify-pretty-compact": "^1.0.4",
"jsonwebtoken": "^8.0.1",
"keygrip": "^1.0.2",
Expand Down Expand Up @@ -179,6 +179,8 @@
"resolutions": {
"immutable": "3.7.4",
"draft-js": "npm:draft-js-fork-mxstbr",
"jest-environment-node": "22.4.3",
"jest": "22.4.3",
"fbjs": "0.8.16"
},
"scripts": {
Expand Down
Loading

0 comments on commit ed992e8

Please sign in to comment.