Commit graph

51 commits

Author SHA1 Message Date
Lim Chee Aun 9921e487e8 Minimum viable Home → Following port 2023-02-08 00:31:46 +08:00
Lim Chee Aun 1357c1b2bd Fix more edge cases after breaking changes 2023-02-06 16:35:03 +08:00
Lim Chee Aun a130743d4c Breaking: refactor all masto API calls
Everything need to be instance-aware!
2023-02-06 00:17:19 +08:00
Lim Chee Aun e0bab6c70a More refactoring work 2023-02-03 21:08:08 +08:00
Lim Chee Aun e95954a7fd Begin work on account-specific store
1. Move boostsCarousel setting to account-specific, sadly no migration from previous setting
2. Cache last notification to prevent keep getting unread notification badge
2023-02-02 17:29:57 +08:00
Lim Chee Aun fa3ee31cd3 Fix #55 2023-02-02 10:30:16 +08:00
Lim Chee Aun bbb3017b2d Quietly handle hashtag links
No follow/unfollow yet.
2023-01-31 19:31:25 +08:00
Lim Chee Aun 969fddc581 Time for use-debounce
Try a leading debounce here
2023-01-30 20:51:06 +08:00
Lim Chee Aun 292186e918 New UI experiment: media modal + status detail page
- Extracted out the media modal and media component from Status
- Use :has CSS selector to do most of the layout work
- Expecting edge case UI bugs
2023-01-29 15:23:53 +08:00
Lim Chee Aun ae37d58826 Fix document.title not working properly 2023-01-29 15:22:16 +08:00
Lim Chee Aun aaeca7dd03 Refactor out a Timeline component
Also replace login() with createClient() for faster log in
2023-01-28 18:52:18 +08:00
Lim Chee Aun 816653e2e6 Add j/k keyboard navigation to status page
At the same time, fix shift+k not working in Home page
2023-01-27 20:54:18 +08:00
Lim Chee Aun e83d128f62 Rewrite Notifications page + experimental fix on getting/showing updates 2023-01-27 11:47:30 +08:00
Lim Chee Aun 4c05692ef5 This account resolving thingie is getting ridiculous 2023-01-22 20:29:48 +08:00
Lim Chee Aun 952f048913 Fix disabling Boosts Carousel not working 2023-01-21 23:36:31 +08:00
Lim Chee Aun baf139762c Scroll start logic should work when overscroll too 2023-01-20 16:05:27 +08:00
Lim Chee Aun e382cad22a Enable Boosts Carousel by default
Fix the logic here
2023-01-17 10:06:19 +08:00
Lim Chee Aun 62a3ba7c5f Bug fixes for boosts carousel + scrolling 2023-01-16 20:32:30 +08:00
Lim Chee Aun e2139399ee New experiment: Boosts Carousel™️ 2023-01-14 19:42:04 +08:00
Lim Chee Aun 71b50382e9 New feature: Unsent Drafts
For now, this only works for unsent unsaved drafts e.g. the browser kill the page without giving the user the chance to discard
2023-01-13 15:30:09 +08:00
Lim Chee Aun dfaec0605a Can re-use the UID as new window target name! 2023-01-11 23:23:49 +08:00
Lim Chee Aun e2b6f2df6a Auto-threadify when open a status page with context 2023-01-11 17:45:37 +08:00
Lim Chee Aun a421406a11 DRY get current Account 2023-01-11 13:28:42 +08:00
Lim Chee Aun 292f337a44 Yes, never forget the reblogs 2023-01-10 22:58:54 +08:00
Lim Chee Aun c4236e6de7 New feature: thread numbering 2023-01-10 19:59:02 +08:00
Lim Chee Aun 13c3b8fa3b Finally DRY this saving status code 2023-01-09 19:11:34 +08:00
Lim Chee Aun 41df88e625 Perf fixes
Turns out, adding an object to states.statuses proxyMap object, re-render ALL statuses
2023-01-07 20:26:23 +08:00
Lim Chee Aun ee9bfe6331 Lots of tiny adjustments 2023-01-07 14:45:04 +08:00
Lim Chee Aun de45a0f9d5 Update useScroll to check distance in threshold instead of pixels 2023-01-05 15:29:11 +08:00
Lim Chee Aun 1f12c53ee1 Refactor textarea and chars count meter
It won't re-render on every key press anymore
2023-01-04 19:03:11 +08:00
Lim Chee Aun 5074716378 Set scroll threshold for up/down
Else it'll be too trippy
2023-01-02 23:16:49 +08:00
Lim Chee Aun 39124ccc70 Add experimental scroll-based effects
- Scroll to top = refresh Home
- Scroll up/down = show/hide header and compose button
- Scroll near bottom = load next statuses
- Move Compose button to only at Home instead of 'App' level
2023-01-02 21:36:24 +08:00
Lim Chee Aun 334584ecef Fix HTML inside code blocks being rendered 2022-12-26 18:04:49 +08:00
Lim Chee Aun fcd29d4bdc Aesthetic changes
- Icon change for "Unlisted"
- Dynamic text size for compose field depending on char count
2022-12-23 21:25:01 +08:00
Lim Chee Aun 31e2196cd6 Safeguard for unknown HTML cases in status content
1. Mark up code blocks first because anything inside code blocks cannot be "enhanced".
2. Set default rejects for elements that don't need to be "enhanced". Not a complete list but best-effort. Probably allowlist works better than blocklist, but some content doesn't even start with any parent nodes.
2022-12-23 09:20:34 +08:00
Lim Chee Aun 1c98433333 Linkify twitter usernames
This is due to some folks cross-posting from Twitter.
2022-12-23 00:40:25 +08:00
Lim Chee Aun 3b6f0f277e Rewrite whole scroll logic for Status page
Handle 3 cases, all written down in comments.

Crossing my fingers 🤞🤞🤞
2022-12-21 18:02:13 +08:00
Lim Chee Aun 39efda9e38 Track spoilers
Turns out I'm using WeakMap wrong
2022-12-20 19:14:50 +08:00
Lim Chee Aun 509c1d971e Return 0 if no html 2022-12-19 17:30:10 +08:00
Lim Chee Aun dc37100442 Refactor Carousel 2022-12-18 22:56:00 +08:00
Lim Chee Aun d0579a57d6 Fix bug when text nodes contain HTML <>
Text nodes don't escape them
2022-12-17 17:24:26 +08:00
Lim Chee Aun 665b908698 Put names into every export 2022-12-16 13:27:04 +08:00
Lim Chee Aun 2ddc1b8005 Better document titles for pop-out compose window 2022-12-15 17:11:15 +08:00
Lim Chee Aun 58860c334c Responsive font size based on content length
The shorter, the larger font-size
2022-12-15 00:41:48 +08:00
Lim Chee Aun e2346bc32a Shift+click to open compose window
- Fixes for closing
- Easier code for checking if can close window
2022-12-13 21:54:16 +08:00
Lim Chee Aun 3e80ee03f3 Simpler code for content enhancement
Also fixed some shortcodes not converted
2022-12-13 20:15:02 +08:00
Lim Chee Aun d32d9c62eb Style backtick inline codes
The tree walker code is generated via Copilot, hope it works
2022-12-12 21:51:59 +08:00
Lim Chee Aun 9c5586e43b This "@" icon for direct-visibility posts is very confusing
Change to the envelope icon for now
2022-12-11 10:56:09 +08:00
Lim Chee Aun 039d4661fb Remove target=_blank from username links
Mobile Safari ignores the click preventDefault and not show the Account popover. Removing target_blank fixes this ignorance

Kinda hacky fix for now
2022-12-11 09:28:02 +08:00
Lim Chee Aun b26f1204c7 Enhance the account note and make sure links open in new window 2022-12-10 19:16:11 +08:00