captainfact / captain-fact-frontend Goto Github PK
View Code? Open in Web Editor NEW🔎 CaptainFact - Frontend. The one you see on https://captainfact.io
License: GNU Affero General Public License v3.0
🔎 CaptainFact - Frontend. The one you see on https://captainfact.io
License: GNU Affero General Public License v3.0
Frédéric found a case where a user with a French browser / machine had the interface put in English by default. We need to investigate, reproduce and fix if this is the case.
Automatic language detection is done in https://github.com/CaptainFact/captain-fact-frontend/blob/master/app/i18n/browser_locale.js
Hi,
I'm facing the same error again "Server connection failed, try refreshing the page". After many refreshing sometime it works, sometine not.
So today I checked the console:
Then the websocket connection seems to fail: "Firefox can not connect to the server at wss: //api.captainfact.io/socket/websocket?token=undefined&vs=2.0.0."
I'm using Ghostery, Ublock, Vimvixen :)
PS: Nice job for the site 😀
Comments with a certain number of flags get reported and are no more returned from the API. Modifications, such as editing a statement or adding a speaker can also be flagged.
To ensure a collective moderation we should create a moderation platform reserved to users with a huge reputation.
For each reported comments, moderators have 3 choices:
We need at least 3 moderators to vote before taking a decision. Then we generate a score:
score = (nb_confirm - nb_abuse) / total_feedbacks
score <= -0.66
=> Abusive flagscore >= 0.66
=> Confirm flagWe update reputations depending on this score. But to be fair and not penalize users when decisions are complicated,
we first determine the strength of the moderators consensus with:
consensur_strength = (abs_score - min_val) * (1 / (1 - min_val))
Moderation platform should take two shapes:
For each action, moderator should be presented a box like this one (extended version here):
This is pretty much what we show on the history page without the Approve / Flag buttons on actions.
app/constants.js
=> Some action types and entities are defined here.export const ENTITY_COMMENT = 4
assets/assets/locales/en/history.json
=> Actions / Entities translations indexed by their numeric identifier. Again comment type is 4 - you can add it there.Methods presented in details deal with actions. We're always posting feedback on an action (ex: "create comment") and not on the entity directly (comment). An action looks like that:
{
"user": {
"id": 2126,
...
},
"id": 1972,
"type": 1, // Action type (create, remove, update...etc)
"entity": 4, // Entity (comment, statement, video...etc)
"entity_id": 538,
"time": "2017-11-12T04:26:12.573219",
"changes": {
// Changes made with this action
"text": "I like to move it"
}
}
[
{
"user": {
"username": "User-G4R8umEp45",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.569109",
"picture_url": null,
"name": "Nella",
"mini_picture_url": null,
"id": 2126,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.573219",
"id": 1972,
"entity_id": 538,
"entity": 4,
"changes": {
"text": "I like to move it"
}
},
{
"user": {
"username": "User-546rUsidyO",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.574333",
"picture_url": null,
"name": "Junior",
"mini_picture_url": null,
"id": 2128,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.575786",
"id": 1973,
"entity_id": 539,
"entity": 4,
"changes": {
"text": "I like to move it"
}
},
{
"user": {
"username": "User-VwiSbNEwv-",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.576610",
"picture_url": null,
"name": "Patricia",
"mini_picture_url": null,
"id": 2130,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.578125",
"id": 1974,
"entity_id": 540,
"entity": 4,
"changes": {
"text": "I like to move it"
}
},
{
"user": {
"username": "User-GcfGMKNkx7",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.579005",
"picture_url": null,
"name": "Abigail",
"mini_picture_url": null,
"id": 2132,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.580488",
"id": 1975,
"entity_id": 541,
"entity": 4,
"changes": {
"text": "I like to move it"
}
},
{
"user": {
"username": "User-JxQBL38e_W",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.581350",
"picture_url": null,
"name": "Mason",
"mini_picture_url": null,
"id": 2134,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.583214",
"id": 1976,
"entity_id": 542,
"entity": 4,
"changes": {
"text": "I like to move it"
}
}
]
count
=> number of actions to return (default: 5)[
{
"user": {
"username": "User-IVrwM7LAhj",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.519572",
"picture_url": null,
"name": "Florencio",
"mini_picture_url": null,
"id": 2114,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.521282",
"id": 1961,
"entity_id": 535,
"entity": 4,
"changes": {
"text": "Jouje is the best jouje"
}
},
{
"user": {
"username": "User-fyflKOAHFL",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.515274",
"picture_url": null,
"name": "Rosalyn",
"mini_picture_url": null,
"id": 2112,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.517785",
"id": 1960,
"entity_id": 534,
"entity": 4,
"changes": {
"text": "I like to move it...."
}
},
{
"user": {
"username": "User-MnHUvqvy01",
"reputation": 0,
"registered_at": "2017-11-12T04:26:12.523268",
"picture_url": null,
"name": "Ora",
"mini_picture_url": null,
"id": 2116,
"achievements": [
1
]
},
"type": 1,
"time": "2017-11-12T04:26:12.524697",
"id": 1962,
"entity_id": 536,
"entity": 4,
"changes": {
"text": "No problemo, he said"
}
}
]
{
"value": 1,
"action_id": 1969
}
Stackoverflow blog posts about collective moderation:
When clicking on "add statement" then scrolling down, some stuff can be confusing: autoscroll is disabled, and user may not understand why. He may not be able to remember he had the form open in the first place.
We can improve this experience by making the bubble menu grey and showing a close icon if statement form is currently active:
Clicking on this cross would close the statement.
Damien Le Boulaire reported that autoscroll doesn't work with freshly added statements.
To Reproduce
Steps to reproduce the behavior:
System
We sometimes would like for people to check a statement for us (no time, no experience in the subject...)
Like Stackoverflow with issues, users with high reputation could offer some of this reputation as a bounty on a statement for it to be verified. They then decide of the best response(s?) and user(s?) get a reputation bounty
Discussion is open, ideas and coders are welcome 😙
Recent webpack migration broke sass styles hot reload, which means page must be refreshed to see a change in styles when developing.
4.6.5
to 4.7.0
.This version is covered by your current version range and after updating it in your project the build failed.
react-hot-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 23 commits.
7089062
chore(release): 4.7.0
4b36cc8
safe cleanup after hot render
5e6cc4b
Merge pull request #1170 from gaearon/fixes-february
e23eea8
fix gramma
02d1725
React 15 tests
4e971b5
feat: activate pureRender by default
f52d59c
stable
b6c1d9b
(non pure render) Throw if render method does not exists, fixes #1177
3d021ca
stabilize error boundaries
f6472dc
stabilize for the pureRender option
b7e8f5e
feat: implement flexible hot injections
9967fde
feat: make errors retryable to mitigate hooks update
e2c34f8
update styled example
3ef584c
fix tests
76a2776
reword hook injection
There are 23 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
4.3.4
to 4.3.5
.This version is covered by your current version range and after updating it in your project the build failed.
browserslist is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
3.3.4
to 3.3.5
.This version is covered by your current version range and after updating it in your project the build failed.
enzyme-to-json is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
2.1.3
to 2.2.0
.This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-cypress is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 7 commits.
e5f0504
feat: Add 'assertion-before-screenshot' rule
0b1b4b6
Rule meta data - recommended off
97d75ff
Final fixes and test fixes
c8d3d73
Fixes and refinements
a02e4ce
Add new rule - assertion before screenshot
8c561bb
remove json comment
7bc063d
update readme regarding compatibility of rules
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Comment text formatter, which ensure we don't put more than one empty line or that we don't put too much consecutives spaces is breaking caret position when trying to insert a consecutive space at the middle. This also appends when trying to insert multiple empty lines.
Caret should always stay at its position, even if this means allowing multiple consecutive spaces
Chromium 62.0.3202.62 (Official Build) on Linux (Ubuntu 16.04)
1.3.0
to 1.3.1
.This version is covered by your current version range and after updating it in your project the build failed.
reactjs-popup is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
We must ensure that no library is loading its own React 15 when migrating. Also, there's a chance that some of them will generate warnings; task may include fixing other open source projects.
More info here: https://reactjs.org/blog/2017/09/26/react-v16.0.html
We need to think of a way to detect if extension is installed from https://captainfact.io.
A way to achieve that could be to inject a special variable in global scope like redux devtools extension is doing. We could check for that special variable after authenticating user and send a request if the achievement is missing from user.achievements
. This involve modifications on extension.
API endpoint doesn't yet exists but will most probably be:
PUT /users/me/achievements/bulletproof
Move position and sound volume value is set to maximum
Should move position without changing sound volume level
1.3.4
to 1.4.0
.This version is covered by your current version range and after updating it in your project the build failed.
phoenix is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 1900 commits ahead by 1900, behind by 47.
03243c6
Release 1.4.0
8720941
Update compiled assets
ddb9f7d
Document Phoenix.Presence callbacks (#3132)
3b6bc38
Allow channels to immediately reconnect when the socket does (#3141)
d747637
Document Phoenix.Channel callbacks (#3130)
bf1872b
Remove extra newline in generated context test cases (#3129)
9cf6944
Do not assume project in current directory (#3131)
937a061
Avoid .formatter.exs files with conflicting inputs (#3135)
f6e541a
Phoenix.ConnTest.redirected_to/2 returns a string, not %Plug.Conn{} (#3138)
e2f2018
Cowboy 2 does not accept error return in init, closes #3140
4ce6c55
Remove -rc from Ecto deps
46565f0
Maintain private socket state from transport connect
7a9c3a3
Reduces ecto setup instructions (#3137)
4b6d81f
Allow custom keyword pairs to be passed to the socket macro. Closes #3136
ef13823
Improve error message for configured JSON library
There are 250 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
dependency
react was updated from 16.6.1
to 16.6.2
.dependency
react-dom was updated from 16.6.1
to 16.6.2
.This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the react group definition.
react is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
devDependency
enzyme was updated from 3.8.0
to 3.9.0
.devDependency
enzyme-adapter-react-16 was updated from 1.9.0
to 1.9.1
.This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the enzyme group definition.
enzyme is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Noticed by Basile
This issue is really close to what we had with #1
It is most probably introduced by FlipMove whose CSS transitions don't play well with fullscreen. There's no easy fix right now and we can only hope Google will do something on their side.
Comments fullscreen has been disabled for now but is still triggered when double-clicking on video.
Signaled by DocFred
Describe the bug
When clicking on time-changing links like the carets on statements or the time links video is paused which is pretty annoying when trying to find the right position for a statement.
This may be a regression from YouTube player as we haven't touched this code for some time.
To Reproduce
Steps to reproduce the behavior:
Add statement
System:
Tested on Chrome / Firefox.
1.3.1
to 1.3.2
.This version is covered by your current version range and after updating it in your project the build failed.
reactjs-popup is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
This will be useful when playing a video on CaptainFact in background while navigating to another tabs.
Possible sounds:
Bug signaled by Timothée Roland (@Presytimi) on the website regarding the scroll bar when over the video module
React-select v2 has a cleaner API and lot of improvements. See https://react-select.com/upgrade-guide
As of today we use it in two components:
In SpeakersSelect.jsx
Should be straightforward as it just displays a list of speakers names with their pictures.
In AddSpeakerForm.jsx
Will be a little more trickier as it supports autocompletion, but new API should really improve the code here.
Bug submitted by Piouscott:
1- Cliquer sur le bouton "+" en bas de page.
2- Dans l'encadré du commentaire, cliquer sur le bouton "Annuler"
Observé:
Le clique sur le bouton "annuler" génère le message d'erreur "Doit faire au moins 10 caractères", et l'encadré n'est pas supprimé. C'est seulement au deuxième clique que l'encardé disparaît
Attendu:
Le clique sur "annuler" devrait avoir le même effet que le clique sur le bouton "X" en bas de page.
View details in Rollbar: https://rollbar.com/captainfact/CaptainFact-Frontend/items/11/
ReferenceError: Can't find variable: Audio
File "https://captainfact.io/app.3fb7c9e1b873908ace53.js", line 1, in [anonymous]
10.8.0
to 10.9.0
.This version is covered by your current version range and after updating it in your project the build failed.
validator is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
See the changelog.
The new version differs by 20 commits.
ef5f7a1
10.9.0
2ea9186
chore: update changelog and min version
4d409bd
feat(isMobilePhone): add en-GH locale (Ghana) (#928)
209a801
feat(isMobilePhone): add en-MU locale (Mauritian) (#925)
c12af3c
fix: sync changelog and min version
d557d44
fix(isMobilePhone): Indonesian locale update (#916)
8445383
fix: sync changelog and min version
cec8841
fix(isMobilePhone): fix bn-BD locale prefixes (#913)
0031015
chore: rebuild with babel 7
425320c
chore: upgrade to babel 7 (#915)
dad8961
fix: extra validation for dates (#910)
509324f
chore: update changelog and min version
3a2d661
fix: transpile isJWT changes (#906)
439c51f
feat(isJWT): signature is not required (#906)
8c4a74c
feat(isURL): add option to reject email-like URLs (#901)
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
We should display thumbnails / players on sources when available.
Should use the existing ReactPlayer component to embed sources from the following providers:
Data should never be preloaded, especially if implementing direct file embedding (see ReactPlayer documentation for this part).
Object doesn't support property or method 'includes'
The next page nav button is disabled whereas I am on the videos first page and there are obviously more videos to show.
Other users don't have the problem and I don't have neither when I am in private browsing.
To Reproduce
Steps to reproduce the behavior:
System:
Regarding the fact that CaptainFact/captain-fact-api#9 is now implemented, we can easily change the frontend to be able to login with username. There's no change in API, the field email
now accept a username to be passed as well.
reproduced many times.
The main issue : The text is deleted when a user press '<' on speaker name field.
When trying to compile with brunch 2.10.12, the following error pops out:
09:10:54 - info: compiling
09:10:58 - info: compiling.
/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-map-generator.js:289
throw new Error('Invalid mapping: ' + JSON.stringify({
^
Error: Invalid mapping: {"generated":{"line":574,"column":10},"source":"node_modules/bulma/sass/utilities/controls.sass","original":{"line":26,"column":-1},"name":null}
at SourceMapGenerator_validateMapping [as _validateMapping] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-map-generator.js:289:13)
at SourceMapGenerator_addMapping [as addMapping] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-map-generator.js:101:12)
at /root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-node.js:351:13
at SourceNode_walk [as walk] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-node.js:230:9)
at SourceNode_walk [as walk] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-node.js:226:13)
at SourceNode_walk [as walk] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-node.js:226:13)
at SourceNode_toStringWithSourceMap [as toStringWithSourceMap] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/node_modules/source-map/lib/source-node.js:342:8)
at concat (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/fs_utils/generate.js:125:15)
at generate (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/fs_utils/generate.js:181:14)
at Promise.all.changed.map.file (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/fs_utils/write.js:166:12)
at Array.map (native)
at write (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/fs_utils/write.js:165:30)
at BrunchWatcher.compile (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/watch.js:293:5)
at FileList.fileList.on (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/watch.js:154:14)
at emitNone (events.js:86:13)
at FileList.emit (events.js:185:7)
at Timeout.timer.setTimeout [as _onTimeout] (/root/.nvm/versions/node/v6.12.3/lib/node_modules/brunch/lib/fs_utils/file_list.js:171:14)
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
2.6.1
to 2.6.3
.This version is covered by your current version range and after updating it in your project the build failed.
redux-actions is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Reported by DocFred
Describe the bug
Sous iOs/Firefox, si l'on agrandi la vidéo YT en cours de lecture en plein écran, et que l'on en ressort(Echap), le cadre vidéo disparait de la plateforme.
A priori ca se produit que lorsque la vidéo passe un mark de citation, si je lance les 30 premières secondes et qu'il n'y a pas de citation, je ne constate pas le souci
Screenshots
System:
4.26.1
to 4.27.0
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
getResolve
method to create their own resolver function with custom optionsexport * from
The new version differs by 12 commits.
f47bf8b
4.27.0
a67ffcd
Merge pull request #8452 from webpack/feature/resolveWithOptions
96f625c
Merge pull request #8457 from webpack/bugfix/rebuild-provided-exports
56feccc
convert test case to normal function for node.js 6 support
2f4296e
fix a bug which causes incorrect providedExports for cached modules
f944002
Merge pull request #8451 from webpack/bugfix/split-chunks
162da1c
add getResolve method to loader context
3b46b48
enforce doesn't affect minSize for maxSize
72a8a1f
Merge pull request #8440 from Connormiha/oprimize-chunk-can-be-integrated
537d3e4
Cache hasRunstime in chunk
e3e8a68
Merge pull request #8405 from xiaoxiaojx/fix-function-plugin-apply
70b9a1b
fix parameter missing when plugin type is a funtion
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.