Giter Site home page Giter Site logo

beaker's People

Contributors

aeonofdiscord avatar amatecha avatar cblgh avatar crteal avatar gojomo avatar hughisaacs2 avatar ianh avatar jimpick avatar joshavanier avatar karuji avatar ljcooke avatar louiscenter avatar lsjroberts avatar ltkmn avatar maxdeviant avatar neauoire avatar ramiismail avatar roxaloxa avatar ruby0x1 avatar saulhardman avatar uonai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beaker's Issues

Where are the post stored

Where are the post stored ?
When I delete a post where is the file(s) that I'am deleting located ?

Thanks for the Art !

createFileActivityStream is called way more than needed

I was debugging why Beaker was telling me about too many event emitters registered when I visit Rotonde. We may have a leak, but I found that createFileActivityStream is being run more than once (much much more than once) for each feed. It should only ever happen one time per feed, and then you should hold on to that reference.

fileEvents = archive.createFileActivityStream();

Suggestions for a healthy codebase

It's great seeing so many people contribute to the project, and it's refreshing for me to work on something without all the burden of external frameworks and dependencies. But I think there are a few things we could do to make it easier to maintain and to help new folks get involved (from a code point of view).

It may feel a little early to start looking at this stuff, but it's easier to adjust now before it becomes unwieldy and requires major refactoring.

Please discuss :) I'm not just doing them immediately as there are many other valid opinions.

Consistent code style with prettier

Prettier is an amazing tool to help keep your code clean and consistent. It can help when reading the code, and prevent any disagreements if you leave the way it looks up to a tool.

It can be setup to run in a couple of different ways:

Separating the logic and view layers

Essentially you have all your code that does things like get the data from the archives, mutate it however etc in one place, and all your code that renders it into the dom in another place. This helps in both the reading and understanding of the code, but also prevents a lot bugs, duplication of code, ease of testing, adding new features and performance optimisation.

We definitely do not need any external libraries like this, and to keep it simple I'd suggest not unless we really feel we need to. (You may have heard of Redux (data) and React (view)).

Adding tests

Once the data logic is separated it is pretty easy to test it. We wouldn't need too much testing but it'd help us be confident in new PRs and prevent bugs.

There's a bunch of libraries for this but I've found the most success with Jest.

Automating tests with CI

I suggest we could use Travis CI for this. It is free for open source projects and very easy to setup and use.

List of portals doesn't always show everyone

Correct me if I'm wrong, but it would seem that the list of portals in the sidebar only shows portals that are currently alive/seeded. This isn't great if you're trying to unfollow or confirm whether you are following someone currently offline.

Maybe the local list of ports in portal.json also stores the last known name of the person? Then you could show the full list 100% of the time. Maybe throw a * next to ones currently online.

Load the feeds in parallel

Rather than having the feeds load serially and block on each feed (https://github.com/Rotonde/beaker/blob/master/scripts/feed.js#L44), it might be a nicer experience to instead have them run in parallel.

As each feed resolves merge it into the list. It might require a bit of subtle animation as items are inserted to avoid content jumping too much. Or perhaps if a new one loads after the first 3 seconds insert it as a collapsed item which can be expanded.

Some extra feedback on the left panel with something like "8 of 14 feeds loaded" would be nice. Along with "2 feeds offline" etc.

I'm happy to take this on if this sounds like a good idea to you :)

Suggestion: Move core logic into seperate Archive

One issue that has become apparent with the current version of the beaker site (unless I'm missing something) is that users don't automatically get updates for the core scripts and styles. I think this will be important for the ux of non-devs, so I suggest the following: split rotonde into two archives.

  1. The User Portal which would just be the index.html, media/content and the links/custom.css
  2. The Rotonde Core which would contain pretty much everything else in scripts/ and links/ and media/.

You could do this by swapping the relative paths in the <link> & <script> tags for absolute urls to an external Dat Archive.

- <link rel="stylesheet" type="text/css" href="links/main.css"/>
+ <link rel="stylesheet" type="text/css" href="dat://6074e23e900e310aac23a6ed098dfde3f65f4297c8e8077717df1460fbb9d87d/links/main.css"/>

You would then be able to push updates to the "Rotonde Core" and all users would automatically get the latest bits as long as they keep these links. If they want to customize any of this, they can just download the file, drop it in their Portal archive and link to it there. If you wanted to go the extra mile, we could even create a quick "Eject" button of sorts that would automatically do this for them and would essentially lock the files down to their current version and stop accepting updates from core.

Example

Portal
git: https://github.com/webdesserts/rolling-rotonde
dat: dat://rolling-rotonde.webdesserts.com

Core
git: https://github.com/webdesserts/rolling-rotonde-core
dat: dat://rolling-rotonde-core.webdesserts.com

Refresh Feed

Would it be possible to add a way for the feed to pull new posts automatically? That way you don't have to refresh to get new posts, which is frustrating if you're getting occasional crashes like I am.

Feeds are being overwritten faster than images have time to load.

When you have multiple feeds, the feed gets replaced too fast for images to fully load, so they constantly load halfway before the html gets wiped out and then the download starts over. I'm putting this here in case someone want to tackle a way to make the feed more persistent in term of HTML.

Single quotes break timestamp edit shortcut

If you click the timestamp on your own message that has a single quote in it like look at me, i'm gonna break!, then the command prompt will prefill with something like edit:10 look at me, i and truncate after the single quote.

screen shot 2017-10-13 at 10 57 07 pm

Add `portal.json` to `.gitignore`

When I pull your changes it causes conflicts with the ones I'm making. It would be good to add a .gitignore with:

portal.json

And then instead of modifying it in a few steps for new users onboarding, it could auto create a blank one if it does not exist. Perhaps with some default values like:

{
  "name": "new_user",
  "desc": "",
  "site": "",
  "dat": "",
  "port": [
     // maybe even some starting feeds here too?
  ]
}

Though this sort of thing does sound like it'll be improved by the App Scheme idea.

Either way, I'll pop up a PR with this shortly.

non-urgent feature request

@ mentions in 'tweets' (posts?) should ideally link to the profile of that person, like twitter does.

It'd be cool to follow these new people but there's no actual way of getting their profile page / dat url from merely seeing @name mentioned by someone else as plaintext.

Bug: Endless portal list

If you leave the site open for a while, the list of portals grows endlessly as duplicates are added.

This is especially noticeable if you make the list scrollable, e.g. by adding the following to custom.css:

body #portal {
  position: absolute;
}

Code of conduct etc

While this is a pretty nascent project, it seems sensible to me to put in place things like a code of conduct from the outset.

Contributor note: all these can be done here https://github.com/Rotonde/beaker/community

Code of conduct

Github recommends the Contributor Covenant. I have no qualms with it if no-one else does?

Contribution guidelines

This one is probably less important, but we could put anything regarding code design decisions etc here.

License

This is actually pretty important. The default license of code on github technically only permits users to view the code and not modify it (if I'm not mistaken).

I usually go with MIT, but there are other options worth considering.

The MIT License is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and don’t hold you liable.

The GNU GPLv3 is a copyleft license that requires anyone who distributes your code or a derivative work to make the source available under the same terms, and also provides an express grant of patent rights from contributors to users.

Issue and pull request templates

These help with triaging and ensuring we get enough information to understand the issue and decide how to proceed.


Thoughts?

handle dead/offline feeds

Uncaught Error: TimeoutError: Timed out while searching for archive
    at DatArchive$1.createFileActivityStream (/Applications/Beaker Browser.app/Contents/Resources/app/webview-preload.build.js:381)
    at Feed.install (feed.js:16)
    at Rotonde.load_feed (rotonde.js:36)
    at Portal.install (portal.js:34)
    at Rotonde.load_account (rotonde.js:30)
    at <anonymous>

fix parsing on @names, dat:// urls

i just noticed that we have an issue where if i write @neauoire's boat is cool the 's will cause the parser to fail to recognize the name.

there's a similar case with mentioning a dat in a parens as in (dat://ab64573efd68035014d94b83bf034012f415ff4678d3ecf291237e0bdac741b1)
where the beginning parens will cause the parser to fail to recognize the dat link, and if recognized then the last parens will be counted as one of the characters of the string.

i'm writing this issue up instead of fixing it as it's 00:47 already and i have to go to bed!

Images break on spaces in filename

Drag in or manually link (with >>) file named Screen Shot.png.

Upon pressing enter to send, the image linked in the post is broken, trying to load media/content/Screen.jpg. It seems .jpg extension is defaulted to/assumed since the filename breaks on the space.

(When using drag-and-drop, the image file with its full/with-spaces filename is still copied to the media/content/ directory.)

Adding a dat twice deletes it

From this commit 1cd703a

Is this the intended behaviour? If I'm not sure if I have added someone I might enter in their dat url again. It seems it would be better to just skip it and not duplicate the entry.

Though it would be good to have a button or some other clear way to unfollow someone.

Discussion: Common social network features

I thought it'd be interesting to have a place to talk about common social network features, what they mean for Rotonde, and how they'd even be possible in this environment.

For example, there's a list of the portals you are following. What about a list of portals following you? That's great for discovery and understanding your social circle, but how does that kind of reverse look-up happen in this distributed environment?

Git Still Tracks Files in the .gitignore

I've notice that git is still tracking the changes made for files listed in the .gitignore. Since dat.json, portal.json, links/custom.css, media/content/icon.svg have previously been committed to the repo their change will continue to be tracked.

The fallowing command will cause those files to be 'forgotten' without removing them:
git update-index --assume-unchanged links/custom.css media/content/icon.svg dat.json portal.json

stackover source

@mention inconsistencies

So in this example, @jimpick's name is linked up in the message but @flame's is not. I follow jimpick and I do not follow flame. However, the neauoire > [user] part is linked up appropriately for both.

screen shot 2017-10-14 at 12 09 08 pm

Shouldn't @flame in the message be linked to their portal?

Putting my dat url in the input duplicates all posts

I was attempting to put a dat url into the input but it doubled all my posts. Even if I delete them, all future posts are doubled.

reference: dat://a947b0c0ba330763257208f14f40b0779b0dfc4bcf0fa4a49232abc6326b9326/

As you can see it says there are 4 entries, however there are currently 8.

Beaker occasionally crashes with ~50 portals

I've added 51 user's dats (and 44 online at this time) and occasionally Beaker crashes. I'm not sure if this is a bug in Beaker or Rotonde.

@pfrazee thoughts? Should it be able to handle this many connections? I have noticed some general slowdown in hitting other unrelated dat urls after visiting my rotonde.

Mentions-ish?

I swear I don't want to add in notifications. Buuuuut– If we're going to have ways for other users to mention you, we should have a way for users to find the post mentioning them, for instance if someone mentions you while you're offline.

Handle mime type of image/jpeg for drag and drop

When attempting to drag-and-drop a .jpg file on my MacBook, it wasn't working because it was reporting a mime type of image/jpeg ... but only image/jpg is accepted in the code. I'll submit a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.