Skip to content

Add tour infrastructure#966

Open
srzeszut wants to merge 4 commits intolive-debugger-tourfrom
live-debugger-tour-dev
Open

Add tour infrastructure#966
srzeszut wants to merge 4 commits intolive-debugger-tourfrom
live-debugger-tour-dev

Conversation

@srzeszut
Copy link
Copy Markdown
Contributor

@srzeszut srzeszut commented Apr 3, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive tour infrastructure to LiveDebugger, enabling interactive guided tours/walkthroughs through the debugger UI. The implementation includes:

  • A centralized tour elements mapping system that defines all tour-able UI elements
  • Bidirectional communication between the debugged application and the debugger frontend for tour events
  • A client-side Tour hook that handles visual highlighting, spotlighting, and user interaction
  • Demo buttons for testing tour functionality
  • Proper channel handling for tour-specific events

Changes:

  • Added TourElements module to define and manage tour element IDs
  • Added tour event handling infrastructure in the client channel and client communication layer
  • Implemented a Tour LiveView hook with support for "highlight" and "spotlight" actions and multiple dismiss strategies
  • Added CSS styling for tour visual elements (highlights and overlay)
  • Integrated tour hook into the debugger app
  • Added demo buttons in the development view to test tour functionality

Reviewed changes

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

Show a summary per file
File Description
lib/tour_elements.ex Centralized mapping of tour element names to HTML IDs
lib/live_debugger/client/channel.ex Added handler for tour-prefixed messages from client
lib/live_debugger/client.ex Added tour event subscription callback
lib/live_debugger/app/debugger/web/debugger_live.ex Integrated tour event handling and storage
lib/live_debugger/app/debugger/web/hooks/async_lv_process.ex Added tour step fetching on initialization
assets/app/hooks/tour.js New hook implementing tour UI interactions
assets/app/app.js Imported and registered Tour hook
assets/app/app.css Added CSS styling for tour visual elements
assets/client/client.js Added client-side tour event listeners
dev/live_views/main.ex Added demo buttons for testing tour functionality

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


/* Tour */
.tour-highlight {
outline: 3px solid var( --swm-pink-100);
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

There is an extra space before the CSS variable name in the var() function. This should be removed for consistency with CSS best practices and the rest of the codebase.

Suggested change
outline: 3px solid var( --swm-pink-100);
outline: 3px solid var(--swm-pink-100);

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +69
console.log({ payload });

const key = `${action}:${payload.target}:${payload.dismiss}`;
console.log({ key });
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

Debug console.log statements should be removed before production. These are used to debug the tour functionality and should not be in the final code.

Suggested change
console.log({ payload });
const key = `${action}:${payload.target}:${payload.dismiss}`;
console.log({ key });
const key = `${action}:${payload.target}:${payload.dismiss}`;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants