Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Hugi
    @aerugo
    Or in api/src/services/scheduler
    Erik Frisk
    @erikfrisk
    That works too!
    Liam K
    @LiamK
    Sorry, I wasn't clear. I meant, where should I /call/ it? It needs to be started somewhere during startup.
    It made sense to me to put the code in the loomio.js file, because the thing it is scheduling is downloads from Loomio, so that keeps the interdependent code all together.
    Erik Frisk
    @erikfrisk
    @LiamK Ah, got it. I think calling it directly from api/src/index.js is ok :)
    If you create a PR when you feel done I'll go though and take a look at the rest :)
    Liam
    @liamk7_gitlab
    @erikfrisk I ended up calling it at the end of index.js, and I added an api/src/services/scheduler dir organize it a bit. You can also put other things you want to schedule in the index.js file there. (Well, in the case of the api fetchers, I left the functions in the file associated with the api.)
    Erik Frisk
    @erikfrisk
    @liamk7_gitlab Nice! I had a look and added some comments to the PR :)
    Erik Frisk
    @erikfrisk
    Hi @LiamK (@liamk7_gitlab?)! Thanks for the changes to the loomio branch! I've merged and closed the PR. You brought up an interesting point about checking in .env on the frontend. The PR is closed but you can see my response here: https://github.com/Edgeryders-Participio/realities/pull/71#discussion_r237074841
    Liam K
    @LiamK
    Thanks. Yes, I started the process of moving to GitLab after Github was acquired by Microsoft. I will keep the Github account, of course, since I have clients that won't move, but I'll move all my personal repos and save some money.
    Also, it looks like they have some interesting deployment options available.
    MindSteps BV
    @hspeijer
    Hello everybody. The new changes look good! What are our next steps?
    Hugi
    @aerugo
    Our most important first step is to help The Borderland to start using it to see what needs to change.
    In order to make that as smooth as possible, there are a few things on the todo from the first release cycle specs:
    • Allow moving a responsibility to another need. @gustavlrsn has made some progress on this, but the pull request is marked as WIP, so not sure if it is ready?
    • Finish email notification logic, add a check which prompts a user making edits to choose if an email notification should be sent out or not
    • Only allow deletion of Need without Responsibilities
    • Autocomplete Deliberation input with existing Info nodes, matched on title
    • Make user profile page more useful (fluffy task, I know)
    Gustav Larsson
    @gustavlrsn
    I wrapped up the moving of responsibilities to other needs, it’s now ready for review: Edgeryders-Participio/realities#70
    Erik Frisk
    @erikfrisk

    @aerugo and I met up in Bali yesterday (awesome to see you Hugi!) and he told me we have a couple of bugs with subscriptions. They only work when you're logged in and they stop working after a while. I had a quick look. The reason they only work when you're logged in is that it's explicitly set up that way in the backend.

    api/src/index.js, L73–94:

    const server = new ApolloServer({
      schema,
      subscriptions: {
        onConnect: async (connectionParams) => {
          if (connectionParams.authToken) {
            return verifyToken(connectionParams.authToken)
              .then(user => ({ user }));
          }
    
          throw new Error('Missing auth token!');
        },
      },
      context: async ({ req, connection }) => ({
        user: connection ? getUser(connection.user) : getUser(req.user),
        driver: neo4jDriver,
      }),
      tracing: true,
    });
    server.applyMiddleware({ app, path: '/graphql' });
    
    const httpServer = createServer(app);
    server.installSubscriptionHandlers(httpServer);
    Erik Frisk
    @erikfrisk
    I can't think of any security risk in removing the token check for subscriptions the way things are set up now. I think we can remove it :)
    Hugi
    @aerugo
    Ping @gustavlrsn
    Do you have a quick fix for it @erikfrisk? And do you think this is also related to the other bug we talked about?
    Erik Frisk
    @erikfrisk
    @aerugo I think it should just be a matter of removing the subscriptions property from the server config in the above code and changing user: connection ? getUser(connection.user) : getUser(req.user), to user: getUser(req.user),. I don't think the user property is used in any subscription resolvers.
    It could be connected to the other bug. I'd fix this one first and test.
    Erik Frisk
    @erikfrisk
    @aerugo I've created a PR! Edgeryders-Participio/realities#72
    When testing I found a bug related to a missing GraphQL property in one of the subscriptions (there was a warning in the console when you edit a Need). I fixed that too. With a little luck this will fix the strange disconnection issues we were having.
    Could you do a quick review (to follow protocol :smile:) and merge if happy with it? Then test and see if you can reproduce the disconnection issue? I haven't been able to reproduce it with this fix, but I might not have followed the right steps.
    Gustav Larsson
    @gustavlrsn
    Nice, removing the token check makes sense to me too! :thumbsup:
    Hugi
    @aerugo
    Great @erikfrisk, thank you! I saw that Gustav had reviewed, so PR is merged. :)
    It looks like it's fixed. Amazeballs.
    Erik Frisk
    @erikfrisk
    :smile:
    Henrik Hesslau
    @hesslau

    hey there! I'm Henrik from the Kiez Burn org (kiezburn.org) and got here on @aerugo's advice. I'm currently setting up realities for Kiez Burn, out regional burn in Berlin and got to the point where realities is running inside a docker container, auth0 is setup and data can be written to a graphql db hosted on graphenedb.com.

    Now I'm getting an error everytime data is being written to the database via graphql. but the credentials seem to be working (discussions from loomio are being fetched and written as Info-nodes to the db)

    "Uncaught (in promise) Error: GraphQL error: User isn't authenticated" (ApolloError.js:37)

    If you want to reproduce this, just go to http://dreams.kiezburn.org:8081/ and try to login.

    Any clues on how to fix this? @erikfrisk

    Henrik Hesslau
    @hesslau
    More info on this: The problem persists when using the app without docker.
    but it's working when I'm logging in via theborderland.eu.auth0.com (instead of our own setup at kiezburn.eu.auth0.com)
    Clément Sirvente
    @csirvente
    Hi Here, Hi @hesslau, I have recently fork the project to see how I could use it for a knowledge management app. Impressive work, docs are pretty clear, but I run into an auth0 issue as well https://holiapp.herokuapp.com. I just created on issue on this Edgeryders-Participio/realities#76. I hope to come back to you if I find the solution, your tips would be welcome.
    Hugi
    @aerugo
    We know what the problem is. We didn’t expect people to start picking this up so soon - we are still just alpha-testing Realities for the Borderland and didn’t really think that anyone else would use it yet. There is some hard coding in a few places, pointing to the Borderlands Auth0. This should be replaced with an env variable. If anyone does this, a pull request would be welcome. Right now the Borderland tech team and Participio are focused on the other part of this ecosystem called Dreams, but we will return to Realities later this year.
    @csirvente
    Clément Sirvente
    @csirvente
    Thanks for you feedback @aerugo, I didn't expect to find it as well and I am glad I discovered the Borderland too :) Ok I'll let you know and pull if I find a way. Good luck for Dreams, great project as well.
    guff-se
    @guff-se
    Hello lovelies. Sorry if this is not the right place for feature requests, but...
    I would really like to have line breaks displayed in the description fields of Needs and Responsibilites. It becomes very difficult to structure and read instructions when it all get mushed up in one blob. Right now, line breaks are saved in the data field, but they need to be converted to <br> in the front end?
    I don't know shit about the realities system, or i would try to fix it myself :)
    Erik Frisk
    @erikfrisk
    @guff-se Thanks for the feature request! Could you open an issue in the project's GitHub for that? https://github.com/Edgeryders-Participio/realities/issues
    Erik Frisk
    @erikfrisk
    By the way, this should be super simple to fix by rendering descriptions with a React markdown library such as https://github.com/rexxars/react-markdown. That would enable people to format text in all kinds of ways using markdown.
    If anyone wants to take a stab at making a pull request I'd be happy to review and merge it. Should be a good first feature for someone new to the project :)
    Erik Frisk
    @erikfrisk
    Never mind adding the task as a GitHub issue. I just fixed it :) @guff-se You now have full markdown formatting in the description field. (ping FYI @aerugo )
    Hugi
    @aerugo
    You're the man @erikfrisk <3
    zach-dunton-sf
    @zach-dunton-sf
    Hello
    I'm looking to make realities sortable. Is there any policy for adding new libraries?
    I also have some new PR coming in for a working docker compose for production.
    Erik Frisk
    @erikfrisk
    @zach-dunton-sf Hi! PRs are super appreciated! :D Feel free to add dependencies. Ideally, only add libraries that are well supported by a large and active community and that have good documentation. No hard rules, just use good judgment. We want to keep the project as accessible as possible for new devs to come in and get oriented.
    zach-dunton-sf
    @zach-dunton-sf
    Yeah, we had a request for drag and drop to re-order realities, I found a supported react lib, but wanted to check first.
    Hugi
    @aerugo
    Cool idea, I think that's useful!
    @zach-dunton-sf
    For curiosity, are you using Realties live, and for what?
    Are you with the Kiezburn crew?
    Hugi
    @aerugo

    @zach-dunton-sf
    By the way, I would probably implement it so that Realities can be ordered either alphabetically, by last edited or by persisting custom order.

    I also noticed that as The Borderland Realities grew, we needed to start grouping Needs by category by a title prefix

    It also became very handy to have the selected reality pushed to the top: http://realities.theborderland.se/
    zach-dunton-sf
    @zach-dunton-sf
    @aerugo Yes, I'm with Kiezburn. My thought were either sortable (time, alpha, priority) and custom order becomes a special case of sortable.
    Drag and drop, was just a way to set custom order.