[PR #7] [MERGED] [#3] add link parser and open link via browser #39

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/7
Author: @aome510
Created: 3/2/2021
Status: Merged
Merged: 3/2/2021
Merged by: @aome510

Base: mainHead: 3-link-parser


📝 Commits (10+)

  • c97c819 use spanned string to display comment view
  • 4dc4b4e add link color
  • 39d60d0 wrap comment view into a struct
  • 0a75d0c fix compile error
  • 2f8f591 add link_id color style
  • 64a8256 implement commentView using ViewWrapper trait
  • 791ee4a minor documentation/naming changes
  • c058eed implement EventListView trait
  • b44e8f4 add run debug script
  • 4b34b67 implement open links in comment view

📊 Changes

11 files changed (+423 additions, -163 deletions)

View changed files

📝 Cargo.toml (+3 -1)
run_debug (+3 -0)
📝 src/hn_client.rs (+1 -1)
📝 src/prelude.rs (+5 -1)
📝 src/view/comment_view.rs (+196 -87)
📝 src/view/event_view.rs (+80 -20)
📝 src/view/mod.rs (+2 -19)
📝 src/view/story_view.rs (+89 -29)
📝 src/view/text_view.rs (+7 -5)
src/view/theme.rs (+6 -0)
src/view/utils.rs (+31 -0)

📄 Description

Resolves #3.

  • add CommentView and Story by implementing cursive::views::ViewWrapper around cursive::views::LinearLayout.
  • implement link parser for CommentView. Now links mentioned in comments can be accessed via {link_id} F command. {link_id} is placed next to the link.
  • add O command to open the origin story's url in CommentView and StoryView.

🔄 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/7 **Author:** [@aome510](https://github.com/aome510) **Created:** 3/2/2021 **Status:** ✅ Merged **Merged:** 3/2/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `3-link-parser` --- ### 📝 Commits (10+) - [`c97c819`](https://github.com/aome510/hackernews-TUI/commit/c97c8197ec0be5e9fc77a78bff949b28a7913f9c) use spanned string to display comment view - [`4dc4b4e`](https://github.com/aome510/hackernews-TUI/commit/4dc4b4eb5048524950b85e361589d88c5ee671c3) add link color - [`39d60d0`](https://github.com/aome510/hackernews-TUI/commit/39d60d02891ff3a557451baa49420eca0f0657bb) wrap comment view into a struct - [`0a75d0c`](https://github.com/aome510/hackernews-TUI/commit/0a75d0cfe97a160d5a2c2a2b1e1397885aafd2f8) fix compile error - [`2f8f591`](https://github.com/aome510/hackernews-TUI/commit/2f8f591d9a146c6152f3720bb5e89c15adec9c77) add link_id color style - [`64a8256`](https://github.com/aome510/hackernews-TUI/commit/64a825657c3ff24043b068e9aeda95648375ec8b) implement commentView using ViewWrapper trait - [`791ee4a`](https://github.com/aome510/hackernews-TUI/commit/791ee4a81759b58881743a46b9327ccd298c79fd) minor documentation/naming changes - [`c058eed`](https://github.com/aome510/hackernews-TUI/commit/c058eed48379da0a60781a2f023a7998a50a61d3) implement EventListView trait - [`b44e8f4`](https://github.com/aome510/hackernews-TUI/commit/b44e8f497933be914f95cdd33b6477c821559943) add run debug script - [`4b34b67`](https://github.com/aome510/hackernews-TUI/commit/4b34b6703e0931c324a1408b3b9728f14cb50160) implement open links in comment view ### 📊 Changes **11 files changed** (+423 additions, -163 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+3 -1) ➕ `run_debug` (+3 -0) 📝 `src/hn_client.rs` (+1 -1) 📝 `src/prelude.rs` (+5 -1) 📝 `src/view/comment_view.rs` (+196 -87) 📝 `src/view/event_view.rs` (+80 -20) 📝 `src/view/mod.rs` (+2 -19) 📝 `src/view/story_view.rs` (+89 -29) 📝 `src/view/text_view.rs` (+7 -5) ➕ `src/view/theme.rs` (+6 -0) ➕ `src/view/utils.rs` (+31 -0) </details> ### 📄 Description Resolves #3. - add `CommentView` and `Story` by implementing `cursive::views::ViewWrapper` around `cursive::views::LinearLayout`. - implement link parser for `CommentView`. Now links mentioned in comments can be accessed via `{link_id} F` command. `{link_id}` is placed next to the link. - add `O` command to open the origin story's url in `CommentView` and `StoryView`. --- <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#39
No description provided.