[PR #6] [MERGED] [#2] implement comment view with vim-like keybinding #38

Closed
opened 2026-03-14 12:28:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/6
Author: @aome510
Created: 2/24/2021
Status: Merged
Merged: 2/25/2021
Merged by: @aome510

Base: mainHead: 3-implement-comment-view


📝 Commits (9)

  • 2dd33db add view module
  • e124d42 clean imports by using prelude
  • 1eee4eb comment text view kinda works
  • dd0d250 change theme, story text, and rename comment_text_view to to text_view
  • f6cd2ea wrap story_view and comment_view around text_view and linear_layout
  • 27ff886 remove comments, minor tweak theme
  • c55bd4e use q to remove the top layer
  • a5afe22 implement h,j,j,k,l,b,t
  • d2d901c remove debug

📊 Changes

10 files changed (+359 additions, -184 deletions)

View changed files

📝 src/hn_client.rs (+15 -17)
📝 src/main.rs (+7 -8)
src/prelude.rs (+12 -0)
src/view.rs (+0 -155)
src/view/comment_view.rs (+145 -0)
src/view/event_view.rs (+30 -0)
src/view/mod.rs (+23 -0)
src/view/story_view.rs (+41 -0)
src/view/text_view.rs (+81 -0)
📝 theme.toml (+5 -4)

📄 Description

Resolves #2.

TODO

  • j to move down.
  • k to move up.
  • l to move to the right until finding a comment with the less than or equal level .
  • h to move to the left until finding a comment with the less than or equal level.
  • t move to top of the view.
  • b move to bottom of the view.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/hackernews-TUI/pull/6 **Author:** [@aome510](https://github.com/aome510) **Created:** 2/24/2021 **Status:** ✅ Merged **Merged:** 2/25/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `3-implement-comment-view` --- ### 📝 Commits (9) - [`2dd33db`](https://github.com/aome510/hackernews-TUI/commit/2dd33db23aae615520e6c0552984825a96e72067) add view module - [`e124d42`](https://github.com/aome510/hackernews-TUI/commit/e124d4202369a7bffd2b2a66f1626ef007088a4f) clean imports by using prelude - [`1eee4eb`](https://github.com/aome510/hackernews-TUI/commit/1eee4ebbbefeb26adfb50e7abe4affb0dd5a0266) comment text view kinda works - [`dd0d250`](https://github.com/aome510/hackernews-TUI/commit/dd0d250663a7b2279c984109c5dfb940fa1261e2) change theme, story text, and rename comment_text_view to to text_view - [`f6cd2ea`](https://github.com/aome510/hackernews-TUI/commit/f6cd2eafa529ea482428af33b1ada9b3a18a0c2b) wrap story_view and comment_view around text_view and linear_layout - [`27ff886`](https://github.com/aome510/hackernews-TUI/commit/27ff8867e2f13996ca2b38271f388c4011cf9ae9) remove comments, minor tweak theme - [`c55bd4e`](https://github.com/aome510/hackernews-TUI/commit/c55bd4ec5a5eb656ddd8972dcbaee28b6ed3d9c9) use q to remove the top layer - [`a5afe22`](https://github.com/aome510/hackernews-TUI/commit/a5afe22c87dfae46f61428b7a5d8f595b2c11c99) implement h,j,j,k,l,b,t - [`d2d901c`](https://github.com/aome510/hackernews-TUI/commit/d2d901c4f7d9266a66a1834fbe2067d34248886a) remove debug ### 📊 Changes **10 files changed** (+359 additions, -184 deletions) <details> <summary>View changed files</summary> 📝 `src/hn_client.rs` (+15 -17) 📝 `src/main.rs` (+7 -8) ➕ `src/prelude.rs` (+12 -0) ➖ `src/view.rs` (+0 -155) ➕ `src/view/comment_view.rs` (+145 -0) ➕ `src/view/event_view.rs` (+30 -0) ➕ `src/view/mod.rs` (+23 -0) ➕ `src/view/story_view.rs` (+41 -0) ➕ `src/view/text_view.rs` (+81 -0) 📝 `theme.toml` (+5 -4) </details> ### 📄 Description Resolves #2. TODO - [x] `j` to move down. - [x] `k` to move up. - [x] `l` to move to the right until finding a comment with the less than or equal level . - [x] `h` to move to the left until finding a comment with the less than or equal level. - [x] `t` move to top of the view. - [x] `b` move to bottom of the view. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:28:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hackernews-TUI#38
No description provided.