-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Background
Facet conditions are a feature of the current version. This is best demonstrated with a customized Person content type, for example:
person.building: which building the person is inperson.room: room number of the person
Then in the People search, we can show facet conditions for building and room.
Why we need this
- Demo site: Users can easily understand and test out the feature
- Cypress tests: Tests can exercise the UX with this setup
The problem
We don't want to add a customized Person type to the main package. Consumers of this package might not want to use Person at all, or use a differently customized Person. (In contrast: kitconcept.intranet does contain a Person type, but it's a different package which some users of kitconcept.solr will not want to use.)
Proposed solution
Add a DemoPerson content type that is only configured in:
- The Cypress test setup
- The demo site
This content type should NOT be registered when someone just uses the package as a dependency.
Monorepo consideration
This pattern should be supported from the monorepo format, as adding a demo site and running a specific setup for Cypress can be a common requirement for other packages as well.
Implementation Plan
- Create a
DemoPersoncontent type withbuildingandroomfields - Add Solr schema configuration for
buildingandroomindexes - Create a separate ZCML profile (e.g.,
demoortesting) that registersDemoPerson - Configure the demo site to load the demo profile
- Configure Cypress test setup to load the demo profile
- Ensure the main package profile does NOT include
DemoPerson - Add facet conditions configuration for building and room in the demo/testing context
- Create sample
DemoPersoncontent in demo site fixtures - Write Cypress tests exercising facet conditions with the demo content
- Document the pattern for other packages needing similar demo/testing-only content types