Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entry "unreadness" #1025

Closed
megahirt opened this issue Jul 23, 2021 · 8 comments
Closed

entry "unreadness" #1025

megahirt opened this issue Jul 23, 2021 · 8 comments

Comments

@megahirt
Copy link
Collaborator

Just an idea:

Keep track of entries that have been seen by the user. Distinguish unread entries in the list somehow.

@rmunn
Copy link
Collaborator

rmunn commented Jul 23, 2021

That information would need to be tracked in each project's database; I think it was a mistake to put the activity collection in the scriptureforge database, but it's probably too late now. We'd need a viewedEntries collection that is keyed by entry ID and has a readBy field (which would be an array of user IDs). We'd use the $addToSet operator to add the user's ID to the array if and only if it doesn't exist in the array already, which would be perfect for this feature. It even creates the array field if it doesn't already exist.

@rmunn
Copy link
Collaborator

rmunn commented Jul 23, 2021

Then when building the list view, we'd do a Mongo query on viewedEntries that looks like { readBy: userId }. When you do find({ arrayField: 'singleValue' }) in Mongo, that means "find all documents where arrayField contains 'singleValue' ". Then the projection part of the find could just return the entry ID. The UI would have a simple Javascript Set of read items, populated from the results of the Mongo query, and it would apply an unread class if ! readSet.has(entryId).

@alex-larkin
Copy link

This sounds like a nice feature! If implemented, I think it would be good to be able to bulk-edit the "viewed status". For example, a user could mark all 7000 entries as viewed upon import, and then only see the new unread entries as other users create or edit them. Or, mark an individual entry as "viewed" or "unviewed".

Also, I think it would be very useful to be able to search for entries that I have interacted with and that have since been interacted with my other users. Not sure where the best place to put that in Github would be.

@megahirt
Copy link
Collaborator Author

@alex-larkin You can describe the desired behavior of your idea in a card, and then place it in the ideas column on the features board that Billy created.

@alex-larkin
Copy link

Will do!

Distinguishing unread entries: They could have a slightly different background color (like notes in Paratext).

@alex-larkin
Copy link

Here's an example from Paratext: unread notes have a yellow background.

image

@rmunn
Copy link
Collaborator

rmunn commented Aug 6, 2021

The idea I listed in #1013 (comment) (a "Needs work"/"Completed" status for entries along with a counter to track how many are done so far) also relates to this "unreadness" idea, at least a little. Because if we use a background color to mark unread entries in the list view, perhaps we could also include some kind of background color or highlight to mark entries with the "Needs work" status in the list view as well.

@alex-larkin
Copy link

@rmunn, I think that if we just use the color tagging suggested in #1008, it would accomplish the same thing. You can see my comment in #1013 too. Thanks!

@megahirt megahirt closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
@github-project-automation github-project-automation bot moved this from To Do to In Progress in Language Forge Classic Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants