[Stack Overflow] Content Previews
Problem to solve
Our users extensively use Stack Overflow (SO) to find solutions to their problems and learn new things. Over the last 10 years (
However, when scanning through an issue thread, links to solutions on SO can quickly get lost in the sea of other text and links. To this end, this proposal seeks to make SO content easier to quickly identify and preview, without the need for visiting the page directly.
Intended users
This feature will benefit any users of GitLab Create who are reading through issues where there are links to SO pages. Primarily, this will be Developers and other technical personas.
Further details
Benefits
- Improved scannability and readability of issue threads
- Improved context for SO links, making them more valuable
- Reduced need for users to visit external site when reviewing issue
Goals
- Reduce overall time required to review an issue containing SO links
Proposal
To accomplish our goals, we will parse any links from SO that are included in an Issue comment element, and attach a preview of the SO page in that element.
The data will be displayed in a simple link preview pane that shows the posed Question, a preview of the top Answer, and a link to the canonical page itself.
Feasibility
- This data should be available via the StackExchange API
- StackExchange offers and Javascript SDK which should make it straightforward to integrate with our frontend
- It can currently be pulled on the StackExchange Data Explorer), which seems to indicate it should be available through other means
Permissions and Security
Documentation
Documentation should be added to the Issue docs, outlining what sources currently expand links, what content they will display on expansion, and an invitation for developers to submit Issues to the GitLab product to add integrations with their own content.
Testing
- A test will need to be added to the UI spec that ensures that links are being appropriately expanded by the UI.
Scenarios:
- Given that the question has a selected answer, when displaying a preview, the preview displays the content of the selected answer.
- Given that the question has NO selected answer, when displaying a preview, the preview displays the content of the highest-voted answer.
- Given that the question has NO ANSWERS, when displaying the preview, the preview indicates no answers have been added.