Skip to content

feat(focus-group): discussion guide editor, models, controller and store#2147

Open
mohi-devhub wants to merge 5 commits into
ruxailab:developfrom
mohi-devhub:feat/focus-group-build-out
Open

feat(focus-group): discussion guide editor, models, controller and store#2147
mohi-devhub wants to merge 5 commits into
ruxailab:developfrom
mohi-devhub:feat/focus-group-build-out

Conversation

@mohi-devhub

Copy link
Copy Markdown
Member

Builds out the Focus Group module on top of the creation skeleton (#2146): data models, data layer, and a working discussion guide editor with persistence.

Changes

  • DiscussionTopic and FocusGroupConfig models, integrated into FocusGroupStudy
  • FocusGroupController (reads and persists the discussion guide + config) and a FocusGroup Vuex module, registered in the store
  • EditFocusGroupView + DiscussionGuideEditor: add, edit, delete, reorder topics, manage prompts, set durations
  • Edit route and "Test" navigation item in the manager view
  • EN/ES translations

Testing

Verified end to end on the Firebase emulator: create a Focus Group study, edit the guide, save, and confirm the discussionGuide array and config map persist correctly on the tests document. Lint clean, i18n parity passes, build succeeds.

Discussion Guide - Video

Discussion-Guide-Flow-Low.mp4

Closes #2134
Closes #2135
Closes #2136

Copilot AI review requested due to automatic review settings July 1, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Builds out the Focus Group module beyond the creation skeleton by adding persisted discussion-guide/config models, a controller + Vuex integration, and an editor UI (including routing/navigation) with EN/ES strings.

Changes:

  • Add DiscussionTopic and FocusGroupConfig models and integrate them into FocusGroupStudy Firestore serialization.
  • Introduce FocusGroupController + FocusGroup Vuex module and wire save behavior for the discussion guide.
  • Add an edit route/view and a DiscussionGuideEditor component, plus navigation and translations.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ux/FocusGroup/views/ManagerView.vue Adds a new navigation item linking to the discussion guide edit route.
src/ux/FocusGroup/views/EditFocusGroupView.vue New edit screen that hydrates topics from the loaded study and persists them via Vuex action.
src/ux/FocusGroup/store/FocusGroup.js New Focus Group Vuex module with actions for fetching/saving discussion guide.
src/ux/FocusGroup/router.js Registers the edit route under the Focus Group manager route tree.
src/ux/FocusGroup/models/FocusGroupStudy.js Adds typed discussionGuide + config handling and Firestore serialization.
src/ux/FocusGroup/models/FocusGroupConfig.js New model for persisted Focus Group session configuration.
src/ux/FocusGroup/models/DiscussionTopic.js New model for discussion-guide topic structure and serialization.
src/ux/FocusGroup/controllers/FocusGroupController.js New repository/controller for reading and updating discussion guide/config on the tests document.
src/ux/FocusGroup/components/DiscussionGuideEditor.vue New UI editor for topic CRUD, prompt management, and reordering.
src/store/index.js Registers the new Focus Group Vuex module in the global store.
src/app/plugins/locales/es.json Adds Focus Group edit strings and updates manager copy (ES).
src/app/plugins/locales/en.json Adds Focus Group edit strings and updates manager copy (EN).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +60 to +63
onMounted(async () => {
if (!test.value) await store.dispatch('getStudy', { id: route.params.id })
hydrate(test.value)
})
Comment on lines +22 to +26
async getFocusGroup({ commit }, id) {
const study = await focusGroupController.getById(id)
commit('SET_FOCUS_GROUP', study)
return study
},
Copilot AI review requested due to automatic review settings July 1, 2026 06:56
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

*/
export default class DiscussionTopic {
constructor({ id, title, prompts, durationMinutes } = {}) {
this.id = id ?? DiscussionTopic.generateId()

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment on lines +16 to +23
static generateId() {
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
return `topic-${crypto.randomUUID()}`
}
const array = new Uint32Array(2)
crypto.getRandomValues(array)
return `topic-${Date.now()}-${array[0].toString(36)}${array[1].toString(36)}`
}
Comment on lines +11 to +17
async getById(id) {
const res = await this.readOne(COLLECTION, id)
return instantiateStudyByType(STUDY_TYPES.FOCUS_GROUP, {
id: res.id,
...res.data(),
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants