Commit graph

66 commits

Author SHA1 Message Date
xavcz
e533dd47e7 fix some lint issues, remove some dead code, remove double imports from the same package & import from core instead of lib except for packages depending explicitly on lib (users, emails, ..) 2017-02-02 16:18:33 +01:00
xavcz
eb2644ad8a Form: display nicer, multiple & internationalizable (encode -> decode) errors, ensure that state updates are queued; in general prefer Error to Meteor.Error, clean some dead code 2017-02-02 15:15:51 +01:00
SachaG
38de180530 Add comment voting using graphql union type 2017-01-29 11:17:00 +09:00
xavcz
591476c4f4 fix user updated fields on voting async callbacks 2017-01-26 12:53:49 +01:00
SachaG
3ab60533f2 some more vote clean-up 2017-01-26 13:09:27 +09:00
SachaG
99160a1831 Remove MongoDB logic in vote.js; split out db update into mutateItem 2017-01-26 11:14:39 +09:00
SachaG
ac5ab92143 Various clean up; use function syntax for callback functions 2017-01-25 13:58:41 +09:00
xavcz
36ca34a267 fix upvote.async callback issue on collection.new mutation
* add collection as the last parameter of a collection.async cb,
* when inserting a new document, run upvote.async cb once the document has been inserted (collection.new.async)
* remove pre-meteor 1.3 '/server' folder, put everything in the root (initiated by grouping callbacks in the same file for less confusion)
2017-01-24 11:58:57 +01:00
SachaG
c1131422a0 Use immutability helper for vote; pass currentUser to Vote.jsx as prop 2017-01-22 10:12:05 +09:00
SachaG
b1d0cd8e69 call upvoting callback on post insert in sync way 2017-01-18 10:19:23 +09:00
SachaG
db17e917f8 Remove “__” prefix to avoid conflicts with GraphQL introspection types and simplify code 2017-01-18 10:18:33 +09:00
SachaG
5e3ed2b207 Move voting-related resolvers to nova:voting package 2017-01-16 12:24:59 +09:00
Xavier Cazalot
7f99b48953 devel - revert commits related to simpl-schema (#1537)
* Revert "add note link to issue in collection2 on mutation insert, remove debug console logs on mutation edit"

This reverts commit 7a15103de7.

* Revert "node simpl-schema + collection2-core: fix vote by specifying the right type of the array (dont use blackbox in the end!)"

This reverts commit e894c3224c.

* Revert "add graphql date type (fix problem with node simple schema), fix an update bug on date picker,  add edit check on custom post item, add `blackbox: true` for arrays field (validation problem with simple-schema)"

This reverts commit 9d84fbec98.

* Revert "use node `simpl-schema` by aldeed to replace `meteor/aldeed:simple-schema` ; use the meteor collection2 core package as recommended"

This reverts commit 016935f4fa.

* revert before node-simple-schema, fix obj.hasOwnProperty undefined error thrown by simple-schema & collection2

* CustomPostsItem: check on renderActions; withDocument/List: pollInterval 20seconds by default; DateTime form component enhancement + GraphQLDate type
2017-01-11 18:02:12 +01:00
xavcz
e894c3224c node simpl-schema + collection2-core: fix vote by specifying the right type of the array (dont use blackbox in the end!) 2017-01-11 10:39:52 +01:00
xavcz
fe7baadc89 vote resolver: isSimulation false -> async callbacks will run 2017-01-10 11:38:42 +01:00
xavcz
9d84fbec98 add graphql date type (fix problem with node simple schema), fix an update bug on date picker, add edit check on custom post item, add blackbox: true for arrays field (validation problem with simple-schema) 2017-01-10 11:17:16 +01:00
xavcz
016935f4fa use node simpl-schema by aldeed to replace meteor/aldeed:simple-schema ; use the meteor collection2 core package as recommended 2017-01-10 10:09:24 +01:00
Sacha Greif
fc982bc20f Make voting generic (posts, comments, etc.) WIP 2017-01-09 15:42:24 +09:00
Sacha Greif
4e1a82c130 Callbacks.add -> addCallback; and other callback functions 2016-12-13 11:40:24 +09:00
Sacha Greif
1bf4933ebb clean up Telescope imports 2016-12-13 11:32:23 +09:00
xavcz
a0b7e64788 fix voting callback & operateOnItem, fire stopLoading on Vote component when user is not logged in 2016-12-12 11:17:13 +00:00
Sacha Greif
5816b175f0 some more clean up 2016-12-12 16:48:49 +09:00
Sacha Greif
381cdc7cff Telescope.headtags -> Headtags; Telescope.actions -> Actions; Telescope.reducers -> Reducers; Telescope.operateOnItem -> operateOnItem; TODO: fix withMessages 2016-12-12 16:43:23 +09:00
Sacha Greif
98fef8ef62 Telescope.settings.get -> getSetting 2016-12-12 15:00:56 +09:00
Sacha Greif
dd0df7dfc5 Telescope.utils -> Utils 2016-12-12 11:34:28 +09:00
Sacha Greif
a2d7b7c2ef Telescope.graphQL.foo -> GraphQLSchema.foo 2016-12-12 10:41:50 +09:00
Sacha Greif
5e1e124a8f Telescope.callbacks -> Callbacks; Telescope.createCollection -> createCollection 2016-12-12 10:24:34 +09:00
Sacha Greif
8fa846fda3 withSingle -> withDocument 2016-12-12 09:54:16 +09:00
xavcz
1c058b60c6 clean-up 2016-12-09 09:11:20 +01:00
xavcz
2638023f4e harmonize apollo branch to be on v0.27.5 2016-12-08 23:48:16 +01:00
xavcz
4e6e312469 permission API: [editable/insertable/viewable](If) -> (By) ; anonymous -> guests ; default -> members 2016-12-06 10:55:47 +01:00
Sacha Greif
56c04baf3b use new group-based syntax for permissions; various tweaks 2016-12-01 15:29:07 +09:00
xavcz
ddd71eebd1 withCurrentUser belongs to nova:users 2016-11-29 14:08:24 +01:00
xavcz
7b4e64e97f voting: missing imports, patch on vote helpers in component (uncomment for debug) 2016-11-29 12:27:26 +01:00
Sacha Greif
9467837d1f move Users.hasUpvoted to nova:voting 2016-11-29 18:52:13 +09:00
Sacha Greif
fa581a85c3 lots of cleaning up 2016-11-26 11:17:01 +09:00
Comus Leong
464e20a96c eslint & clean up code, also fixed some bugs (#1515)
* [eslint] update eslint rules & add .eslintignore to ignore non-ready nova packages

* [clean-up] nova-voting

* [clean-up] [bug] nova-users: missing user parameter

* [clean-up] nova-users

* [clean-up] nova-subscribe

* [clean-up] nova-settings

* [clean-up] nova-rss

* [clean-up] [bug] nova-posts: correct UsersRemoveDeletePosts

* [clean-up] nova-posts

* [clean-up] nova-notifications

* [clean-up] [bug] nova-newsletter: no error.message on throw error

* [clean-up] nova-newsletter

* [clean-up] nova-lib

* [clean-up] nova-kadira

* [clean-up] nova-inject-data

* [clean-up] nova-getting-started

* [clean-up] nova-forms

* [clean-up] nova-events

* [clean-up] [bug] nova-embedly: no FlowRouter

* [clean-up] nova-embedly

* [clean-up] nova-email-templates

* [clean-up] nova-email

* [clean-up] nova-debug

* [clean-up] nova-core

* [clean-up] [bug] nova-comments: correct UsersRemoveDeleteComments

* [clean-up] nova-comments

* [clean-up] [bug] nova-cloudinary: use Telescope.settings.collection instand

* [clean-up] nova-cloudinary

* [clean-up] nova-categories

* [clean-up] nova-base-components

* [clean-up] nova-api

* [eslint] extends react recommended

* [clean-up] for jsx files

* [eslint] extends meteor recommended

* i forgot this one little change
2016-11-25 13:46:55 -05:00
xavcz
22dd58114b get rid of nova:base-containers, move graphql vote-related code to nova:voting, undo mistake on some user fields 2016-11-22 18:39:50 -05:00
Sacha Greif
8689a4de73 clean up callbacks by moving logic to mutations and schema (autoValue) 2016-11-14 17:17:44 +09:00
xavcz
db5605bd2e use a more generic prefix (__) for users settings and adapt Users.methods.setSetting 2016-11-10 14:22:47 +01:00
xavcz
460efe52f6 move namespace to prefix on user schema: user.telescope.xxx by user.nova_xxx 2016-11-08 18:22:17 +01:00
xavcz
84a73a988d comments.postId available in commentsInput (insertableIf/editableIf) -> add control: "none" where needed in the app ; fix wrong import from previous commit on nova-voting (vote (operateOnItem) is needed on client/server, score algorithm is only server-side (async callback)) 2016-11-08 13:49:41 +01:00
xavcz
ec95b3c591 wip on nova:base-containers, rename nova:base-apollo in nova:apollo for the sake of clarity, remove some obsolete/experimental functions (triggerMainRefetch, refetchQuery, ..) 2016-11-08 12:58:53 +01:00
Sacha Greif
364dacaecf split out user schema fields in appropriate packages 2016-11-08 16:33:25 +09:00
Sacha Greif
bee5eaf373 generate graphQL schemas for posts, comments, and categories from simpleSchema 2016-11-08 14:56:39 +09:00
Sacha Greif
9ce7fe703f make PostsListContainer and PostsSingleContainer stateful components; add refetchQuery on child context; call it from post edit form; clone item in Telescope.operateOnItem to avoid modifying the original by mistake 2016-11-03 14:07:58 +09:00
xavcz
7c88d27d62 have the mutation simulation and server operation returning the same result, add missing viewableIf, pass comment object to Telescope.operateOnItem 2016-11-02 13:29:43 +01:00
xavcz
3390b5af24 test optimistic ui on vote with sleep server-side 2016-11-02 09:53:16 +01:00
Sacha Greif
123da6b79d add latency compensation (a.k.a. optimistic UI) simulation for Telescope.operateOnItem; it now takes the item as argument (not the item _id) 2016-11-02 16:31:15 +09:00
xavcz
328be8b07d define mutation postVote(postId: String, voteType: String), wire it to <Vote /> 2016-10-31 18:21:28 +01:00