Commit Graph

110 Commits

Author SHA1 Message Date
Kartik K. Agaram 9ded0ea184 slack: hacky feature to browse thread by url
Doesn't currently support a comment url. That should be easy to fix..
2022-01-17 20:30:09 -08:00
Kartik K. Agaram bf82a57959 slack: update instructions for downloading images 2022-01-16 20:09:44 -08:00
Kartik K. Agaram b10bbc3a51 slack: one more corner case during import 2021-11-09 19:57:53 -08:00
Kartik K. Agaram d253a31828 rename grapheme to code-point-utf8
Longer name, but it doesn't lie. We have no data structure right now for
combining multiple code points. And it makes no sense for the notion of
a grapheme to conflate its Unicode encoding.
2021-11-09 08:12:11 -08:00
Kartik K. Agaram 1ff9dde13b make page-up/page-down smart to hidden items
In the process we eliminate a whole bunch of duplication and give item
navigation a single source of truth.

Page-up isn't quite _identical_ to how it used to be before. Let's see
if it bothers us.
2021-10-09 20:40:17 -07:00
Kartik K. Agaram cd207331dc standardize argument order 2021-10-09 19:40:55 -07:00
Kartik K. Agaram 67f82e3a6e bugfix
new test:
  hit enter, go to thread view, hit enter again, go into thread view again. No crash.

Just bite the bullet and make item-index robust to single-thread tabs.
2021-10-09 19:33:24 -07:00
Kartik K. Agaram bf6cf3bd4b bugfix: skip hidden items when moving cursor
Tests to create when I start creating tests:
  hide an item. Cursor moves to a new item.
  hide an item that's not the bottom-most item, hit down arrow. Cursor moves to a new item.
  hide an item that's not the top-most item, hit up arrow. Cursor moves to a new item.
  hide top-most item. Cursor on new item. Hit up arrow. No change. Scroll down. New item.
  hide bottom-most item. Cursor on new item. Hit down arrow. No change. Scroll up. New item.
  open a thread. Hit down arrow. No crash (item-index not called).
2021-10-09 14:54:35 -07:00
Kartik K. Agaram 78231d4c4b slack: hide threads from the global view
To hide all comments from the same thread as the item at cursor, press
ctrl-h.

To later unhide everything, press ctrl-u.

Currently ctrl-u works by creating a whole new tab (that you can back
out of using Esc). That gives a way to undo it.

Still some rough edges:
  update number of items in view when hiding a thread
  avoid clipping menu in channel view
  undo a single hide without giving up previous ones
2021-10-09 12:35:13 -07:00
Kartik K. Agaram 23fe8b0ae9 slack: start work on hiding single threads 2021-10-09 11:54:34 -07:00
Kartik K. Agaram 527aaaa3ab . 2021-10-09 11:42:49 -07:00
Kartik K. Agaram fc5341e3cb . 2021-10-09 11:24:28 -07:00
Kartik K. Agaram 50d8f9c852 audit remaining calls to render-code-point
By definition that function can't support combining characters.
2021-09-02 16:02:52 -07:00
Kartik K. Agaram 39a6e6f533 slack: start rendering unicode 2021-08-30 20:55:55 -07:00
Kartik K. Agaram 6e05a8fa27 fix bad terminology: grapheme -> code point
Unix text-mode terminals transparently support utf-8 these days, and so
I treat utf-8 sequences (which I call graphemes in Mu) as fundamental.

