-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Feature Name
Integrate @tutorials content within main documentation app container
Description
Currently, tutorial content (@tutorials, @Article, @TutorialReference) is rendered in a separate /tutorials/
URL path, creating a disconnected experience. When users click on tutorial references from within the documentation, they are taken to a separate URL structure, which breaks the continuous reading experience. This issue was highlighted in the Swift forums: https://forums.swift.org/t/navigation-to-main-docs-from-a-tutorial/65011
The proposed solution would integrate tutorial content directly within the main documentation view using the existing div id="app"
container. This would involve:
- Modifying the documentation renderer to handle tutorial content within the main app container
- Updating the router to maintain documentation URL structure when displaying tutorials
- Ensuring all tutorial-specific features and styling are preserved when rendered inline
- Updating navigation handling to maintain proper state and history
Different viewport considerations:
- Desktop: Full documentation view with integrated tutorial content
- Mobile: Responsive layout preserving tutorial functionality
- Tablet: Adaptive layout maintaining content hierarchy
Accessibility considerations:
- Maintain proper heading structure across documentation and tutorials
- Preserve keyboard navigation between content types
- Ensure ARIA landmarks and roles are properly updated
Motivation
This feature addresses the need for a more seamless documentation experience. Users should be able to navigate between reference documentation and tutorials without context switches or URL changes. The current separation creates unnecessary friction in the learning process and makes it harder for users to follow documentation flows that include both reference and tutorial content.
Importance
This feature significantly improves the user experience by:
- Creating a seamless learning environment
- Maintaining context when moving between documentation types
- Improving content discoverability
- Supporting more natural documentation flows
While it's currently possible to access tutorials through separate URLs, this change would fundamentally improve how users interact with Swift documentation, making it more intuitive and efficient.
Alternatives Considered
Alternative approaches considered:
- Creating a unified navigation system while keeping separate URLs
- Using iframe embedding for tutorial content
- Implementing a split-view mode showing both documentation and tutorials
These alternatives were less ideal because they either maintain the context switch between content types or introduce additional complexity without solving the core user experience issue.