Commit graph

1820 commits

Author SHA1 Message Date
Lim Chee Aun 372e86415b Test fix scroll position when opening media on the side 2023-10-27 14:16:38 +08:00
Lim Chee Aun 6dd6e0e77c Refactor some components/callbacks 2023-10-27 14:15:29 +08:00
Lim Chee Aun c022e2fd00 Make filter bar expandable 2023-10-27 00:58:42 +08:00
Lim Chee Aun 713865a094 Revert "Let's prettify all paragraphs"
This reverts commit 4897847601.
2023-10-27 00:58:12 +08:00
Lim Chee Aun 0678366566 Fix focus style not working for news' images 2023-10-27 00:01:32 +08:00
Lim Chee Aun b6d8c46e2c Remove console log 2023-10-26 21:29:39 +08:00
Lim Chee Aun 065add5575 Fix account sheet's <main> uses safe-area padding bottom 2023-10-26 21:28:25 +08:00
Lim Chee Aun 35dced8eaf Disable search results pagination if not authenticated 2023-10-26 17:39:10 +08:00
Lim Chee Aun 2310664065 Make nested status link background more consistent 2023-10-26 17:14:43 +08:00
Lim Chee Aun 8858ce3e89 Prevent accidental browser history nav
When scrolling inside deeply nested comments
2023-10-26 17:05:37 +08:00
Lim Chee Aun 1c87dd6e41 Check for reload cases too
Prevent status page from going full width when reloading itself

This checks tab's history length, so opening status page on a new tab means
length = 1.

