Giter Site home page Giter Site logo

osks / jskom Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 2.34 MB

jskom is a web based LysKOM client, written in Javascript. It uses httpkom for communication with the LysKOM server.

Home Page: https://jskom.osd.se/

License: MIT License

Ruby 0.08% JavaScript 67.84% CSS 16.79% Python 0.71% CoffeeScript 0.54% Makefile 0.04% HTML 4.49% Dockerfile 0.07% SCSS 9.44%

jskom's People

Contributors

dependabot[bot] avatar osks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jskom's Issues

Keyboard short-cuts

There are a couple of keyboard short-cuts, that together with the two implemented (space bar and "k") and the suggested "R" for refresh, could enhance the client a lot.

  • Read the commented text for the current text. Should work the same way that "å k" does in the elisp client.
  • Read all the comments for the current text. Should work the same way that "å a k" does in the elisp client.
  • Post the text you are writing. Should work the same way that "C-c C-c" does in the elisp client.

In relation to this it would be nice id there was a page listing all the keyboard short-cuts. This could be an embryo to a help page that could linked from the top menu bar.

Update URL when changing text

After choosing a conference to read you end up at an URL like https://jskom.lysator.liu.se/conferences/9621/unread. You continue to read texts by clicking on links to other texts and soon your deep in some thread. You are reading a reply to a text, and in the middle you feel the need to read the original text again and you hit the back button in your browser... you shouldn't have done that, because now you are back at https://jskom.lysator.liu.se/.

I can see that texts have their own URLs so let's use them.

