[PR #55] [MERGED] Tweak application UI #74

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

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/55
Author: @aome510
Created: 12/15/2021
Status: Merged
Merged: 12/16/2021
Merged by: @aome510

Base: mainHead: tweak-app-UI


📝 Commits (10+)

  • d0fa730 re-design the StoryView to make it look like original HN
  • b957919 implement a title bar for story view
  • 83295c4 change default shortcuts the switch story views by tags to F{1-5}
  • 9d85612 tweak padding, add YCom logo to the story view's title bar
  • 863fa4c add foreground color for link_id and matched_highlight component styles
  • 49a8d3c add unicode-width
  • d1bf990 implement padding support for view::text_view::TextView
  • 577171d add block padding (with colors) for CommentView components
  • 26ee1e9 tweak the application palette's and components' colors
  • 549d2cb implement a custom loading animation function

📊 Changes

14 files changed (+369 additions, -105 deletions)

View changed files

📝 Cargo.lock (+1 -0)
📝 hackernews_tui/Cargo.toml (+1 -0)
📝 hackernews_tui/src/client/mod.rs (+2 -0)
📝 hackernews_tui/src/client/parser.rs (+28 -19)
📝 hackernews_tui/src/config/keybindings.rs (+5 -5)
📝 hackernews_tui/src/config/mod.rs (+2 -0)
📝 hackernews_tui/src/config/theme.rs (+93 -33)
📝 hackernews_tui/src/main.rs (+2 -0)
📝 hackernews_tui/src/utils.rs (+16 -20)
📝 hackernews_tui/src/view/async_view.rs (+42 -1)
📝 hackernews_tui/src/view/comment_view.rs (+18 -3)
📝 hackernews_tui/src/view/help_view.rs (+5 -2)
📝 hackernews_tui/src/view/story_view.rs (+73 -18)
📝 hackernews_tui/src/view/text_view.rs (+81 -4)

📄 Description

Brief description of changes

StoryView

  • re-design the StoryView to make it look like HN webpage
  • add a title bar for StoryView inspired by HN title bar

New StoryView:
Screen Shot 2021-12-16 at 2 53 31 PM

CommentView

  • add top padding with '▔' for top comments
  • add left padding with '▎' for child comments

New CommentView:
Screen Shot 2021-12-16 at 2 57 05 PM

Loading screen

  • implement custom loading screens, including
    • pacman loading screen (default - use use_pacman_loading config option to configure)
    • async_loading_view-based loading screen with custom colors

New loading screen (pacman):
Screen Recording 2021-12-16 at 2 58 39 PM

General

  • tweak application default color palette
  • add more component styles
  • change config::ColorStyle to config::Style and allow to specify at most one Effect per Style
  • add top,left padding (a padding character with color) support for view::text_view::TextView

Breaking changes

  • change the default shortcuts for switching story views by tags from:
    • front_page: C-f to F1
    • story: C-z to F2
    • ask_hn: C-x to F3
    • show_hn: C-c to F4
    • ask_hn: C-v to F5

🔄 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/55 **Author:** [@aome510](https://github.com/aome510) **Created:** 12/15/2021 **Status:** ✅ Merged **Merged:** 12/16/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `tweak-app-UI` --- ### 📝 Commits (10+) - [`d0fa730`](https://github.com/aome510/hackernews-TUI/commit/d0fa730af741e5c79b2be2065f26f827d1c89860) re-design the `StoryView` to make it look like original HN - [`b957919`](https://github.com/aome510/hackernews-TUI/commit/b9579194ea2d768a94d51e34cae1f2aa9f02b1a6) implement a title bar for story view - [`83295c4`](https://github.com/aome510/hackernews-TUI/commit/83295c486b9aae36c4eebbd66cb4d738c60e1cd4) change default shortcuts the switch story views by tags to `F{1-5}` - [`9d85612`](https://github.com/aome510/hackernews-TUI/commit/9d85612abda543510dc660570644f6357ee8eb81) tweak padding, add YCom logo to the story view's title bar - [`863fa4c`](https://github.com/aome510/hackernews-TUI/commit/863fa4cdc15ded5dfb4bf0574aa0be054580e08e) add foreground color for `link_id` and `matched_highlight` component styles - [`49a8d3c`](https://github.com/aome510/hackernews-TUI/commit/49a8d3cb77a292718c77b38649eb1fe556862056) add `unicode-width` - [`d1bf990`](https://github.com/aome510/hackernews-TUI/commit/d1bf990e03be8c714824b4594e3512a29875ecf6) implement padding support for `view::text_view::TextView` - [`577171d`](https://github.com/aome510/hackernews-TUI/commit/577171dad4ca4b881dcc1ed31ef586871303bad4) add block padding (with colors) for `CommentView` components - [`26ee1e9`](https://github.com/aome510/hackernews-TUI/commit/26ee1e9d5463923e768111969f97acf234b67430) tweak the application palette's and components' colors - [`549d2cb`](https://github.com/aome510/hackernews-TUI/commit/549d2cbe1a20a86792f983a6748f3fe46ec66471) implement a custom loading animation function ### 📊 Changes **14 files changed** (+369 additions, -105 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+1 -0) 📝 `hackernews_tui/Cargo.toml` (+1 -0) 📝 `hackernews_tui/src/client/mod.rs` (+2 -0) 📝 `hackernews_tui/src/client/parser.rs` (+28 -19) 📝 `hackernews_tui/src/config/keybindings.rs` (+5 -5) 📝 `hackernews_tui/src/config/mod.rs` (+2 -0) 📝 `hackernews_tui/src/config/theme.rs` (+93 -33) 📝 `hackernews_tui/src/main.rs` (+2 -0) 📝 `hackernews_tui/src/utils.rs` (+16 -20) 📝 `hackernews_tui/src/view/async_view.rs` (+42 -1) 📝 `hackernews_tui/src/view/comment_view.rs` (+18 -3) 📝 `hackernews_tui/src/view/help_view.rs` (+5 -2) 📝 `hackernews_tui/src/view/story_view.rs` (+73 -18) 📝 `hackernews_tui/src/view/text_view.rs` (+81 -4) </details> ### 📄 Description ## Brief description of changes ### `StoryView` - re-design the `StoryView` to make it look like HN webpage - add a title bar for `StoryView` inspired by HN title bar New `StoryView`: <img width="1249" alt="Screen Shot 2021-12-16 at 2 53 31 PM" src="https://user-images.githubusercontent.com/40011582/146440085-284ba4eb-a5ce-4d6c-8a68-01a14b4fcf26.png"> ### `CommentView` - add top padding with '▔' for top comments - add left padding with '▎' for child comments New `CommentView`: <img width="1419" alt="Screen Shot 2021-12-16 at 2 57 05 PM" src="https://user-images.githubusercontent.com/40011582/146440574-439e39e8-6f40-4a57-8e50-5a97c2c04a5f.png"> ### Loading screen - implement custom loading screens, including + pacman loading screen (default - use `use_pacman_loading` config option to configure) + `async_loading_view`-based loading screen with custom colors New loading screen (pacman): ![Screen Recording 2021-12-16 at 2 58 39 PM](https://user-images.githubusercontent.com/40011582/146441059-d1acb707-792e-4d24-8e74-50c5da35ee69.gif) ### General - tweak application default color palette - add more component styles - change `config::ColorStyle` to `config::Style` and allow to specify at most one `Effect` per `Style` - add top,left padding (a padding character with color) support for `view::text_view::TextView` ### Breaking changes - change the default shortcuts for switching story views by tags from: - `front_page`: `C-f` to `F1` - `story`: `C-z` to `F2` - `ask_hn`: `C-x` to `F3` - `show_hn`: `C-c` to `F4` - `ask_hn`: `C-v` to `F5` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:30:40 +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#74
No description provided.