Commit graph

105 commits

Author SHA1 Message Date
Lim Chee Aun
cab06ae936 Further simplify the scrolling logic in Status page
Previous code is too darn complicated and doesn't work in async cases
e.g. user scrolled while the status is loading
2023-01-09 16:56:16 +08:00
Lim Chee Aun
600edbee5d Might as well make my own link open up the Account modal 2023-01-07 21:43:56 +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
ac557e1271 Delete cache in SW before reloading status page
Seems kinda hacky… probably might cause new side effects
2023-01-06 21:29:16 +08:00
Lim Chee Aun
fffc8cc983 Further grouping of notifications 2023-01-06 12:51:53 +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
04ccf8aca9 Replace @github/relative-time-element with dayjs 2023-01-05 10:50:27 +08:00
Lim Chee Aun
8e19d098eb Test add this condition to see how it works 2023-01-04 17:12:44 +08:00
Lim Chee Aun
b0271c50ae Fix forgot to put back the fake <li> 2023-01-03 00:56:11 +08:00
Lim Chee Aun
dbf9c22ea5 Less obstrusive "New posts" 2023-01-03 00:52:16 +08:00
Lim Chee Aun
d15b1fe03e Fix route() actually not working 2023-01-03 00:48:36 +08:00
Lim Chee Aun
9ea941368d More fixes 2023-01-03 00:27:47 +08:00
Lim Chee Aun
d235f56cff Always clear 'new' when load from beginning 2023-01-02 23:19:12 +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
44f179a69f Beautify notifications slightly 2023-01-02 14:42:28 +08:00
Lim Chee Aun
8099fedf82 Don't store instances list inside JS bundle 2023-01-01 21:02:06 +08:00
Lim Chee Aun
727b944f3b toLowerCase() all the instance URLs! 2023-01-01 20:59:55 +08:00
Lim Chee Aun
bfaefbe178 Disable autocapitalize on input field
And disable a bunch of others too
2023-01-01 20:53:40 +08:00
Lim Chee Aun
d2d8571b3f Fix updates button got cut off in larger viewport 2023-01-01 19:24:08 +08:00
Lim Chee Aun
b62cff4d0e Different gradient for welcome 2023-01-01 17:19:07 +08:00
Lim Chee Aun
2031e88d87 Better handling of failures
Some mastodon instances are getting hit hard
2023-01-01 15:28:07 +08:00
Lim Chee Aun
842db90f9c Handle context API call fail error 2023-01-01 12:02:11 +08:00
Lim Chee Aun
ac91dc7983 Make this manual opt-in 2023-01-01 08:51:56 +08:00
Lim Chee Aun
895602e446 Gosh this need to be low threshold
It's actually % of the full height of the element. So if the status is super long (100K chars), it'll never be 0.25
2022-12-31 23:58:48 +08:00
Lim Chee Aun
b12b0c588d Experimental j,k,o,esc,backspace shortcuts 2022-12-31 09:52:31 +08:00
Lim Chee Aun
c0234dd26e Add focus for notification block too 2022-12-30 23:08:55 +08:00
Lim Chee Aun
d605fc6ebe Fix missing border 2022-12-30 20:39:27 +08:00
Lim Chee Aun
9201f7a118 First step in making things focusable 2022-12-30 20:37:57 +08:00
Lim Chee Aun
123d2469f6 Don't show hero pointer when loading 2022-12-30 13:26:05 +08:00
Lim Chee Aun
3338c49c25 Fix threshold for larger-than-viewport statuses 2022-12-29 16:15:58 +08:00
Lim Chee Aun
5804ddbdb9 Add all the focuses 2022-12-29 16:11:58 +08:00
Lim Chee Aun
bdcefb1ab0 Add a nice pointer 2022-12-29 11:47:10 +08:00
Lim Chee Aun
353c911232 Temporarily disable this now 2022-12-29 10:27:36 +08:00
Lim Chee Aun
7e3733d79e Delay hero status fetch if already cached
The context call is more important
2022-12-28 18:06:05 +08:00
Lim Chee Aun
2dca345818 More breathing space after the negative top margin hack 2022-12-28 00:24:36 +08:00
Lim Chee Aun
e7cff25337 Fix wrong logic for silent fail
Some mastodon instances are getting swamped
2022-12-27 21:30:18 +08:00
Lim Chee Aun
fb88129ae7 Check for ref before access scrollTop 2022-12-27 09:05:45 +08:00
Lim Chee Aun
6da4834b71 Change back to limit 1
Sometimes, there's really just one new status update.
2022-12-26 01:09:53 +08:00
Lim Chee Aun
c75bf36345 Try dblclick for reloading
Not sure if this'll work on touch-based devices. Also good for debugging.
2022-12-25 23:53:18 +08:00
Lim Chee Aun
86f38ee3b8 Fix Account sheet relationship check not working when clicking from Settings page
This is because accounts from different instances have different IDs!

They're NOT unique cross-instance. So while on one instance, cannot use the account ID of the other instance to query for relationship because the ID doesn't exist on *current* instance.
2022-12-25 23:31:50 +08:00
Lim Chee Aun
318c2aeffc Upgrade masto.js to V5
- Fix all breaking changes
- Have to manual remove null/undefined values before creating statuses
- Have to recreate iterator instance if start from scratch because can't pass args in next()
2022-12-25 23:28:55 +08:00
Lim Chee Aun
cf4fbc8553 Make sheet have header and body section 2022-12-25 18:01:01 +08:00
Lim Chee Aun
ec67811823 Smart status heading + tap to scroll to hero status
I'll probably need to componentize relative-time, it's getting not DRY
2022-12-24 22:26:43 +08:00
Lim Chee Aun
8eec844781 Scroll-to-top for Notifications 2022-12-24 17:54:42 +08:00
Lim Chee Aun
42fa30d8f8 Move the onVisibilityChange API check to app.jsx
Doesn't make sense to make it part of Home. Also add in Notifications check.
2022-12-24 10:26:05 +08:00
Lim Chee Aun
f8fac1294b Fixes & adjustments to statuses in Status page 2022-12-24 01:11:11 +08:00
Lim Chee Aun
dd99d186bf Add one more case for scrolling 2022-12-23 23:42:41 +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
a2e55eca90 Make fetches concurrent 2022-12-23 12:30:49 +08:00