(I know that if I enter the URL to a text, say https://jskom.lysator.liu.se/texts/19691223, and then starts clicking links to other text, the URL is updated correctly.)

Unable to re-read comment

I logged in, read text 19709827, then wanted to read the commented text, and clicked on the number 19709808.
Then I wanted to return to 19709827 to comment it, so I clicked on the number 19709827. Nothing happens in the GUI.
I can see the requests for https://httpkom.osd.se/texts/19709827 with a correct reply (200).
Tried it three times.

Console log:

route - home jskom.router.js:41
unreadConferences.fetch - success jskom.views.js:194
route - showUnreadInConf(6) jskom.router.js:68
readMarkings.fetch(6) - success jskom.views.js:220
readQueue:add - prefetching text: 19709827 jskom.models.js:187
readQueue:add - prefetching text: 19709831 jskom.models.js:187
readQueue:add - prefetching text: 19709833 jskom.models.js:187
text.deferredFetch(19709827) - success jskom.models.js:130
text.deferredFetch(19709831) - success jskom.models.js:130
text.deferredFetch(19709833) - success jskom.models.js:130
markAsReadGlobal - success jskom.views.js:438
route - showText(19709808) jskom.router.js:59
text.fetch - success jskom.views.js:257
readQueue:add - prefetching text: 19709808 jskom.models.js:187
unbind jskom.views.js:370
text.deferredFetch(19709808) - success jskom.models.js:130
markAsReadGlobal - success jskom.views.js:438
route - showText(19709827) jskom.router.js:59
text.fetch - success jskom.views.js:257
unbind jskom.views.js:370
markAsReadGlobal - success jskom.views.js:438
route - showText(19709827) jskom.router.js:59
text.fetch - success jskom.views.js:257
unbind jskom.views.js:370
markAsReadGlobal - success jskom.views.js:438
route - showText(19709827) jskom.router.js:59
text.fetch - success jskom.views.js:257
unbind jskom.views.js:370
markAsReadGlobal - success jskom.views.js:438

Store messages per connection

Right now there is one global list of messages, which worked well when there could only be one connection. To make sure we don't display messages from a different connection than the one that is active now, we want to store the messages in the connection.

Comment to alternate conference

Commenting to an alternate conference does not work.

KOM allows text comments from one conference to an alternate conferences. This is typically the case in imported meetings to which comments end up in a specific "Comments to" conference.

LysLysKOM example "Svenska Dagbladet (import av nyheter)" to where comments should go to "Kommentarer (till) nyheter".

Modify membership objects instead of replacing them in the MembershipList

To reduce code complexity in controllers, we should not replace the membership objects or the unread_texts arrays, but rather keep the same objects and modify them when we need to update something. For example in the ReadConferenceTextsCtrl we have to $watch the membership to see if it changes so we always have the newest list of unread texts.

It will make the MembershipList code a bit more complex/hard, but it's just one place compared to multiple controllers (more so in the future).

ASCII art-friendly font?

It would be nice if the texts were presented in some kind of monospaced font so that ASCII art in text can be viewed in all its glory. For a font example you can look at Weblatte.

Examples:
jskom
jskom

Weblatte
Weblatte

Better update of last-time-read for memberships

We sort the memberships in the sidebar by last-time-read, but it's not working as well as we want it to. There are a few problems that must be fixed for it to work.

The first problem is that we don't update the time in the cached membership in jskom, so the time won't be updated until we reload the membership from httpkom/lyskom. The solution is to update the last-time-read every time we mark a text as read in the current active conference[1] - and only for the active conference, even if the text has multiple recipients.

The second problem is that the LysKOM server doesn't save/update the last-time-read for a membership as soon as you mark a text as read. It does keep the new time internally, but it is not saved yet, so you will continue to receive the old last-time-read until you either change conference[2], or log out. The solution is to change conference to 0 ("no conference")[3] when we're moving out of the conference. (When we move from one unread conference to another, we don't want/need to change to 0 inbetween.)

The third problem is that we cache memberships in httpkom, and the solution is to also update the cache there..

Every time a user changes conference, all other logged in users will receive an async message about it, so we shouldn't do that too often (for example, calling change conference every time you mark a text as read is unacceptable).

[1] I believe that is how it works.

[2] I'm not sure if it's enough to change to the current conference.

[3] The documentation was only fixed (in git) a couple of weeks ago. Right now the current documentation on http://www.lysator.liu.se/lyskom/protocol/11.1/protocol-a.html#change-conference says that you will get an error (conference-zero), but that is not correct.

Page for listing memberships

Add a page for listing your current memberships, perhaps with some more information than what is shown in the sidebar.

Refresh unread lists

It would be nice to be able to refresh the unread lists without having to log out/in again. Like the R button in the elisp client.

List texts in conference

I had a hard time figuring out a good title for this issue, but let me explain:

In WebKOM after choosing a conference, I got a list of all the (un)read texts. In jskom, after choosing a conference I end up at the first (?) unread text in the conference.

I don't read every text in all the conferences I follow, I like to pick and choose which text to read, based on subject and author, so I prefer the WebKOM way.

Unreadable texts

Some texts are not readable. Basic info like to and subject display properly, but the text contents just show [unknown content-type: "x-kom/text"].

Will update with example when I find one that anyone can read.

Ambiguous interpretation of "Next" when zoomed in on a text

When revisiting a read text via "Latest texts in.." it is not clear what the "Next" button will do.

jskom-next-zoomed

I'd expect "Next" when zoomed in on a text to prioritize next comment (if such exist), otherwise next unread in conference.

Maybe consider "Next in thread" or add additional keyboard commands?

Implement async-send-message

Requesting implementation of "async-send-message" (I hope I got i right), to which logged in persons can exchange non-persistent messages.

Articles not read in thread order

After reading 19710249, I expected to get 19710259, but got 19710256. I then expected 19710261, but got 19710259. The text after that was 19710261.

Console:

readQueue:remove - prefetching text: 19710249
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:130text.deferredFetch(19710249) - success
jskom.models.js:194readQueue:remove - prefetching text: 19710256
jskom.models.js:130text.deferredFetch(19710256) - success
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:194readQueue:remove - prefetching text: 19710259
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:130text.deferredFetch(19710259) - success
jskom.models.js:194readQueue:remove - prefetching text: 19710261
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:130text.deferredFetch(19710261) - success
jskom.models.js:194readQueue:remove - prefetching text: 19710282
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:130text.deferredFetch(19710282) - success
jskom.models.js:194readQueue:remove - prefetching text: 19710285
jskom.views.js:438markAsReadGlobal - success
jskom.models.js:130text.deferredFetch(19710285) - success

Long title and send button

When the title of a text is very long the send page becomes wider and the send button is placed far out to the right when you comment a text.

Screen shots from an iPhone 5:
2015-05-12 21 39 46
2015-05-12 21 39 53

Wrong number of unread

There seems to be something strange when the list of unread texts is presented. I'll try to remember what I really saw:

  1. I logged in and read "Inlägg }t mig (4)".
  2. I spaced past the four texts and commented one of them.
  3. Then I read "Inlägg }t mig (4)" again.
  4. When spacing through I only found the one text I wrote myself and then there were no more.

Send user-active

Send the user-active call when the user is active. Needs support in httpkom.

Message stays unread

Message 19807018 in LysKom stays 'unread' for me, i.e the conference in question always have one unread message and when pressing space for next message jskom is looping over that message.

ROT13

Show text with ROT13.

Possible stale connections by disconnected clients

When viewing the session list in LysLysKOM there is a high number of jskom users with abnormally long idle times, a page full of users with idle time more than 2 months.
(Date format in image: d.hh:mm:ss)
image
Many of the session belong to the same users, up to 50 sessions per user, created one or two days apart.
It really looks like most of the connections are stale.

Would it be possible to detect disconnected clients and close their sessions?

Links in articles

It would be grand to be able to click on urls and text numbers in articles.

Problems signing in with browser using 1Password extension

1Password is a program that saves your passwords. There are browser extensions for 1Passwords that autofill in your username and passwords on websites. When letting the 1Password extension for Safari or Chrome fill out the log in form for jskom, I can't sign in to jskom. The log in button is dead, nothing happens when I click it.

If I fill in the form manually I have no problem signing in. I noticed that a ajax request is sent when switching from the username input to the password input. That is not happening when using the 1Password extension.

Highlighting ones own name

It would be nice if ones own name was highlighted in the header (written by, comment to, comment in...). For instance with a different background colour like in the emacs client.

Handle marked texts

I think it would be nice if one could mark texts, view a list of all marked texts and unmark texts. Of course these command needs keyboard short cuts.

Pre-fetch texts from multiple conferences

Right now the pre-fetch start when you begin reading unread texts in a conference. If you have several conferences with just one unread texts in each, the pre-fetch will not help at all.

We would like to pre-fetch from more than one conference at a time.

Suggestion 1: Pre-fetch up to a number of texts starting with the unread texts from the first (sorted by priority) conference, and then continue to the next conference if the pre-fetch buffer isn't full.

Suggestion 2: Pre-fetch up to a number of texts in each unread conference (not good if you have a lot of unread conferences).

Suggestion 3: Combine 1 and 2. Pre-fetch the first unread text in the first N unread conferences, and also pre-fetch up to M texts, continuing to the next unread conference until M unread texts have been found.

Warn user when moving from new text without sending it

Stop (warning message that has to be acknowledged) the user from moving (anything that changes the URL) away from the new text/comment page if the user has written something in the text area. (Pretty much how gmail works.)

It's very annoying to writing a text and then by mistake doing something that loses the text.

View read conferences

It doesn't seem possible to view conferences with no unread texts. It was possible in WebKOM, and I liked it.

Unmark removed texts

It seems as if one can not unmark texts that has been deleted after being marked.

But that seems to be impossible in the emacs client as well. And I'm not really sure if the text I'm trying to unmark is removed or if it's just my reading privileges that has been revoked.

Here are two texts that seems to be marked by me but can't be unmarked by me:
12922715
13154450

jskom_marked_removed

Show subject in latests text list

From #11:

I don't read every text in all the conferences I follow, I like to pick and choose which text to read, based on subject and author, so I prefer the WebKOM way.

Support for multiple LysKOM-servers

Like most clients, have a list of servers that you can choose from. This probably (depends on exact solution) requires support in httpkom.

Text lost

I sometimes lose texts that I might want to comment. The scenario looks like this.

  1. I read a text (A) after pressing space.
  2. I read the text (B) that A is a comment to by clicking the text number after "comment to text".
  3. When I have read B I notice that there is no link back to A.
  4. When I click the back button in the browser I get a new text (C) since A is marked as read.

Sort marked texts

I would like to be able to change the order of the texts when listing marked texts. Currently they seem to be ordered the most recently marked text last. I would like to be able to reverse that to the most recently marked text first.

Now when I write this I think it would be nice if the name of the author of the texts was listed along with the type and text number. Perhaps also the subject? And then one could be able to sort texts by any of the four columns type, text number, text subject or text author and also decide if it should be ascending or descending.

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.