planetary-social / nos

nos.social social media for all of us, using nostr
https://nos.social
Mozilla Public License 2.0
123 stars 14 forks source link

ObservableObject to @Observable migrations #1458 #1672

Closed bryanmontz closed 3 weeks ago

bryanmontz commented 1 month ago

Issues covered

1458

Description

Migrates several more classes to use @Observable macro rather than the ObservableObject protocol for the performance gains and general modernization of patterns.

How to test

  1. Navigate to the Note Composer view.

  2. Tap "@" to bring up the user search view. Observe that the search fires on key taps.

  3. Navigate to the Note Composer.

  4. Type a note.

  5. Send it. Observe that the note was sent.

  6. Navigate to the Discover tab.

  7. Search for something. Observe that results appear as you type.

  8. Navigate to your profile view.

  9. Tap the Claim your username button.

  10. Select either set up or already have.

  11. Type in the box. Observe that the UI responds as you type.

Screenshots/Video

No intended UI changes, but here are some videos of affected areas of code to show that they still work as expected:

Adding a mention to a note...(shows that the refactored TextDebouncer works) mention

Posting a note...(shows that RelayService as @Observable works) posting

Search in Discover...(shows that SearchController as @Observable works) search

Username search...(shows that SearchController and TextDebouncer work) username

mplorentz commented 1 month ago

👀