-
Notifications
You must be signed in to change notification settings - Fork 4
feat(speakers): display unique activities count on speakers/submitter… #921
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,8 @@ import { | |
| SELECT_ALL_SUMMIT_SPEAKERS, | ||
| UNSELECT_ALL_SUMMIT_SPEAKERS, | ||
| SEND_SPEAKERS_EMAILS, | ||
| SET_SPEAKERS_CURRENT_FLOW_EVENT | ||
| SET_SPEAKERS_CURRENT_FLOW_EVENT, | ||
| RECEIVE_SPEAKERS_ACTIVITIES_COUNT | ||
| } from "../../actions/speaker-actions"; | ||
|
|
||
| import { | ||
|
|
@@ -38,6 +39,7 @@ const DEFAULT_STATE = { | |
| lastPage: 1, | ||
| perPage: 10, | ||
| totalItems: 0, | ||
| totalActivities: 0, | ||
| selectedCount: 0, | ||
| selectedItems: [], | ||
| excludedItems: [], | ||
|
|
@@ -205,6 +207,9 @@ const summitSpeakersListReducer = (state = DEFAULT_STATE, action = {}) => { | |
| case SET_SPEAKERS_CURRENT_FLOW_EVENT: { | ||
| return { ...state, currentFlowEvent: payload }; | ||
| } | ||
| case RECEIVE_SPEAKERS_ACTIVITIES_COUNT: { | ||
| return { ...state, totalActivities: payload.response.count }; | ||
| } | ||
|
Comment on lines
+210
to
+212
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevent stale count responses from clobbering current speaker totals. At Line 211, the reducer accepts whichever count response arrives last. Under rapid filter/search changes, stale responses can overwrite the active query’s Please gate this update with request context (request id/filter hash/current summit) so only the latest relevant response updates state. 🤖 Prompt for AI Agents |
||
| default: | ||
| return state; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,8 @@ import { | |
| SELECT_ALL_SUMMIT_SUBMITTERS, | ||
| UNSELECT_ALL_SUMMIT_SUBMITTERS, | ||
| SEND_SUBMITTERS_EMAILS, | ||
| SET_SUBMITTERS_CURRENT_FLOW_EVENT | ||
| SET_SUBMITTERS_CURRENT_FLOW_EVENT, | ||
| RECEIVE_SUBMITTERS_ACTIVITIES_COUNT | ||
| } from "../../actions/submitter-actions"; | ||
|
|
||
| import { | ||
|
|
@@ -38,6 +39,7 @@ const DEFAULT_STATE = { | |
| lastPage: 1, | ||
| perPage: 10, | ||
| totalItems: 0, | ||
| totalActivities: 0, | ||
| selectedCount: 0, | ||
| selectedItems: [], | ||
| excludedItems: [], | ||
|
|
@@ -193,6 +195,9 @@ const summitSubmittersListReducer = (state = DEFAULT_STATE, action) => { | |
| case SET_SUBMITTERS_CURRENT_FLOW_EVENT: { | ||
| return { ...state, currentFlowEvent: payload }; | ||
| } | ||
| case RECEIVE_SUBMITTERS_ACTIVITIES_COUNT: { | ||
| return { ...state, totalActivities: payload.response.count }; | ||
| } | ||
|
Comment on lines
+198
to
+200
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard against stale activity-count responses overwriting current filters. At Line 199, Consider attaching query context (e.g., 🤖 Prompt for AI Agents |
||
| default: | ||
| return state; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selected activities count is incorrect for cross-page selections.
At Lines 721-724, the calculation only inspects current-page
items. When selections span multiple pages (orselectedAllwith exclusions),selectedActivitiesno longer reflects all selected entities, so the UI shows inaccurate totals.You’ll need a selection model that tracks activity ids beyond the current page (or a backend selected-count endpoint) to keep this number correct.
🤖 Prompt for AI Agents