[PR #62] [MERGED] Render story text in comment view #84

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

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/62
Author: @aome510
Created: 1/9/2022
Status: Merged
Merged: 1/10/2022
Merged by: @aome510

Base: mainHead: render-story-text


📝 Commits (10+)

  • 62b5c7d parse story text
  • d31803c rename structs, struct's fields
  • a017249 use HnText when parsing story and comment's text
  • 8cdbe3b decode HTML HN text before parsing
  • ff82ba2 render story text in Comment View (wip)
  • 8a8267e handle single <p> inside the story text
  • 638577f Merge branch 'main' into render-story-text
  • c549363 update NOTES.org
  • e137976 use level instead of height to represent a comment's depth
  • 7afc7cb tweak the documentation wording

📊 Changes

4 files changed (+170 additions, -95 deletions)

View changed files

📝 NOTES.org (+10 -2)
📝 hackernews_tui/src/client/mod.rs (+3 -3)
📝 hackernews_tui/src/client/parser.rs (+109 -54)
📝 hackernews_tui/src/view/comment_view.rs (+48 -36)

📄 Description

Brief description of changes

  • implement story text rendering
  • use level to indicate comment's depth instead of height
  • rename Comment to HnText, COMMENT_RE to HN_TEXT_RE, CommentState to CollapseState. Use HnText to represent a HN text (comment/story)

🔄 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/62 **Author:** [@aome510](https://github.com/aome510) **Created:** 1/9/2022 **Status:** ✅ Merged **Merged:** 1/10/2022 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `render-story-text` --- ### 📝 Commits (10+) - [`62b5c7d`](https://github.com/aome510/hackernews-TUI/commit/62b5c7daeaaaf5aa83dd40ade10e111db1d094d4) parse story text - [`d31803c`](https://github.com/aome510/hackernews-TUI/commit/d31803c93bfa411363eff2b40d855426fee126db) rename structs, struct's fields - [`a017249`](https://github.com/aome510/hackernews-TUI/commit/a017249792fd165ca6a5e91aece6853ac7231873) use `HnText` when parsing story and comment's text - [`8cdbe3b`](https://github.com/aome510/hackernews-TUI/commit/8cdbe3b15fdd8368e47f7ddaa8494e12eb172c7c) decode HTML HN text before parsing - [`ff82ba2`](https://github.com/aome510/hackernews-TUI/commit/ff82ba2dc6cfa02b2d561592427e686e4ec55df4) render story text in Comment View (wip) - [`8a8267e`](https://github.com/aome510/hackernews-TUI/commit/8a8267e494eeeed1d3af6847741bd527f3d13499) handle single `<p>` inside the story text - [`638577f`](https://github.com/aome510/hackernews-TUI/commit/638577ff1ea1507fcd3d5af7a31641bed344a6aa) Merge branch 'main' into render-story-text - [`c549363`](https://github.com/aome510/hackernews-TUI/commit/c54936336ff972b5c6d1625b6cf8e05a4e1609cf) update NOTES.org - [`e137976`](https://github.com/aome510/hackernews-TUI/commit/e1379767092c25f2b9842fe55be6bde71b696b42) use level instead of height to represent a comment's depth - [`7afc7cb`](https://github.com/aome510/hackernews-TUI/commit/7afc7cb8e398af4325a4f04ef86210df06c452bd) tweak the documentation wording ### 📊 Changes **4 files changed** (+170 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `NOTES.org` (+10 -2) 📝 `hackernews_tui/src/client/mod.rs` (+3 -3) 📝 `hackernews_tui/src/client/parser.rs` (+109 -54) 📝 `hackernews_tui/src/view/comment_view.rs` (+48 -36) </details> ### 📄 Description ## Brief description of changes - implement story text rendering - use `level` to indicate comment's depth instead of `height` - rename `Comment` to `HnText`, `COMMENT_RE` to `HN_TEXT_RE`, `CommentState` to `CollapseState`. Use `HnText` to represent a HN text (comment/story) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:31:13 +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#84
No description provided.