[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 (:tada:) SO has become a truly invaluable resource in the toolbelt of the modern software and IT professional. 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. ### Building support for further integrations Per https://gitlab.com/gitlab-org/gitlab/issues/25924, we'd like to be able to support content unfurling for a wide variety of 3rd party products and services. This issue will be a first foray in to this ability, creating the UI hooks and views needed to continue to develop this functionality. It's essential that we make sure that this is done in a thoughtful and extensible way to save us time as we add more features here. ### Intended users <!-- Who will use this feature? If known, include any of the following: types of users (e.g. Developer), personas, or specific company roles (e.g. Release Manager). It's okay to write "Unknown" and fill this field in later. Personas can be found at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ --> 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](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/) and other technical personas. ### Further details <!-- Include use cases, benefits, and/or goals (contributes to our vision?) --> #### Benefits - Lays the groundwork for future unfurling integrations - 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 - Make our content richer and more valuable to users ### Proposal <!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey --> **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. ### Considerations * We should evaluate supporting current standards such as [oEmbed](https://oembed.com/) or [Open Graph](https://ogp.me/) * This feature should be implemented in such a way that additional unfurling integrations can be added later. ### Feasibility - This data should be available via the [StackExchange API](https://api.stackexchange.com/docs) - 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](https://data.stackexchange.com/stackoverflow/query/1065402/example-simple-question-and-answer-query)), which seems to indicate it should be available through other means ### Permissions and Security <!-- What permissions are required to perform the described actions? Are they consistent with the existing permissions as documented for users, groups, and projects as appropriate? Is the proposed behavior consistent between the UI, API, and other access methods (e.g. email replies)? --> ### Documentation <!-- See the Feature Change Documentation Workflow https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html Add all known Documentation Requirements here, per https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#documentation-requirements --> 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 <!-- What risks does this change pose? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? See the test engineering process for further guidelines: https://about.gitlab.com/handbook/engineering/quality/guidelines/test-engineering/ --> - 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. ### What does success look like, and how can we measure that? <!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. --> ### Links / references <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
issue