Commit Graph

509 Commits

Author SHA1 Message Date
Cinnamon 72214effcb
Add LICENSE file (for AGPL-3.0)
The README says this is AGPL-3.0 but we don't have a standard LICENSE file.  I added this using the tool at https://github.com/fraction/oasis/community
2020-01-28 17:45:00 -08:00
Christian Bundy 82f080f3c6
Merge pull request #108 from christianbundy/release-2.12.0
2.12.0
2020-01-28 13:10:56 -08:00
Christian Bundy 89b68db17e 2.12.0 2020-01-28 12:56:55 -08:00
Jonathan Dahan 37d01bf517
Merge pull request #92 from fraction/conn-buttons
Add buttons to 'meta' page to manage networking
2020-01-28 14:03:30 -05:00
Christian Bundy ec3e4d489a Merge branch 'master' of github.com:fraction/oasis into conn-buttons 2020-01-28 10:25:42 -08:00
Christian Bundy b56b4bcd74 Update Flotilla to fix conn.stop bug
Problem: Stopping the networking would sometimes allow peers to remain
connected, which was confusing.

Solution: Upgrade to latest SSB-CONN to pull in a bugfix for this
behavior. Huge thanks to @staltz for the quick fix!
2020-01-28 10:22:24 -08:00
Christian Bundy eafd5cd177
Merge pull request #104 from jedahan/rename-contributing-to-architecture
rename contributing to architecture
2020-01-28 10:02:07 -08:00
Jonathan Dahan fed37b1e57 rename contributing to architecture 2020-01-28 12:25:22 -05:00
Christian Bundy 6735783b3f Fix sidebar moving along X axis on short pages
Problem: On short pages, like the search page, there's no scrollbar
gutter on the right side of the page, which moves everything a few
pixels to the right. After banging my head against this for an hour I finally
realized that it only happens when your viewport is taller than the
content on the page, which creates the scrollbar. This was reported as:
https://github.com/fraction/oasis/issues/96

Solution: Change the display so that we consistently show a scrollbar
gutter on the right side of the page regardless of whether we need it
(e.g. on very short pages or on very tall monitors). This means that
when we center the content on the page it won't move depending on the
height of the page, which was frustrating and janky.
2020-01-28 12:11:39 -05:00
Christian Bundy 03976b288d Solve inconsistent widths between pages
Problem: The `<section>` elements on some pages have different sizes,
which means that the sidebar is doing wonky stuff.

Solution: Make the sections all have a consistent width. Note that
there's still a few pixels of jank on the 'search' page, I'm not sure
why that's happening. The element inspector is reporting that everything
is the same width but that isn't true.
2020-01-28 12:11:39 -05:00
Christian Bundy 40c19c6a20 Add simple nav sidebar on large screens
Problem: Putting the navigation at the top of the screen makes it
impossible to use when you're scrolling through a page, which isn't a
good user experience. It was never meant to be permanent, and I think
everyone has pointed out that it's been a pain.

Solution: Super simple sidebar nav when people are on bigger screens.
This doesn't solve the problem on mobile, and it doesn't incorporate the
'popular' page's interval settings, but I think it's a step in the right
direction.
2020-01-28 12:11:39 -05:00
Jonathan Dahan dcafcdceb1
Merge pull request #99 from fraction/caps
Use capitalization for Oasis links and buttons
2020-01-28 16:34:43 +00:00
Jonathan Dahan d5e47a581d
Merge branch 'master' into caps 2020-01-28 16:22:39 +00:00
Jonathan Dahan 239fff19c4
Merge pull request #74 from fraction/favicon-dimensions
Change favicon dimensions to fit in tab
2020-01-28 16:19:06 +00:00
Jonathan Dahan 43f29e7658
Merge branch 'master' into favicon-dimensions 2020-01-28 16:05:26 +00:00
Cinnamon b7c1233f00
Merge pull request #83 from fraction/fix-tangle
Fix tangle bug when Patchwork is used as a server
2020-01-27 22:07:26 -08:00
Christian Bundy ae08e0715f Use capitalization for Oasis links and buttons
Problem: Using all-lowercase-everything isn't really a standard around
the web and it might be better to use consistent capitalization. This
was brought up in: https://github.com/fraction/oasis/issues/98