BUT this will fail if someone copies the link and paste to another
**existing** tab with existing pre-populated history.
2023-10-26 11:42:44 +08:00
Lim Chee Aun 0038c2225b Fix 1 more esc clash 2023-10-26 11:16:34 +08:00
Lim Chee Aun c35f4bb161 Replace old media alt modal with global one 2023-10-26 02:49:03 +08:00
Lim Chee Aun 8426a011b0 Also fix esc handling media alt modal in media modal 2023-10-26 02:48:36 +08:00
Lim Chee Aun 81644e67bb Fix 'esc' closes both modal and status page 2023-10-26 02:19:01 +08:00
Lim Chee Aun c03f39b10c Fix media alt modal not esc-able 2023-10-26 02:18:39 +08:00
Lim Chee Aun a1b81562db Prevent undefined css variables 2023-10-25 20:22:58 +08:00
Lim Chee Aun c82ccf5957 Has to be darker 2023-10-25 20:01:02 +08:00
Lim Chee Aun 8ee1c3a2e3 Reuse color utils for media modal background 2023-10-25 19:19:07 +08:00
Lim Chee Aun 5d5ab906ba Further robustify trending news
- Convert back to RGB for max compat
- Better variable names
- Add fallback if there's no blurhash
- Refactor color utils
- Use alpha instead of light/dark colors
2023-10-25 19:18:47 +08:00
Lim Chee Aun 3a32cbf974 Test full width for first load of status page 2023-10-25 17:07:00 +08:00
Lim Chee Aun b9afe4fb66 s/Favourite/Like
Poll: https://mastodon.social/@cheeaun/111272668719225402
2023-10-25 13:55:12 +08:00
Lim Chee Aun a192554b8b Test overflow-anchor: auto 2023-10-25 13:35:20 +08:00
Lim Chee Aun c2ba149563 Fix undefined variable 2023-10-25 11:17:02 +08:00
Lim Chee Aun 163ef4ce91 Use 'none' instead
Never thought 'none' would actually do something instead of nothing
2023-10-25 01:14:15 +08:00
Lim Chee Aun beff01c976 Rearrange lingva translate instances
Seems like a lot are 500-ing. May need to find alternatives soon.
2023-10-25 00:14:26 +08:00
Lim Chee Aun f19326528b Fix fetch doesn't throw error when 500 2023-10-25 00:13:42 +08:00
Lim Chee Aun 05ee27e045 Time to remove this auto-shrink text effect in composer
It was fun…
2023-10-24 23:23:51 +08:00
Lim Chee Aun 576dcf7701 Realign some code and UI for account info/sheet
I know, the code is still messy
2023-10-24 23:19:14 +08:00
Lim Chee Aun 0247c041f2 Fix composer not opening for Pleroma instances
Pleroma doesn't have `configuration` in instance API response
2023-10-24 14:30:50 +08:00
Lim Chee Aun 7555bda8e9 Waited wayy too long for Firefox to support :has 2023-10-24 09:58:41 +08:00
Lim Chee Aun 61756fac1d Fix unneccesary re-renders in Notifications 2023-10-23 16:24:30 +08:00
Lim Chee Aun 4897847601 Let's prettify all paragraphs 2023-10-23 16:23:45 +08:00
Lim Chee Aun 8bf3f31056 Slight rewrite, possibly breaking 2023-10-23 16:23:33 +08:00
Lim Chee Aun f2c2983663 Comment out test code 2023-10-23 11:12:28 +08:00
Lim Chee Aun 2c4dd0cdb7 Add lang & dir to trending news 2023-10-23 11:12:15 +08:00
Lim Chee Aun 58d36d2403 Filter links by type 2023-10-23 08:55:22 +08:00
Lim Chee Aun 72842c663a Change from "Build" to "Version"
Also make version string copy-able
2023-10-23 08:43:27 +08:00
Lim Chee Aun 8d694ecf1b Experiment useAutoAnimate 2023-10-23 08:42:40 +08:00
Lim Chee Aun cafadd0980 More fixes for Trending news 2023-10-23 01:36:32 +08:00
Lim Chee Aun 3a1341fb17 Always sort list of Lists 2023-10-22 23:25:25 +08:00
Lim Chee Aun ced30a9602 Fix default tag always wrong location
Feel so dumb looking back at this code lol
2023-10-22 23:09:38 +08:00
Lim Chee Aun 4e53b1e17f Need lazy loading 2023-10-22 20:08:19 +08:00
Lim Chee Aun 1c5453cfb6 Trending news carousel 2023-10-22 19:40:46 +08:00
Lim Chee Aun e7ef20f265 Reuse context menu component for Status
This might be buggy
2023-10-22 19:27:15 +08:00
Lim Chee Aun 9c4252315a Debounce checks, less noisy 2023-10-22 19:26:41 +08:00
Lim Chee Aun 2149c4c35a Toast need centered text 2023-10-22 19:25:36 +08:00
Lim Chee Aun 18b00f7b28 Fix link useTitle showing errors 2023-10-22 19:25:22 +08:00
Lim Chee Aun a6cdd0a01a Memo for shorcuts 2023-10-22 19:24:59 +08:00
Lim Chee Aun ddc8c1e9d9 Compact status need private-mention style if it is 2023-10-21 23:05:32 +08:00
Lim Chee Aun 0d4303861a Auto-set new notification as false
It means it's read from other tabs or devices

So, so cool.
2023-10-21 18:49:39 +08:00
Lim Chee Aun a222828306 Need InView for show more button in Notifications page 2023-10-21 17:54:10 +08:00
Lim Chee Aun 5850485207 Refactor some code 2023-10-21 17:40:03 +08:00
Lim Chee Aun 839647bee7 Better contrast for outer close button 2023-10-21 15:30:38 +08:00
Lim Chee Aun 749d6880b8 Experiment making idle detection global
Hooks are nice but it makes component re-render unnecessarily