I then blindly carried over this state of affairs to bare-metal Mu,
where it makes no sense. If you don't have a terminal handling
font-rendering for you, fonts are most often indexed by code points and
not utf-8 sequences.
2021-08-29 22:20:09 -07:00
Kartik K. Agaram 8765064d69 move gap buffer code to top-level
Now that it's been used in a second app without needing any changes.
2021-08-15 21:09:17 -07:00
Kartik K. Agaram 412a68d0c1 minimize repaints when navigating between channels 2021-08-15 04:24:36 -07:00
Kartik K. Agaram 7282b475ae . 2021-08-15 04:22:57 -07:00
Kartik K. Agaram 31ef51d92a correct menu when first entering search mode
Test required.
2021-08-15 04:22:57 -07:00
Kartik K. Agaram 553d2ffc8e .
Make it more obvious that we always do a full repaint if dirty is set.
2021-08-15 04:22:57 -07:00
Kartik K. Agaram 8086b7b603 keep cursor stable when switching to thread view
Test required.
2021-08-15 04:02:42 -07:00
Kartik K. Agaram 6684112972 missing code: selecting a thread in channel view
Test required. And a clean fixture.
2021-08-15 04:02:23 -07:00
Kartik K. Agaram 7d3f2722ff no, we can't just sort lines in the slack archive
Comments contain indices back to the parent. Reordering items completely
messes up the indices.
2021-08-14 19:56:09 -07:00
Kartik K. Agaram ef3881ab5a slack: navigation for thread screens 2021-08-14 18:29:15 -07:00
Kartik K. Agaram bfe3a175be slack: quick 'n' dirty thread screen 2021-08-14 18:02:57 -07:00
Kartik K. Agaram a3ffd93c57 slack: data structures for single-thread view 2021-08-14 17:49:36 -07:00
Kartik K. Agaram 444da164b0 slack: ensure single cursor on screen at any time
This is worth a first test.
2021-08-14 17:20:52 -07:00
Kartik K. Agaram 6c46da31fb slack: delete intra-item cursor state
I don't actually have per-user feeds yet. Just drop the feature for now.
2021-08-14 16:53:14 -07:00
Kartik K. Agaram 48afc51faf slack: menu options for browsing intra-item 2021-08-14 16:29:25 -07:00
Kartik K. Agaram 29b268c359 slack: hacky intra-item cursor
Pretty klunky that it's always on the topmost item. But it gets us
going.
2021-08-14 16:18:44 -07:00
Kartik K. Agaram e531be4d0b slack: introduce state for intra-item cursor 2021-08-14 16:09:54 -07:00
Kartik K. Agaram 576bad403c slack: start rendering cursor on main pane 2021-08-14 15:49:40 -07:00
Kartik K. Agaram e6f893811e . 2021-08-14 15:43:44 -07:00
Kartik K. Agaram 55cac9e7a9 slack: start building a cursor for the main pane
First step: switch to arrow keys for navigating by item.
2021-08-14 15:39:14 -07:00
Kartik K. Agaram 6706c69407 . 2021-08-14 15:32:04 -07:00
Kartik K. Agaram aaf9984039 bug: allow '/' in search 2021-08-14 08:18:30 -07:00
Kartik K. Agaram fc7eb937f3 bug in reusing tabs 2021-08-14 08:16:17 -07:00
Kartik K. Agaram 3b1017dae5 .
Bug in channel view.
2021-08-13 23:06:46 -07:00
Kartik K. Agaram 82a223f58f slack: search cursor handling 2021-08-13 22:53:52 -07:00
Kartik K. Agaram 41b4966961 slack: notify when too many results 2021-08-13 22:53:52 -07:00
Kartik K. Agaram a3559ebcc3 slack: degrade gracefully when too many results 2021-08-13 22:42:47 -07:00
Kartik K. Agaram c02d45e8d4 slack: escaping from search dialog 2021-08-13 22:11:31 -07:00
Kartik K. Agaram 29361ac54e slack: more responsive typing 2021-08-13 22:11:11 -07:00
Kartik K. Agaram daedeb44fd slack: scrolling in search screens 2021-08-13 21:38:44 -07:00
Kartik K. Agaram 75927f3034 . 2021-08-13 21:22:50 -07:00
Kartik K. Agaram 4bf781e86d slack: search 2021-08-13 21:22:25 -07:00
Kartik K. Agaram 3aea1483c9 . 2021-08-13 21:10:59 -07:00
Kartik K. Agaram 7465f6867b this might explain the bug
I think I was just typing with the the status bar outside the display
when it seemed to work. Easy to forget to hit '/' at the start.
Particularly if it seems to work fine.
2021-08-13 20:57:27 -07:00
Kartik K. Agaram 8773d07278 . 2021-08-13 18:44:14 -07:00
Kartik K. Agaram f7087904c0 start saving and restoring search terms with tabs 2021-08-13 18:22:14 -07:00