Add TheConversation tracking - #156
Open
jmsevin wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds tracking for "conversation" corpus excerpts in the
CardComponent, enabling integration with The Conversation's content tracker. It introduces a newexternalIdprop, ensures this prop is passed from parent components, and includes tests to verify the tracking logic. The most important changes are:Conversation excerpt tracking:
trackConversationExcerptmethod toCardComponent.vuethat loads The Conversation's content tracker script when a "conversation" excerpt is opened and anexternalIdis present. The script is removed after loading or error. (src/components/CardComponent.vue, src/components/CardComponent.vueR29-R54)<details>element to trigger the new tracking method on toggle events. (src/components/CardComponent.vue, src/components/CardComponent.vueL103-R127)Prop and type updates:
externalIdprop toCardComponent.vueand updated theDocumenttype to includedocument_external_id. (src/components/CardComponent.vue, [1];src/types/index.ts, [2]Prop wiring in parent components:
externalIdprop from parent components (SourcesListComponent.vue,SecondStep.vue) toCardComponent. (src/components/SourcesListComponent.vue, [1] [2];src/components/tutor/SecondStep.vue, [3]Testing:
CardComponent.spec.ts, covering correct loading and non-loading scenarios. (src/components/__tests__/CardComponent.spec.ts, src/components/tests/CardComponent.spec.tsR1-R64)