* Create a testable version of ago() and re-enable the disabled test (#4364)
* Enable the test of ago()
* Use test cases
This puts the input and the expected values next to each other.
* Create dateDiff function
This is a copy of ago(), but with the ability to specify the second date instead of using Date.now().
* Let ago() use dateDiff()
* Move constants close to usage
* Test dateDiff instead of ago
This makes it possible to test the dates without being forced to rely on what the current date is.
The commented out tests do not yet pass. This is fixed in later commits.
* Update dateDiff and enable the remaining tests
* Split up tests, use date-fns as helpers
* Remove old test
* Add long format
* Add hook
* Migrate to hooks
* Delete old code
* Or equal to
* Update comment
---------
Co-authored-by: Jan Aagaard <jan@aagaard.net>
When setting up the environment on a Windows machine with Git Bash, the pre-commit hook errored out:
> /usr/bin/bash: line 1: C:UsersNameFoldersocial-appnode_modules.binlint-staged: command not found
Seemingly, `yarn lint-staged` is not able to correctly resolve the path.
This commit changes the pre-commit hook to use `npx` instead of `yarn`, for 2 reasons:
1. It works on my machine (and is supposedly a more universal solution)
2. It is how it is done in the documentation: https://github.com/lint-staged/lint-staged?tab=readme-ov-file#examples
Co-authored-by: Joel <joel.garplind+github@gmail.com>
* Pass event through click handlers
* Add FeedCard, use in Feeds screen
* Tweak space
* Don't contrain rt height
* Tweak space
* Fix type errors, don't pass event to fns that don't expect it
* Show unresolved RT prior to facet resolution
* add referrer to statsig custom
dont include referrer if hostname is bsky.app
save
add `document.referrer` to statsig custom
* add a hostname field
* account for ssr
* account for ssr
* Fix: mini profile on hover allows following a blocker/blocked user (#4423) (#4440)
* Tweaks
---------
Co-authored-by: Michał Gołda <michal.golda@hotmail.com>
* Add KnownFollowers component to standard profile header
* Prep for known followers screen
* Add known followers screen
* Tighten space
* Add pressed state
* Edit title
* Vertically center
* Don't show if no known followers
* Bump sdk
* Use actual followers.length to show
* Updates to show logic, space
* Prevent fresh data from applying to cached screens
* Tighten space
* Better label
* Oxford comma
* Fix count logic
* Add bskyweb route
* Useless ternary
* Minor spacing tweak
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Only enable keyboard controller when necessary
* make it screen only
* rm keyboard padding
* rm keyboardpadding file
* revert using keyboard controller in composer
* remove styles.outer (unnecessary for revert)
* continue to use keyboard padding in the report dialog for dms
---------
Co-authored-by: Hailey <me@haileyok.com>
* Increase the number of posts loaded when a self-thread is present
* Increase depth to 10, detect cutoffs on self-threads and show continue link
* Stacky the avis
* Move feeds screen into common navigator, handle usages
* Add link to Feeds from home screen (#4366)
* Add link to feeds to home screen header
* Center logo
* Replace icons
* Tweak spacing
* Tweak spacing
* Swap icon, sizing
* Buttonize, size
* Make menu same alignment on all screens
* Remove FeedsTab support, enable drawer swipe on MessagesTab
* Add note
* Vertically align header
* Swap in Pin
* Use hashtag icon
* Remove png
* Fix reference
* Ensure alignment with home and other screens
* register the push token after request has been approved on android
* use a `0` string for badge count
* Revert "use a `0` string for badge count"
This reverts commit efac39861817f4237c58211f68ef266d919b4d40.
* temporary fix