Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ <h2>{{ currentPage().title }}</h2>
}
</div>

@if (currentPage().description?.length) {
<p class="preserve-whitespace">{{ currentPage().description }}</p>
}

@let questions = currentPage().questions || [];

<ng-container *ngTemplateOutlet="questionList; context: { $implicit: questions }"></ng-container>
Expand Down Expand Up @@ -47,10 +51,10 @@ <h3 class="mb-2">
</h3>
</div>
@if (q.paragraphText) {
<p class="mb-3">{{ q.paragraphText }}</p>
<p class="mb-3 preserve-whitespace">{{ q.paragraphText }}</p>
}
@if (q.helpText && q.fieldType !== FieldType.Radio && q.fieldType !== FieldType.Checkbox) {
<p>{{ q.helpText }}</p>
@if (q.helpText) {
Comment on lines -52 to +56
Copy link
Contributor

@futa-ikeda futa-ikeda Oct 20, 2025

Choose a reason for hiding this comment

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

Does this update the issue outlined in the ticket ("Another one that’s not showing up is the help_text..." ). I think the root cause of the problem that's outlined in that ticket is not addressed where we use a currentQuestion object to store helpText, but this helpText can be overwritten in subsequent blocks.

Edit: it looks like the original analysis wasn't correct, as I thought we were overriding currentQuestion.helpText with SelectSingleInputOption, but this is setting helpText for a member in the currentQuestion?.options array

<p class="preserve-whitespace">{{ q.helpText }}</p>
}
</label>
@if (q.exampleText) {
Expand Down Expand Up @@ -87,15 +91,16 @@ <h3 class="mb-2">
}
}
@case (FieldType.Radio) {
<div class="flex flex-column gap-2">
<div class="flex flex-column gap-2 mt-3">
@for (option of q.options; track option) {
<div class="flex align -items-center gap-2">
<p-radioButton
[formControlName]="q.responseKey!"
[inputId]="option.value"
[value]="option.value"
></p-radioButton>
<label [for]="option.value" class="ml-2">{{ option.label }}</label>

<label [for]="option.value" class="mb-0 cursor-pointer">{{ option.label }}</label>
@if (option.helpText) {
<osf-info-icon [tooltipText]="option.helpText" tooltipPosition="top"></osf-info-icon>
}
Expand All @@ -112,15 +117,16 @@ <h3 class="mb-2">
}
}
@case (FieldType.Checkbox) {
<div class="flex flex-column gap-2">
<div class="flex flex-column gap-2 mt-3">
@for (option of q.options; track option) {
<div class="flex align-items-center gap-2">
<p-checkbox
[inputId]="option.value"
[formControlName]="q.responseKey!"
[value]="option.value"
></p-checkbox>
<label [for]="option.value" class="ml-2">{{ option.label }}</label>

<label [for]="option.value" class="mb-0 cursor-pointer">{{ option.label }}</label>
@if (option.helpText) {
<osf-info-icon [tooltipText]="option.helpText" tooltipPosition="top"></osf-info-icon>
}
Expand Down Expand Up @@ -190,13 +196,14 @@ <h3 class="mb-2">{{ 'files.actions.uploadFile' | translate }}</h3>
[label]="'common.buttons.back' | translate"
severity="info"
class="mr-2"
(click)="goBack()"
(onClick)="goBack()"
></p-button>

<p-button
data-test-goto-next-page
type="button"
[label]="'common.buttons.next' | translate"
(click)="goNext()"
(onClick)="goNext()"
></p-button>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ export class DraftsComponent implements OnDestroy {
this.route.snapshot.firstChild?.params['step'] ? +this.route.snapshot.firstChild?.params['step'] : 0
);

currentStep = computed(() => {
return this.steps()[this.currentStepIndex()];
});
currentStep = computed(() => this.steps()[this.currentStepIndex()]);

registrationId = this.route.snapshot.firstChild?.params['id'] || '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ <h4 class="mb-2">{{ 'shared.tags.title' | translate }}</h4>
<h2 class="mb-4">{{ page.title }}</h2>

@if (page.description) {
<p class="mb-4">{{ page.description }}</p>
<p class="mb-4 preserve-whitespace">{{ page.description }}</p>
}

@if (page.sections?.length) {
@for (section of page.sections; track section.id) {
<div class="mb-4">
<h3 class="mb-2">{{ section.title }}</h3>
@if (section.description) {
<p class="mb-4">{{ section.description }}</p>
<p class="mb-4 preserve-whitespace">{{ section.description }}</p>
}
@if (section.questions?.length) {
<osf-registration-blocks-data
Expand Down
1 change: 1 addition & 0 deletions src/app/features/registries/store/registries.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export class RegistriesState {
ctx.patchState({
pagesSchema: { ...state.pagesSchema, isLoading: true, error: null },
});

return this.registriesService.getSchemaBlocks(action.registrationSchemaId).pipe(
tap((schemaBlocks) => {
ctx.patchState({
Expand Down