mirror of
https://github.com/aome510/hackernews-TUI.git
synced 2026-04-26 09:25:56 +03:00
[PR #72] [MERGED] Refactor link handler codes #88
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hackernews-TUI#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/aome510/hackernews-TUI/pull/72
Author: @aome510
Created: 5/2/2022
Status: ✅ Merged
Merged: 5/3/2022
Merged by: @aome510
Base:
main← Head:impl-view-traits-2📝 Commits (10+)
66ee553separatecrate::utilsandcrate::view::utils098aa40add utils functions to open ith link in browser/article view88a1f4eaddLinkDialogad59d65add link dialog keymap andopen_link_dialogcommand0b7bd6aremove redundant filesc76fd28update link commands' keybindings in each viewac5327emove event callbacks constructing code toget_comment_main_viewfunction8c84b3faddlink_dialog.rs4628784cleanupOnEventViewconstruct codesda6c968updatehelp_view📊 Changes
18 files changed (+445 additions, -371 deletions)
View changed files
📝
.gitignore(+1 -1)📝
README.md(+53 -52)📝
examples/hn-tui.toml(+15 -9)📝
hackernews_tui/src/client/parser.rs(+19 -0)📝
hackernews_tui/src/client/query.rs(+1 -1)📝
hackernews_tui/src/config/keybindings.rs(+36 -12)📝
hackernews_tui/src/prelude.rs(+1 -1)📝
hackernews_tui/src/utils.rs(+0 -73)📝
hackernews_tui/src/view/article_view.rs(+16 -87)📝
hackernews_tui/src/view/async_view.rs(+2 -2)📝
hackernews_tui/src/view/comment_view.rs(+41 -74)📝
hackernews_tui/src/view/error_view.rs(+1 -1)📝
hackernews_tui/src/view/help_view.rs(+46 -37)➕
hackernews_tui/src/view/link_dialog.rs(+100 -0)📝
hackernews_tui/src/view/mod.rs(+2 -0)📝
hackernews_tui/src/view/search_view.rs(+5 -4)📝
hackernews_tui/src/view/story_view.rs(+13 -17)➕
hackernews_tui/src/view/utils.rs(+93 -0)📄 Description
Brief description of changes
REAMDEview::utils.rsto separateviewutils with general util functions defined inutils.rsviewmoduleLinkDialogstruct (along with traits, keymaps, etc)on_eventtoon_pre_eventto handle the events before its children receive the eventsopen_article_in_browserwhen the story doesn't have linked article: fallback toopen_story_in_browserBreaking changes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
url_open_command#95