Comments (5)
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?
from hn-cli.
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.
from hn-cli.
@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.
from hn-cli.
@erickbelfy Also, we can even add a feature to persist read items in the future 💡
from hn-cli.
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
from hn-cli.
Related Issues (14)
- Fetch latest HOT 1
- Refresh shortcut HOT 7
- Show and open comments HOT 3
- Support proxies HOT 12
- Jump to line HOT 2
- honor BROWSER environment variable HOT 1
- Add order by HOT 10
- Tests HOT 2
- Enter exits app on windows 10 HOT 4
- Better contrast for selected item on windows HOT 4
- Does `--keep-open` even make sense? HOT 7
- Display is blank on Cygwin under windows 7 HOT 3
- Error : Use of const in strict mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hn-cli.