Solution: This changes the main navigation to use links with the first
letter capitalized, like how Patchwork + Twitter + Mastodon + etc do it.
This means that we're consistently using sentence case everywhere, which
I think is our best option. Originally I tried experimenting with
all-caps for actions, which I found aesthetically pleasing, but you have
to reduce the font size to make it look good (bad!) and I was reading
that all-caps text is harder for friends with dyslexia or vision
impairments.
2020-01-27 15:48:13 -08:00
Christian Bundy 0e026e020c
Merge branch 'master' into favicon-dimensions 2020-01-27 13:33:00 -08:00
Christian Bundy b61d696a53
Merge branch 'master' into fix-tangle 2020-01-27 13:32:58 -08:00
Christian Bundy 4d1e505701 Change to only inject SSB-Tangle when necessary
Problem: We were overwriting SSB-Tangle with itself, which is fine, but
kind of confusing and requires some knowledge on what is and isn't safe
for Secret-Stack.

Solution: Only inject SSB-Tangle if it doesn't already exist, which
makes the code easier to reason about.
2020-01-27 12:06:33 -08:00
Christian Bundy 64a2ed135c Update CLI with more info on --offline
Problem: The --offline documentation doesn't mention that networking
status can be changed, which may give the false understanding that the
networking is permanently offline when you use that flag.

Solution: Add a note that mentions that the 'meta' page lets you change
your networking status, and that --offline is only applicable to the
starting state of Oasis.
2020-01-27 11:58:32 -08:00
Christian Bundy f40c6ff484 Fix connection restart behavior
Problem: It was starting then stopping, which isn't what we want.

Solution: Swap the lines and make sure that we stop, *then* start.
2020-01-27 11:52:29 -08:00
Cinnamon b311f7848f
Merge pull request #82 from fraction/add-jsdoc
Add some basic type info with JSDoc
2020-01-27 10:18:20 -08:00
Christian Bundy 681e3c6755 Add buttons to 'meta' page to manage networking
Problem: Sometimes you want to disconnect from the network but you don't
want to have to restart Oasis with the `--offline` flag
(https://github.com/fraction/oasis/issues/89). Sometimes networking gets
stuck and you need to run the equivalent of `ssb gossip reconnect`
(https://github.com/fraction/oasis/issues/63).

Solution: Buttons on the 'meta' page that let you start, stop, or
restart SSB-CONN whenever you want. Note that this commit includes an
update to SSB-CONN, but this version and the previous version both have
a bug where hitting 'stop' twice in a row will throw an error. This
commit implements a workaround for the bug, but it's something we'll
want to remove later once the underlying bug is fixed.
2020-01-26 16:55:48 -08:00
Christian Bundy dec0f42b0f Fix tangle bug when Patchwork is used as a server
Problem: Patchwork is missing a plugin that we need to set the `branch`
property when posting a message. This property is important because it
helps us sort threads, so we're throwing an error when it isn't
available. See: https://github.com/fraction/oasis/issues/21

Solution: HACK THE ~~PLANET~~ API. This commit injects the plugin we
need via Oasis, which is a bit of a duct tape solution but it *is* a
solution.
2020-01-26 12:57:42 -08:00
Christian Bundy b6314309f6 Add some basic type info with JSDoc
Problem: When we don't have any documentation for variable types it's
difficult for both humans and machines to parse our code.

Solution: As discussed in https://github.com/fraction/oasis/issues/78,
adding some JSDoc information on function signatures would be a nice
step in the right direction and could make debugging easier.
2020-01-26 12:42:28 -08:00
Cinnamon c218d8bcad
Merge pull request #79 from fraction/faster-inbox
Use ssb-backlinks to improve /inbox page load
2020-01-26 11:30:12 -08:00
Cinnamon c80de07e40
Merge branch 'master' into faster-inbox 2020-01-26 11:19:04 -08:00
Cinnamon 8709ad3c56
Merge pull request #81 from fraction/npm-update
Update Common-Good to stop using npm alias
2020-01-26 11:04:40 -08:00
Christian Bundy 3c50b94fa1 Update Common-Good to stop using npm alias
Problem: CG's dependency, CSpell, had problems with Windows support, so
I was using a forked module as an alias to circumvent the problem. This
only works on very recent version of npm.

Solution: This morning the CSpell maintainer resolved the problem, so
the latest CG doesn't have to depend on an alias. This commit runs `npm
update` to get the latest version of CG so we don't have this problem.
2020-01-25 16:28:08 -08:00
Christian Bundy 502e5e400d Use ssb-backlinks to improve /inbox page load
Problem: The /inbox page was being rendered super slowly because it was
reading through tons of messages.

Solution: There isn't a way to query the database for "private messages
for me", although maybe there should be, but one way we can get
something close is querying for "messages that reference me". Every
message that's encrypted for us will have a `.value.content.recps`
property that includes our feed ID, so we just have to filter out the
public messages and we're about 4 times faster than the previous
implementation.

```console
$ hyperfine 'curl -I http://localhost:4515/inbox' 'curl -I http://localhost:3000/inbox'
Benchmark #1: curl -I http://localhost:4515/inbox
  Time (mean ± σ):      3.352 s ±  0.093 s    [User: 2.0 ms, System: 4.3 ms]
  Range (min … max):    3.231 s …  3.483 s    10 runs

Benchmark #2: curl -I http://localhost:3000/inbox
  Time (mean ± σ):     811.8 ms ±  88.3 ms    [User: 2.7 ms, System: 2.9 ms]
  Range (min … max):   709.1 ms … 972.5 ms    10 runs

Summary
  'curl -I http://localhost:3000/inbox' ran
    4.13 ± 0.46 times faster than 'curl -I http://localhost:4515/inbox'
```
2020-01-25 10:23:19 -08:00
Cinnamon 57702c7b44
Merge pull request #75 from fraction/fix-private-comment
Fix private reply with `recps` bug
2020-01-24 15:59:10 -08:00
Christian Bundy 69bc92dc5a Merge branch 'master' of github.com:fraction/oasis into fix-private-comment 2020-01-24 14:26:47 -08:00
Christian Bundy 416b715eb0 Fix incorrect comment, throw if no recipients 2020-01-24 14:26:33 -08:00
Cinnamon 5f33869f5c
Merge pull request #76 from fraction/cg-update
Update npm dependencies for new common-good
2020-01-24 14:09:23 -08:00
Christian Bundy 8cfc7d1e00 Fix test script in package.json 2020-01-24 09:29:29 -08:00
Christian Bundy 393f7ef087 Update Common-Good to fix Windows problem 2020-01-24 09:28:37 -08:00
Christian Bundy ace1bc0314 Test spawnSync 2020-01-23 18:35:02 -08:00
Christian Bundy 6d8591b0c8 Upgrade ssb-client and common-good 2020-01-23 18:27:06 -08:00
Christian Bundy 52a4d45217 Fix private reply with `recps` bug
Problem: Trying to reply to some messages sent with Patchbay fail
because the schema check is throwing an error.

Solution: When we encounter `recps` like `{ name, link }`, normalize it
to just `link` and publish a well-formed message that passes the schema
check.
2020-01-23 14:41:23 -08:00
Christian Bundy abe802910f Update npm dependencies for new common-good
Problem: Common-Good had a bug in the Prettier glob where the recursion
wasn't working correctly. This meant that we weren't actually testing or
fixing some of the deeper files.

Solution: Update CG to the latest version and run `npm run fix` to fix
the linter stuff.
2020-01-23 14:36:25 -08:00
Christian Bundy 5b97ed1913 Change favicon dimensions to fit in tab
Problem: Some of the icon was being clipped in my browser. I think that
this is because the SVG text actuall extends down under the line (like a
`g` or `y`).

Solution: Change SVG viewBox dimensions and SVG size to fit correctly.
2020-01-23 13:43:46 -08:00
Christian Bundy 51fb7257ba
Merge pull request #73 from fraction/meta-names-null
Show peers by name, by host, or by key
2020-01-23 13:34:36 -08:00
Christian Bundy d30c2c6eca
Merge branch 'master' into meta-names-null 2020-01-23 13:22:36 -08:00
Cinnamon 6f93436843
Merge pull request #72 from fraction/faster-travis
Make Travis faster by removing double-build
2020-01-23 13:20:33 -08:00
Cinnamon 2113daf4fa
Merge branch 'master' into faster-travis 2020-01-23 12:59:41 -08:00
Cinnamon b2e7652b31 Show peers by name, by host, or by key 2020-01-23 12:46:09 -08:00
Cinnamon d1b3232e65
Merge pull request #70 from fraction/meta-names
Add prototype for names in peer list
2020-01-23 12:21:53 -08:00
Christian Bundy 0a10e37cee Make Travis faster by removing double-build
Problem: Travis builds PRs and branches, which means that local branches
get built twice (!).

Solution: Travis should only build `master`, and maybe tags.
2020-01-23 12:09:59 -08:00
Cinnamon a963248ed3
Merge branch 'master' into meta-names 2020-01-23 12:03:16 -08:00