I had a utopian dream of completely abstracting the UI from the data fetching layers so UX designers could more easily make changes themselves.

Also wanted storybook and the playwright tests to cover all UI components in such a way that they could just pass in the objects needed without fetching data.

I've moved away from that with the above change. although it could be added back in by passing required data (such as each mentioned user's User object to the components/events/EventWrapper.

Something tells me this is more trouble than it is worth. In previous roles that something would be colleagues or someone doing a peer review.

Reply to this note

Please Login to reply.

Discussion

Once you start supporting NIP-19 it becomes a bit tricky. Are you using a local DB? You can still pre-populate it with the events you use in the storybook/tests and don't hit the relays at all. NDK supports caching policies such as NDKSubscriptionCacheUsage.ONLY_CACHE or NDKSubscriptionCacheUsage.CACHE_FIRST that make this relatively easy.

That's a good idea. Potentially a lot cleaner.

Its about time to add caching. CACHE_FIRST sounds ideal