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

Mark visited items #8

Open
rafaelrinaldi opened this issue Feb 2, 2016 · 5 comments
Open

Mark visited items #8

rafaelrinaldi opened this issue Feb 2, 2016 · 5 comments

Comments

@rafaelrinaldi
Copy link
Owner

Having previously visited stories marked as read would be nice. Maybe a symbol or even through text decoration should do it.

@erickbelfy
Copy link
Contributor

Let me ask you something, i can't see any flags or variables which control the visited items, do you think if we can implement a key named visited:boolean which controls the behaviour of each entry?

@erickbelfy
Copy link
Contributor

Another idea is on keypress event, we may change text of the selected node. Maybe it should work, but i have a concern if user add the option --keep-alive, when the display update, we may lose all visited entries.

@rafaelrinaldi
Copy link
Owner Author

@erickbelfy Yeah, we currently have no way to tell what item was previously visited but I was thinking about a flag on the cache object or even an array with the id of visited items. Not sure. Just keep in mind that the data should be immutable and we should try to avoid local state at all costs. Object.assign() can be our friend 👍

Also, the feature should behave the same either or not the user runs the program with --keep-open.

I also am not sure about the UI. As I said, maybe a bullet or even a text underline should do it. We shouldn't rely on colors though, since I want to support non xterm-256 users as well.

@rafaelrinaldi
Copy link
Owner Author

@erickbelfy Also, we can even add a feature to persist read items in the future 💡

@erickbelfy
Copy link
Contributor

Hey @rafaelrinaldi I would like to ask you something, you've mentioned about avoid local state at all costs, and use the cache object to store the visited items, do you think about use a package , like node-cache or you suggest use the cache API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants