Skip to content

Feature/bai 2511 view all question states#3740

Open
IR96334 wants to merge 13 commits into
mainfrom
feature/BAI-2511-view-all-question-states
Open

Feature/bai 2511 view all question states#3740
IR96334 wants to merge 13 commits into
mainfrom
feature/BAI-2511-view-all-question-states

Conversation

@IR96334

@IR96334 IR96334 commented Jun 16, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added enhancement New feature or request javascript Pull requests that update Javascript code frontend Changes affecting the user-facing interface, client-side code, or presentation layer. labels Jun 16, 2026
Comment thread frontend/src/Form/JsonSchemaForm.tsx
Comment thread frontend/src/Form/JsonSchemaForm.tsx
Comment thread frontend/src/Form/JsonSchemaForm.tsx Outdated
Comment thread frontend/utils/formUtils.ts
Comment thread frontend/utils/formUtils.ts
Comment on lines +254 to +257
return requiredByModelState &&
(!schema.requiredByModelStates || !schema.requiredByModelStates.includes(requiredByModelState))
? false
: true

@GB907762 GB907762 Jun 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return requiredByModelState &&
(!schema.requiredByModelStates || !schema.requiredByModelStates.includes(requiredByModelState))
? false
: true
return Boolean(
requiredByModelState && !(schema.requiredByModelStates && schema.requiredByModelStates.includes(requiredByModelState)),
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The original version is required for completion bar, but as we are no longer filtering and highlighting it can be used for questions in schema

IR96334 and others added 4 commits June 17, 2026 12:49
Co-authored-by: GB907762 <241953074+GB907762@users.noreply.github.com>
Co-authored-by: GB907762 <241953074+GB907762@users.noreply.github.com>
@github-actions github-actions Bot added python Pull requests that update Python code tests Improvements or additions to unit tests and / or end to end tests backend Changes affecting server-side logic, APIs, data processing, or internal services. labels Jun 19, 2026
Comment thread backend/src/services/schema.ts
Comment thread backend/src/services/schema.ts
Comment thread frontend/src/common/EntrySelect.tsx Outdated
Comment thread frontend/src/Form/JsonSchemaForm.tsx Outdated
Comment thread frontend/src/Form/JsonSchemaForm.tsx

@PE39806 PE39806 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it would also be a good idea to add "requiredByModelStates": ["Review", "Production"], to backend/src/scripts/example_schemas/minimal_model_schema.json (maybe under modelSummary) to demonstrate this feature to new admins from the get-go.

Comment thread frontend/src/Form/JsonSchemaForm.tsx Outdated
Comment thread frontend/src/Form/FormTemplates.tsx Outdated
Comment thread frontend/src/Form/JsonSchemaForm.tsx
Comment thread frontend/src/Form/FormTemplates.tsx Outdated
Comment thread frontend/src/Form/JsonSchemaForm.tsx Outdated
Comment thread frontend/src/Form/FormTemplates.tsx Outdated
Comment thread backend/src/services/schema.ts Outdated
Comment thread backend/src/services/schema.ts Outdated
Comment thread backend/src/services/schema.ts Outdated
Comment thread frontend/src/theme.ts Outdated
}

function countQuestionsFromSchema(schema: any): number {
export function requiredByStateFilter(requiredByModelState?: string, schema?: any) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think schema can be ever undefined

<Box>
Entries Completed: {formStats.totalAnswers}/{formStats.totalQuestions}
{toSentenceCase(
`${requiredByModelState ? `${requiredByModelState} ` : ''}entries completed: ${formStats.totalAnswers}/${formStats.totalQuestions}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
`${requiredByModelState ? `${requiredByModelState} ` : ''}entries completed: ${formStats.totalAnswers}/${formStats.totalQuestions}`,
`${requiredByModelState ? `${requiredByModelState} ` : ''}fields completed: ${formStats.totalAnswers}/${formStats.totalQuestions}`,

I know this was like this before but I find entries a confusing term

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 24, 2026
@GB907762 GB907762 force-pushed the feature/BAI-2511-view-all-question-states branch from 7482b51 to 39e806e Compare June 24, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Changes affecting server-side logic, APIs, data processing, or internal services. documentation Improvements or additions to documentation enhancement New feature or request frontend Changes affecting the user-facing interface, client-side code, or presentation layer. javascript Pull requests that update Javascript code python Pull requests that update Python code tests Improvements or additions to unit tests and / or end to end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants