Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(analytics): Add page number to SearchResultClickEvent analytics event #11151

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions datahub-web-react/src/app/analytics/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export interface SearchResultClickEvent extends BaseEvent {
entityTypeFilter?: EntityType;
index: number;
total: number;
pageNumber: number;
}

export interface SearchFiltersClearAllEvent extends BaseEvent {
Expand Down
3 changes: 3 additions & 0 deletions datahub-web-react/src/app/search/SearchResultList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type Props = {
selectedEntities: EntityAndType[];
setSelectedEntities: (entities: EntityAndType[]) => any;
suggestions: SearchSuggestion[];
pageNumber: number;
};

export const SearchResultList = ({
Expand All @@ -73,6 +74,7 @@ export const SearchResultList = ({
selectedEntities,
setSelectedEntities,
suggestions,
pageNumber,
}: Props) => {
const entityRegistry = useEntityRegistry();
const selectedEntityUrns = selectedEntities.map((entity) => entity.urn);
Expand All @@ -86,6 +88,7 @@ export const SearchResultList = ({
entityType: result.entity.type,
index,
total: totalResultCount,
pageNumber,
});
};

Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/app/search/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export const SearchResults = ({
selectedEntities={selectedEntities}
setSelectedEntities={setSelectedEntities}
suggestions={suggestions}
pageNumber={page}
/>
{totalResults > 0 && (
<PaginationControlContainer id="search-pagination">
Expand Down
2 changes: 1 addition & 1 deletion docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Use [gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.ht
./gradlew build
```

Note that the above will also run run tests and a number of validations which makes the process considerably slower.
Note that the above will also run tests and a number of validations which makes the process considerably slower.

We suggest partially compiling DataHub according to your needs:

Expand Down
Loading