feat(tutorial): update tutorial labels and modal titles to improve clarity
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
- Changed "Skip tour" button to "Cancel" in various tutorial overlays. - Updated modal titles from "Confirm Task" to "Confirm Penalty" where applicable. - Modified tutorial step call-to-action labels from "Got it" and "Next" to "Continue" for consistency. - Added tests for new tutorial overlay behavior and button interactions. - Refactored tutorial controller to allow ignoring tutorial enabled state in step visibility checks. - Enhanced user profile tutorial restart functionality with appropriate modal messages. - Updated user profile and task confirmation dialog components to reflect new titles and messages. - Adjusted configuration files for local development environments.
This commit is contained in:
@@ -28,9 +28,11 @@ const props = defineProps<{
|
||||
childName?: string
|
||||
}>()
|
||||
|
||||
const dialogTitle = computed(() =>
|
||||
props.task?.type === 'kindness' ? 'Confirm Act' : 'Confirm Task',
|
||||
)
|
||||
const dialogTitle = computed(() => {
|
||||
if (props.task?.type === 'kindness') return 'Confirm Act'
|
||||
if (props.task?.type === 'penalty') return 'Confirm Penalty'
|
||||
return 'Confirm Task'
|
||||
})
|
||||
|
||||
defineEmits<{
|
||||
confirm: []
|
||||
|
||||
@@ -40,4 +40,20 @@ describe('TaskConfirmDialog', () => {
|
||||
|
||||
expect(wrapper.findComponent(ModalDialogStub).props('title')).toBe('Confirm Act')
|
||||
})
|
||||
|
||||
it('renders "Confirm Penalty" title for penalties', () => {
|
||||
const task: Task = {
|
||||
id: 'task-3',
|
||||
name: 'No Screen Time',
|
||||
type: 'penalty',
|
||||
points: 5,
|
||||
image_id: '',
|
||||
}
|
||||
const wrapper = mount(TaskConfirmDialog, {
|
||||
props: { task, childName: 'Test Child' },
|
||||
global: { stubs: { ModalDialog: ModalDialogStub } },
|
||||
})
|
||||
|
||||
expect(wrapper.findComponent(ModalDialogStub).props('title')).toBe('Confirm Penalty')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<!-- Restart confirmation -->
|
||||
<ModalDialog
|
||||
v-if="showRestartConfirm"
|
||||
title="Restart tutorial?"
|
||||
title="Tutorial Restart"
|
||||
@close="showRestartConfirm = false"
|
||||
>
|
||||
<div class="modal-message">
|
||||
@@ -169,8 +169,12 @@
|
||||
</ModalDialog>
|
||||
|
||||
<!-- Restart success -->
|
||||
<ModalDialog v-if="showRestartSuccess" title="Tour reset" @close="showRestartSuccess = false">
|
||||
<div class="modal-message">Tour reset — here we go!</div>
|
||||
<ModalDialog
|
||||
v-if="showRestartSuccess"
|
||||
title="Tutorial Restart"
|
||||
@close="showRestartSuccess = false"
|
||||
>
|
||||
<div class="modal-message">Tutorial mode has been restarted</div>
|
||||
<div class="modal-actions">
|
||||
<button class="btn btn-primary" @click="showRestartSuccess = false">OK</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user