Also, idle detection doesn't need to be per-component.
2023-10-21 12:26:28 +08:00
Lim Chee Aun 5a616633c6 Make sure month params don't run if invalid 2023-10-21 12:21:51 +08:00
Lim Chee Aun 47c2efacfb Experiment memoizing avatars 2023-10-21 12:21:05 +08:00
Lim Chee Aun 4c4e89ac9d Contain the overscroll behavior in notifications popover 2023-10-20 23:11:26 +08:00
Lim Chee Aun 4da968df2e Fix avatars not bunching properly 2023-10-20 22:10:55 +08:00
Lim Chee Aun c6f368ac0b Make sure the calendar picker works in dark mode 2023-10-20 22:04:56 +08:00
Lim Chee Aun 87e243ea58 Make scrolling work inside filter bar 2023-10-20 22:00:56 +08:00
Lim Chee Aun 66f9c3b918 Fix async/await 2023-10-20 20:54:24 +08:00
Lim Chee Aun 137ad7f4dd Cache search enabled check 2023-10-20 20:48:30 +08:00
Lim Chee Aun 8ddc44fba6 Mobile Safari need this
Else it'll be almost zero width
2023-10-20 19:46:47 +08:00
Lim Chee Aun 3721acf3d3 Attempt to make month picker better 2023-10-20 19:24:01 +08:00
Lim Chee Aun ab7df0f66c Experiment: month filter for account statuses 2023-10-20 18:11:13 +08:00
Lim Chee Aun d1aedcaef2 Fix unneeded id passed here 2023-10-20 17:11:10 +08:00
Lim Chee Aun 691aea3389 Update loading state of account info 2023-10-20 13:07:31 +08:00
Lim Chee Aun 72f204771f Minor adjustments for search page 2023-10-20 12:53:23 +08:00
Lim Chee Aun dba921a3fd Add key 2023-10-20 12:52:56 +08:00
Lim Chee Aun 4646859177 Fix text shadows applied to search popover 2023-10-20 00:11:14 +08:00
Lim Chee Aun 66fa6fbe52 Memoize getHTMLText 2023-10-19 22:57:56 +08:00
Lim Chee Aun 861619ce57 Fix max-width of nav menu 2023-10-19 22:10:20 +08:00
Lim Chee Aun 71bf8608e6 Relayout the menu items in nav menu again 2023-10-19 21:07:00 +08:00
Lim Chee Aun 2916d1146b Adjust the <p> out 2023-10-19 20:50:32 +08:00
Lim Chee Aun d62712d587 double-tap zoom out once reach max scale 2023-10-19 20:47:11 +08:00
Lim Chee Aun a37c3d6081 Sneak in a slight copy change 2023-10-19 20:19:55 +08:00
Lim Chee Aun 73e995f494 s/for/about 2023-10-19 20:04:07 +08:00
Lim Chee Aun 1dc0069cdc More descriptive toasts copy 2023-10-19 20:02:31 +08:00
Lim Chee Aun a5532488aa Bunch these avatars too 2023-10-19 17:45:37 +08:00
Lim Chee Aun e9075906f8 Fix refresh key not unique enough
JS converted these to numbers, much fail
2023-10-19 17:25:17 +08:00
Lim Chee Aun 3339c5c1d6 Change div to span 2023-10-19 16:07:02 +08:00
Lim Chee Aun 965f948899 Recode some nested modal closing logic
Seems more robust
2023-10-19 16:06:55 +08:00
Lim Chee Aun c0c2bb45fe Auto-close account sheet when location path changes
Test this on account sheet first, probably useful for other sheets too
2023-10-19 10:15:54 +08:00
Lim Chee Aun 106cd16e41 Add loading state to filter bar 2023-10-19 10:13:53 +08:00
Lim Chee Aun 7145c20136 Fix wonky filter bar button transitions 2023-10-19 10:13:26 +08:00
Lim Chee Aun cd57e97e2b Fix Preact wrongly rearrange the elements 2023-10-19 01:14:23 +08:00
Lim Chee Aun c1588322aa Bunch the avatars 2023-10-19 01:13:37 +08:00
Lim Chee Aun 3eda1e2267 Fix familiarFollowers call not working 2023-10-19 01:13:12 +08:00
Lim Chee Aun 26cf40dcea Break the words 2023-10-17 23:23:58 +08:00
Lim Chee Aun 8ae9131543 Private notes 2023-10-17 20:20:26 +08:00
Lim Chee Aun 1b0a77dfae Pluralization for post(s)
Srsly need a i18n lib soon
2023-10-17 14:56:57 +08:00
Lim Chee Aun c538cfeaaa Add AbortSignal.timeout polyfill 2023-10-16 21:35:56 +08:00
Lim Chee Aun e153f9f541 Prevent undefined class name lol 2023-10-16 20:21:09 +08:00
Lim Chee Aun 809b7cc2d2 Micro perf optimizations maybe 2023-10-16 17:01:16 +08:00
Lim Chee Aun 673001e4e0 Fix captions got squashed 2023-10-16 01:55:11 +08:00
Lim Chee Aun 32b72f9297 Prevent time link from overlapping too much 2023-10-15 19:52:33 +08:00
Lim Chee Aun 57dead7960 Slight contrast bump for shiny pills 2023-10-15 19:52:17 +08:00
Lim Chee Aun 9786752a4f Group similar captions
Some folks really just copy/paste same desc for multiple media's
2023-10-15 18:28:04 +08:00
Lim Chee Aun 6540dd5642 Only set CW if there's spoiler text
Some posts have sensitive media but no spoiler text
2023-10-15 11:24:44 +08:00
Lim Chee Aun c80c8b3294 Need id as dependency too
- inner functions are not reading the updated id
- probably need to rewrite this as this code looks prone to errors
2023-10-15 10:50:33 +08:00
Lim Chee Aun e1ae89b00e Contextually highlight related caption when hovering over image
For multiple-media figures
2023-10-15 09:00:35 +08:00
Lim Chee Aun df9eeeb0b3 Don't have to memoize unfurl
It already has caching
2023-10-15 01:42:24 +08:00
Lim Chee Aun 32bf258bbf Test memoize enhanceContent 2023-10-15 01:19:21 +08:00
Lim Chee Aun f56a44ac97 Complete transition from mem to moize 2023-10-14 20:33:40 +08:00
Lim Chee Aun 0a7f158b70 Memoize translated results
First step in migrating to moize
2023-10-14 20:10:34 +08:00
Lim Chee Aun ab1b34d4d2 Fix handling of admin.report notification
This is untested, may break.
2023-10-14 17:59:18 +08:00
Lim Chee Aun f2f7b7fe1f Fix admin.sign_up typo 2023-10-14 17:58:46 +08:00
Lim Chee Aun 7264f543bd Change p to div here too 2023-10-13 23:39:59 +08:00
Lim Chee Aun f6864f96bd Change p to div 2023-10-13 15:46:43 +08:00
Lim Chee Aun f67d4fd916 Fix id may not be available yet 2023-10-13 15:46:31 +08:00
Lim Chee Aun cd403fe605 Fix error with zero posts 2023-10-13 15:31:04 +08:00
Lim Chee Aun 5481aa12be Cache account info fetches for 10mins 2023-10-13 15:27:24 +08:00
Lim Chee Aun 806ad2c6a2 Fix media re-rendering due to url object keep being recreated 2023-10-12 23:19:48 +08:00
Lim Chee Aun d1b8d737cc Enable on-demand posting stats
- Slight refactor
- Make sure stats also work when switching instances
- Make sure zero stats fallback
2023-10-12 23:11:20 +08:00
Lim Chee Aun a095a30500 Breaking news: upgrade to masto v6
Expecting bugs!

