Skip to content

Reactive pos-container-contents#191

Merged
jg10-mastodon-social merged 8 commits intomainfrom
feat/reactive-pos-container-contents
Feb 28, 2026
Merged

Reactive pos-container-contents#191
jg10-mastodon-social merged 8 commits intomainfrom
feat/reactive-pos-container-contents

Conversation

@jg10-mastodon-social
Copy link
Collaborator

@jg10-mastodon-social jg10-mastodon-social commented Feb 8, 2026

Implements and closes #190

Builds on #186

  • Add LDPContainer.observeContains as reactive equivalent to LDPContainer.contains
  • pos-container-contents updates its contents by observing LDPContainer.observeContains
  • Tests have been written
    • all new code is covered by unit tests
    • the happy path of a new feature is covered by an end-to-end test
    • manual explorative tests have been performed
  • all dependencies are updated to the latest patch version at minimum
  • the CI pipeline passes
  • documentation is up-to-date
    • TSDoc style comments on important functions, properties and events
    • N/A stories for new PodOS elements have been added to storybook
      • makes existing element reactive
    • N/A Readme.md files of PodOS elements have been re-generated
      • No change
    • N/A architectural decisions are documented as an ADR
    • Changelogs are updated according to Keep a Changelog

@jg10-mastodon-social jg10-mastodon-social force-pushed the feat/reactive-pos-container-contents branch from 0d72158 to 9a8f672 Compare February 15, 2026 07:36
@jg10-mastodon-social jg10-mastodon-social marked this pull request as ready for review February 15, 2026 08:22
@jg10-mastodon-social jg10-mastodon-social force-pushed the feat/reactive-pos-container-contents branch from 3b4a6b3 to 1eb909a Compare February 15, 2026 11:33
return merge(this.store.additions$, this.store.removals$).pipe(
filter(
(quad) =>
quad.graph.value == this.uri &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Why graph and not subject?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: i wonder if the merge, pipe, filter pattern should be a convenience function on store. I guess we will need it a lot

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The graph limits changes to this container, i.e. ldp:contains triples in other documents won't trigger. In principle this minimises some triple injection issues, though in practice I was simply trying to find an efficient filter.
I'll add a test for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still expecting that we might want to reuse specific filters - at the moment a new observable is created for every call.
I don't want to prematurely optimise for that though - I think we can refactor with some performance oriented tests later.
If we end up doing that, it'll be more than just a convenience function.

@jg10-mastodon-social jg10-mastodon-social force-pushed the feat/reactive-pos-container-contents branch from 8db0ded to 70d4a98 Compare February 17, 2026 09:41
@jg10-mastodon-social jg10-mastodon-social force-pushed the feat/reactive-pos-container-contents branch from 70d4a98 to 079fef7 Compare February 28, 2026 10:16
@jg10-mastodon-social jg10-mastodon-social merged commit a310a1d into main Feb 28, 2026
18 checks passed
@jg10-mastodon-social jg10-mastodon-social deleted the feat/reactive-pos-container-contents branch February 28, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reactive pos-container-contents

2 participants