[PR #75] [MERGED] Code refactor and clean part II #89

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

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/75
Author: @aome510
Created: 5/17/2022
Status: Merged
Merged: 5/21/2022
Merged by: @aome510

Base: mainHead: 22-05-07/code-refactor-and-cleanup-p2


📝 Commits (7)

  • a1b8889 cleanup
  • 724e415 only display application logs
  • dd779e3 move UI initialize code from main to view module
  • 1cd39ea use function instead of macro to construct global story view navigation shortcuts
  • 95d8065 rename view construct functions, add more comments, some cleanups
  • 6ae26c5 use an enum to represent direction
  • b1fb708 cleanup comment collapsing code

📊 Changes

12 files changed (+295 additions, -202 deletions)

View changed files

📝 hackernews_tui/src/client/mod.rs (+1 -2)
📝 hackernews_tui/src/client/parser.rs (+2 -1)
📝 hackernews_tui/src/client/query.rs (+11 -5)
📝 hackernews_tui/src/config/mod.rs (+2 -4)
📝 hackernews_tui/src/main.rs (+6 -102)
📝 hackernews_tui/src/view/article_view.rs (+8 -5)
📝 hackernews_tui/src/view/async_view.rs (+7 -7)
📝 hackernews_tui/src/view/comment_view.rs (+87 -55)
📝 hackernews_tui/src/view/mod.rs (+125 -0)
📝 hackernews_tui/src/view/search_view.rs (+11 -8)
📝 hackernews_tui/src/view/story_view.rs (+34 -12)
📝 hackernews_tui/src/view/utils.rs (+1 -1)

📄 Description

Brief description of changes

  • moved UI initialization codes from main.rs to view::mod.rs
  • updated application's logging level
  • renamed functions, added more comments/code documentations
  • added some code cleanups

🔄 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/75 **Author:** [@aome510](https://github.com/aome510) **Created:** 5/17/2022 **Status:** ✅ Merged **Merged:** 5/21/2022 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `22-05-07/code-refactor-and-cleanup-p2` --- ### 📝 Commits (7) - [`a1b8889`](https://github.com/aome510/hackernews-TUI/commit/a1b888948906a716aa1ca5120b00665c581f0961) cleanup - [`724e415`](https://github.com/aome510/hackernews-TUI/commit/724e415436b530c1bba900a2db657dbc030ac229) only display application logs - [`dd779e3`](https://github.com/aome510/hackernews-TUI/commit/dd779e376ed96c51b7d0fcab8deba7c6fa913cb6) move UI initialize code from `main` to `view` module - [`1cd39ea`](https://github.com/aome510/hackernews-TUI/commit/1cd39ea716af0e5c41e3083a70625b0e9bf7c330) use function instead of macro to construct global story view navigation shortcuts - [`95d8065`](https://github.com/aome510/hackernews-TUI/commit/95d80659e3bd40a435e28001a57702772c792769) rename view construct functions, add more comments, some cleanups - [`6ae26c5`](https://github.com/aome510/hackernews-TUI/commit/6ae26c5c39dcd1b4b3d5a814038c3942da12c5c0) use an enum to represent direction - [`b1fb708`](https://github.com/aome510/hackernews-TUI/commit/b1fb70849d3c7a1ee59673213042690776928520) cleanup comment collapsing code ### 📊 Changes **12 files changed** (+295 additions, -202 deletions) <details> <summary>View changed files</summary> 📝 `hackernews_tui/src/client/mod.rs` (+1 -2) 📝 `hackernews_tui/src/client/parser.rs` (+2 -1) 📝 `hackernews_tui/src/client/query.rs` (+11 -5) 📝 `hackernews_tui/src/config/mod.rs` (+2 -4) 📝 `hackernews_tui/src/main.rs` (+6 -102) 📝 `hackernews_tui/src/view/article_view.rs` (+8 -5) 📝 `hackernews_tui/src/view/async_view.rs` (+7 -7) 📝 `hackernews_tui/src/view/comment_view.rs` (+87 -55) 📝 `hackernews_tui/src/view/mod.rs` (+125 -0) 📝 `hackernews_tui/src/view/search_view.rs` (+11 -8) 📝 `hackernews_tui/src/view/story_view.rs` (+34 -12) 📝 `hackernews_tui/src/view/utils.rs` (+1 -1) </details> ### 📄 Description ## Brief description of changes - moved UI initialization codes from `main.rs` to `view::mod.rs` - updated application's logging level - renamed functions, added more comments/code documentations - added some code cleanups --- <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:29 +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#89
No description provided.