hyperlist 1.5.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/hyperlist +78 -38
- data/hyperlist.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d21f62ca7a02ec79a5b845d35afe4ba4ce0c28083ae2cac61c0857375e63f73c
|
4
|
+
data.tar.gz: 4af367432d5a1037d3dabf5fa84f5afe4f1eb1ad9b9d2f56fca21523efb3ba73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00dad920e90a26a443ae81ab3e241e788f3494142aaff21105cc477d21d14cde22515aeb036ccec1647b74a22c9386505dd30e8aa02209ef19a1efd0f1cf2e1c
|
7
|
+
data.tar.gz: ad4d36624c61337c243fdf43fcfc0e7b55be57d0870dd5328fa7de76c60ad914c6b100615e92db961d5b653fa3df17bce3286466442cd5c923997f0ac5e2afc1
|
data/CHANGELOG.md
CHANGED
@@ -2,11 +2,22 @@
|
|
2
2
|
|
3
3
|
All notable changes to the HyperList Ruby TUI will be documented in this file.
|
4
4
|
|
5
|
+
## [1.6.0] - 2025-09-18
|
6
|
+
|
7
|
+
### BREAKING CHANGES
|
8
|
+
- **Complete reassignment of arrow key functionality**
|
9
|
+
- **RIGHT key**: Now uncollapses items (if collapsed)
|
10
|
+
- **LEFT key**: Now collapses items (if they have children)
|
11
|
+
- **TAB key**: Takes over old RIGHT key functionality (indent right)
|
12
|
+
- **S-TAB key**: Takes over old LEFT key functionality (indent left)
|
13
|
+
- This provides more intuitive navigation where arrow keys control visibility and TAB keys control indentation
|
14
|
+
- Updated help documentation to reflect new key mappings
|
15
|
+
|
5
16
|
## [1.5.2] - 2025-09-18
|
6
17
|
|
7
18
|
### Enhanced
|
8
19
|
- **Smart movement behavior for collapsed items**
|
9
|
-
- LEFT/RIGHT arrow keys
|
20
|
+
- LEFT/RIGHT arrow keys move collapsed trees as a unit when item is folded
|
10
21
|
- Uncollapsed items move individually (only the current item)
|
11
22
|
- Maintains "move what's visible" principle for intuitive navigation
|
12
23
|
- Works in both normal and split-view modes
|
data/hyperlist
CHANGED
@@ -72,7 +72,7 @@ class HyperListApp
|
|
72
72
|
include Rcurses::Input
|
73
73
|
include Rcurses::Cursor
|
74
74
|
|
75
|
-
VERSION = "1.
|
75
|
+
VERSION = "1.6.0"
|
76
76
|
|
77
77
|
def initialize(filename = nil)
|
78
78
|
@filename = filename ? File.expand_path(filename) : nil
|
@@ -1733,7 +1733,61 @@ class HyperListApp
|
|
1733
1733
|
end
|
1734
1734
|
end
|
1735
1735
|
end
|
1736
|
-
|
1736
|
+
|
1737
|
+
def collapse_item
|
1738
|
+
if @split_view && @active_pane == :split
|
1739
|
+
# Handle collapse in split pane
|
1740
|
+
visible_items = get_visible_split_items
|
1741
|
+
return if @split_current >= visible_items.length
|
1742
|
+
|
1743
|
+
item = visible_items[@split_current]
|
1744
|
+
real_idx = @split_items.index(item)
|
1745
|
+
|
1746
|
+
if real_idx && has_children_in_array?(real_idx, @split_items) && !item["fold"]
|
1747
|
+
item["fold"] = true
|
1748
|
+
end
|
1749
|
+
else
|
1750
|
+
# Handle collapse in main pane
|
1751
|
+
visible = get_visible_items
|
1752
|
+
return if @current >= visible.length
|
1753
|
+
|
1754
|
+
item = visible[@current]
|
1755
|
+
real_idx = get_real_index(item)
|
1756
|
+
|
1757
|
+
if real_idx && has_children?(real_idx, @items) && !@items[real_idx]["fold"]
|
1758
|
+
@items[real_idx]["fold"] = true
|
1759
|
+
record_last_action(:toggle_fold, nil)
|
1760
|
+
end
|
1761
|
+
end
|
1762
|
+
end
|
1763
|
+
|
1764
|
+
def uncollapse_item
|
1765
|
+
if @split_view && @active_pane == :split
|
1766
|
+
# Handle uncollapse in split pane
|
1767
|
+
visible_items = get_visible_split_items
|
1768
|
+
return if @split_current >= visible_items.length
|
1769
|
+
|
1770
|
+
item = visible_items[@split_current]
|
1771
|
+
real_idx = @split_items.index(item)
|
1772
|
+
|
1773
|
+
if real_idx && has_children_in_array?(real_idx, @split_items) && item["fold"]
|
1774
|
+
item["fold"] = false
|
1775
|
+
end
|
1776
|
+
else
|
1777
|
+
# Handle uncollapse in main pane
|
1778
|
+
visible = get_visible_items
|
1779
|
+
return if @current >= visible.length
|
1780
|
+
|
1781
|
+
item = visible[@current]
|
1782
|
+
real_idx = get_real_index(item)
|
1783
|
+
|
1784
|
+
if real_idx && has_children?(real_idx, @items) && @items[real_idx]["fold"]
|
1785
|
+
@items[real_idx]["fold"] = false
|
1786
|
+
record_last_action(:toggle_fold, nil)
|
1787
|
+
end
|
1788
|
+
end
|
1789
|
+
end
|
1790
|
+
|
1737
1791
|
def move_up
|
1738
1792
|
if @presentation_mode
|
1739
1793
|
# In presentation mode, we need to handle navigation differently
|
@@ -3014,8 +3068,8 @@ class HyperListApp
|
|
3014
3068
|
help_lines << help_line("#{"r".fg("10")}" + ", ".fg("10") + "#{"C-R".fg("10")}", "Redo")
|
3015
3069
|
help_lines << help_line("#{"S-UP".fg("10")}", "Move item up", "#{"S-DOWN".fg("10")}", "Move item down")
|
3016
3070
|
help_lines << help_line("#{"C-UP".fg("10")}", "Move item&descendants up", "#{"C-DOWN".fg("10")}", "Move item&descendants down")
|
3071
|
+
help_lines << help_line("#{"→".fg("10")}", "Uncollapse item", "#{"←".fg("10")}", "Collapse item")
|
3017
3072
|
help_lines << help_line("#{"Tab".fg("10")}", "Indent item+kids", "#{"S-Tab".fg("10")}", "Unindent item+kids")
|
3018
|
-
help_lines << help_line("#{"→".fg("10")}", "Indent item only", "#{"←".fg("10")}", "Unindent item only")
|
3019
3073
|
help_lines << ""
|
3020
3074
|
help_lines << "#{"SPECIAL FEATURES".fg("14")}"
|
3021
3075
|
help_lines << help_line("#{"v".fg("10")}", "Toggle checkbox", "#{"V".fg("10")}", "Checkbox with date")
|
@@ -4895,33 +4949,27 @@ class HyperListApp
|
|
4895
4949
|
when "V"
|
4896
4950
|
toggle_checkbox_with_date
|
4897
4951
|
when "TAB"
|
4898
|
-
|
4899
|
-
indent_split_right(true) # with children
|
4900
|
-
else
|
4901
|
-
indent_right(true) # with children
|
4902
|
-
end
|
4903
|
-
when "S-TAB"
|
4904
|
-
if @split_view && @active_pane == :split
|
4905
|
-
indent_split_left(true) # with children
|
4906
|
-
else
|
4907
|
-
indent_left(true) # with children
|
4908
|
-
end
|
4909
|
-
when "RIGHT"
|
4910
|
-
# Move collapsed trees as a unit, but only the item if uncollapsed
|
4952
|
+
# Indent with move conditions (moved from RIGHT key)
|
4911
4953
|
should_move_children = should_move_with_children?
|
4912
4954
|
if @split_view && @active_pane == :split
|
4913
4955
|
indent_split_right(should_move_children)
|
4914
4956
|
else
|
4915
4957
|
indent_right(should_move_children)
|
4916
4958
|
end
|
4917
|
-
when "
|
4918
|
-
#
|
4959
|
+
when "S-TAB"
|
4960
|
+
# Unindent with move conditions (moved from LEFT key)
|
4919
4961
|
should_move_children = should_move_with_children?
|
4920
4962
|
if @split_view && @active_pane == :split
|
4921
4963
|
indent_split_left(should_move_children)
|
4922
4964
|
else
|
4923
4965
|
indent_left(should_move_children)
|
4924
4966
|
end
|
4967
|
+
when "RIGHT"
|
4968
|
+
# Uncollapse item if it is collapsed
|
4969
|
+
uncollapse_item
|
4970
|
+
when "LEFT"
|
4971
|
+
# Collapse item if it has children
|
4972
|
+
collapse_item
|
4925
4973
|
when " "
|
4926
4974
|
toggle_fold
|
4927
4975
|
when "u"
|
@@ -5709,21 +5757,11 @@ class HyperListApp
|
|
5709
5757
|
when "l"
|
5710
5758
|
go_to_first_child
|
5711
5759
|
when "LEFT"
|
5712
|
-
#
|
5713
|
-
|
5714
|
-
if @split_view && @active_pane == :split
|
5715
|
-
indent_split_left(should_move_children)
|
5716
|
-
else
|
5717
|
-
indent_left(should_move_children)
|
5718
|
-
end
|
5760
|
+
# Collapse item if it has children
|
5761
|
+
collapse_item
|
5719
5762
|
when "RIGHT"
|
5720
|
-
#
|
5721
|
-
|
5722
|
-
if @split_view && @active_pane == :split
|
5723
|
-
indent_split_right(should_move_children)
|
5724
|
-
else
|
5725
|
-
indent_right(should_move_children)
|
5726
|
-
end
|
5763
|
+
# Uncollapse item if it is collapsed
|
5764
|
+
uncollapse_item
|
5727
5765
|
when "PgUP" # Page Up
|
5728
5766
|
page_up
|
5729
5767
|
when "PgDOWN" # Page Down
|
@@ -5868,11 +5906,12 @@ class HyperListApp
|
|
5868
5906
|
# In presentation mode, Tab goes to next sibling
|
5869
5907
|
jump_to_next_sibling
|
5870
5908
|
else
|
5871
|
-
# Normal mode: Indent with
|
5909
|
+
# Normal mode: Indent with move conditions (moved from RIGHT key)
|
5910
|
+
should_move_children = should_move_with_children?
|
5872
5911
|
if @split_view && @active_pane == :split
|
5873
|
-
indent_split_right(
|
5912
|
+
indent_split_right(should_move_children)
|
5874
5913
|
else
|
5875
|
-
indent_right(
|
5914
|
+
indent_right(should_move_children)
|
5876
5915
|
end
|
5877
5916
|
end
|
5878
5917
|
when "S-TAB" # Shift-Tab
|
@@ -5880,11 +5919,12 @@ class HyperListApp
|
|
5880
5919
|
# In presentation mode, Shift-Tab goes to previous sibling
|
5881
5920
|
jump_to_prev_sibling
|
5882
5921
|
else
|
5883
|
-
# Normal mode: Unindent with
|
5922
|
+
# Normal mode: Unindent with move conditions (moved from LEFT key)
|
5923
|
+
should_move_children = should_move_with_children?
|
5884
5924
|
if @split_view && @active_pane == :split
|
5885
|
-
indent_split_left(
|
5925
|
+
indent_split_left(should_move_children)
|
5886
5926
|
else
|
5887
|
-
indent_left(
|
5927
|
+
indent_left(should_move_children)
|
5888
5928
|
end
|
5889
5929
|
end
|
5890
5930
|
when "u"
|
data/hyperlist.gemspec
CHANGED