Locate the Tour Script
Navigate to .polarion/pages/spaces/_default/ in your project configuration and locate the page containing the tour script attachment:
- Find the page that embeds the Risksheet (typically a FMEA analysis page)
- Look for
<attachment> elements referencing risksheet-tour.js
- Download the current version for editing
Add a configuration block before the tour script loads to customize behavior:
<script>
window.risksheetTourConfig = {
projectId: 'AutoProject', // Override project ID detection
tourId: 'custom-dfmea-tour', // Unique ID for localStorage tracking
autoStart: true, // Auto-launch for first-time users
autoStartDelay: 3000 // Wait 3 seconds before tour starts
};
</script>
<script src="$page.getAttachmentURL('risksheet-tour.js')"/>
Tours are tracked per browser using localStorage key tour-seen-{tourId}. Change tourId when you update tour content to re-trigger it for all users.
Edit Tour Steps
Download risksheet-tour.js and modify the tour step definitions:
const fullTourSteps = [
{
element: '#nxtr-topPanel .rs-green-colored',
popover: {
title: 'Welcome to Your DFMEA',
description: 'This Risksheet analyzes design failure modes...',
side: 'bottom',
align: 'start'
}
},
{
element: '#theGrid',
popover: {
title: 'Design Failure Modes Grid',
description: 'Edit failure modes, effects, causes, and severity ratings directly in the spreadsheet.',
side: 'top',
align: 'center'
}
},
{
element: '#btnColumns',
popover: {
title: 'Progressive Views',
description: 'Switch between Pre-Mitigation Analysis, Risk Controls, and Post-Mitigation Assessment views.',
side: 'left'
}
}
// Add more steps...
];
Tour Step Structure
| Property | Description |
|---|
element | CSS selector that highlights the target UI element |
popover.title | Step title displayed in the instruction popover |
popover.description | Explanation text for the current step |
popover.side | Popover position: top, bottom, left, or right |
popover.align | Popover alignment: start, center, or end |
Customize Tour Triggers
The tour script provides two triggers:
| Trigger | Purpose | Code Location |
|---|
| Auto-start | Launches tour for first-time users on page load | if (shouldAutoStart()) block |
| Manual button | ”▶ Intro Tour” button in page footer | createFooterButton() function |
| Help button | Short tour focused on traffic lights | #help-tour-btn click handler |
To disable auto-start but keep manual trigger:
window.risksheetTourConfig = {
autoStart: false // Users must click footer button
};
Customize Popover Appearance
Modify Driver.js configuration options in the initDriver() function:
const driver = driver({
showProgress: true, // Show "2 of 7" step counter
progressText: 'Step {{current}} of {{total}}',
nextBtnText: 'Next →',
prevBtnText: '← Back',
doneBtnText: 'Start Working!',
showButtons: ['next', 'previous', 'close'],
overlayColor: 'rgba(0, 0, 0, 0.7)', // Darker overlay
stagePadding: 5, // Highlight padding around element
stageRadius: 8 // Rounded corners on highlight
});
Add Custom Tour Steps for New Features
When you add custom Risksheet columns or features, add corresponding tour steps:
{
element: '#columnMyCustomField',
popover: {
title: ' New Custom Field',
description: 'We added a custom Supplier Responsibility field to track external mitigation actions.',
side: 'bottom'
}
}
Tour steps fail silently if the CSS selector doesn’t match a visible element. Test your tour after configuration changes by clearing localStorage: localStorage.removeItem('tour-seen-custom-dfmea-tour').
The script supports two tour variants:
Full Tour (8 steps): Covers entire Risksheet workflow — triggered on first visit or footer button click.
Short Tour (3 steps): Focuses only on traffic lights status indicators — triggered by help button.
To customize the short tour:
const shortTourSteps = [
{
element: '#traffic-light-container',
popover: {
title: 'FMEA Completion Status',
description: 'Three traffic lights show: pre-mitigation completeness, post-mitigation status, high-risk item count.',
side: 'bottom'
}
}
// Edit remaining 2 steps...
];
Upload Modified Script
After editing the tour script:
- Open the Polarion page in edit mode
- Upload the modified
risksheet-tour.js file as an attachment
- Verify the
<script src="$page.getAttachmentURL('risksheet-tour.js')"/> reference is correct
- Save the page
- Test by clearing localStorage and reloading:
localStorage.clear()
Verify Tour Customization
After uploading:
- Open the Risksheet page in a new incognito browser window (to bypass localStorage)
- Wait for
autoStartDelay milliseconds
- You should see the customized tour launch automatically
- Navigate through all steps using Next → button or Arrow Right key
- Verify all element selectors highlight the correct UI components
- Click the ▶ Intro Tour footer button to confirm manual trigger works
Use browser console to reset tour state without clearing all localStorage: localStorage.removeItem('tour-seen-custom-dfmea-tour'). Replace custom-dfmea-tour with your actual tourId.
See Also