This PR adds a new string attribute, contextModule, to the HomeViewSection type in order to provide clients with a consistent label for use in analytics event payloads.
We had previously experimented with inferring this label from the section internal IDs but I think decoupling the two gives us more stability and flexibility as the Home View architecture matures.
Note: The second commit in this PR switches from hard-coded strings to imports from our @artsy/cohesion package. This would introduce a dependency on cohesion for properly typing new section definition but I don't think would add considerably friction to the process overall. Open for debate though. cc/ @joeyAghion
This PR adds a new string attribute,
contextModule
, to the HomeViewSection type in order to provide clients with a consistent label for use in analytics event payloads.We had previously experimented with inferring this label from the section internal IDs but I think decoupling the two gives us more stability and flexibility as the Home View architecture matures.
Note: The second commit in this PR switches from hard-coded strings to imports from our @artsy/cohesion package. This would introduce a dependency on cohesion for properly typing new section definition but I don't think would add considerably friction to the process overall. Open for debate though. cc/ @joeyAghion
Request
Response