Also include some fixes for states init.
2023-10-12 12:48:09 +08:00
Lim Chee Aun 5de7eec2ca Only show hover styles for tab bar when has hover
The hover delays the tap a little
2023-10-11 19:13:02 +08:00
Lim Chee Aun b8767f3618 Fix load wrong account's stuff when adding new account
Some account-based calls were called before states are initialized
2023-10-11 19:07:36 +08:00
Lim Chee Aun 68759e64d1 Silence errors for follow requests & announcements 2023-10-09 21:53:58 +08:00
Lim Chee Aun 78a6f13380 Fix leaked follow requests from Notifications popover to page 2023-10-09 19:46:07 +08:00
Lim Chee Aun a697fb04df Disable follow request buttons once has relationship 2023-10-09 19:44:54 +08:00
Lim Chee Aun 39f7d4e00d Fix familiar followers leaked to other profiles
Mistake for using global state when it should be per-profile
2023-10-07 17:13:55 +08:00
Lim Chee Aun 12d0e6aed8 Fix media caption and index not synced 2023-10-07 09:41:38 +08:00
Lim Chee Aun 769a5cb099 Change caption display logic for multiple media
- Show all of them or none of them
- If there's at least one caption < 140 chars, show all of them
- Fix potential bug when there are > 4 media
2023-10-06 23:57:12 +08:00
Lim Chee Aun d6d10d091e Slight adjustments to tab bar styles 2023-10-06 18:13:10 +08:00
Lim Chee Aun eace6c4d9b Slight adjustments to media alt edit sheet 2023-10-05 18:07:36 +08:00
Lim Chee Aun 4723358d2d Fix borked image when restore from draft 2023-10-05 18:01:18 +08:00
Lim Chee Aun aad855cafc Try to use the additional new props for card
Only use imageDescription for now
2023-10-05 08:54:59 +08:00
Lim Chee Aun 643b6bce07 Try to use the additional new props for card
Only use imageDescription for now
2023-10-04 22:40:34 +08:00
Lim Chee Aun 5faf911b17 Replace scrollIntoViewIfNeeded with scrollIntoView
Because non-standard and not supported on Firefox
2023-10-04 21:24:48 +08:00
Lim Chee Aun ddd1ec5819 Compare accents and diacritics too 2023-10-04 21:23:21 +08:00
Lim Chee Aun 8cd3e38f22 Move this up, Intl stuff seems to run slow sometimes 2023-10-04 10:19:28 +08:00
Lim Chee Aun be964f933c Better throttle instead of debounce 2023-10-04 10:05:21 +08:00
Lim Chee Aun d429ef9161 Don't compact spoiler post if from different author 2023-10-04 08:31:40 +08:00
Lim Chee Aun 9885c8f388 Better contrast for visited links in dark mode 2023-10-04 00:09:32 +08:00
Lim Chee Aun 8be2c738df Make figcaption self align to bottom
This is in case the image height is smaller than the figcaption.
Could be possible for text in other languages.
Flexbox is so cool.
2023-10-03 22:15:15 +08:00
Lim Chee Aun faa7ffc310 Slight adjustments to carousel top buttons 2023-10-03 22:10:32 +08:00
Lim Chee Aun 4ac2e4aa7b Possibly fix rendering issue in Vanadium 2023-10-03 20:38:55 +08:00
Lim Chee Aun 4436c337dd Cleanup 2023-10-03 15:07:47 +08:00
Lim Chee Aun 48f1527cc6 Robustify useTruncated
Also attempt to fix weird scrollHeight bug again
2023-10-03 13:03:03 +08:00
Lim Chee Aun fcbf99f121 Got to dir=auto all the things 2023-10-03 10:29:28 +08:00
Lim Chee Aun 5793476223 Change icons for muted/blocked users
It's not consistent with the icons on the menu for muting/blocking.
There's no "user" in these icons but at least more recognizable. The text should give sufficient context despite less contextual icons.
2023-10-02 21:20:47 +08:00
Lim Chee Aun 715357c8c9 Show synced icon & link to instance for more settings
Context: some users were confused why some settings are not on Phanpy when it can be set on their own instance's web UI
2023-10-02 21:13:56 +08:00
Lim Chee Aun 56365ebc39 Fix duplicate alt badges 2023-10-02 20:55:15 +08:00
Lim Chee Aun a1a78370cc Remove 'Media {i}:'
It'll look weird when description is not English
2023-10-02 19:57:19 +08:00
Lim Chee Aun 7e993704cc More conditions for show/hide captions
- Remove unused code
- Refactor and memoize the long/short calculation too
2023-10-02 18:58:42 +08:00
Lim Chee Aun f05267b216 MVP implementation of listing muted/blocked users 2023-10-02 17:51:36 +08:00
Lim Chee Aun 634e81e9d0 Show roles in account info 2023-10-02 16:55:13 +08:00
Lim Chee Aun 52c63690a3 More noopener noreferrer 2023-10-02 15:58:59 +08:00
Lim Chee Aun 348efe0069 Experiment figcaption for *multiple* media's 2023-10-02 12:21:26 +08:00