Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/doc_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Report a doc issue
description: Tell us about an issue you may have identified in OUDS Web documentation.
title: "Provide a general summary of the issue"
labels: ["🐞 bug", "📖 documentation"]
assignees: "-"
body:
- type: checkboxes
attributes:
label: Prerequisites
description: Take a couple minutes to help our maintainers work faster.
options:
- label: I have [searched](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues and checked on [main](https://ouds-main--boosted.netlify.app/) that it still appears.
required: true
- label: I have read the [contributing guidelines](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/blob/ouds/main/.github/CONTRIBUTING.md)
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the issue
description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce.
validations:
required: true
- type: input
id: user-agent
attributes:
label: Any information that could help to resolve the issue. (window.navigator.userAgent)
placeholder: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Firefox/140.0"
- type: input
id: version
attributes:
label: What version of the documentation are you using?
placeholder: "e.g., v0.1.0"
validations:
required: true
2 changes: 2 additions & 0 deletions site/src/assets/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@

import sidebarScroll from './partials/sidebar.js'
import removeBackToTopWhenNotNeeded from './partials/back-to-top.js' // OUDS mod
import addUserAgent from './partials/user-agent.js' // OUDS mod
import addTabindex from './partials/tabindex.js' // OUDS mod
import snippets from './partials/snippets.js'

sidebarScroll()
removeBackToTopWhenNotNeeded() // OUDS mod
addUserAgent() // OUDS mod
addTabindex() // OUDS mod
snippets()
19 changes: 19 additions & 0 deletions site/src/assets/partials/user-agent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++

/*
* JavaScript for OUDS Web's docs (https://web.unified-design-system.orange.com/)
* Copyright 2015-2025 The OUDS Web Authors
* Copyright 2015-2025 Orange
* Licensed under MIT (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/blob/ouds/main/LICENSE)
* For details, see https://creativecommons.org/licenses/by/3.0/.
*/

// OUDS mod: Add userAgent on GitHub issues link
export default () => {
document.querySelectorAll('.add-user-agent').forEach(element => {
element.href += encodeURIComponent(`&user-agent=${window.navigator.userAgent}`)
Comment thread
vprothais marked this conversation as resolved.
Outdated
})
}
// End mod
36 changes: 31 additions & 5 deletions site/src/layouts/DocsLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getVersionedDocsPath } from '@libs/path'
import BaseLayout from '@layouts/BaseLayout.astro'
import DocsSidebar from '@components/DocsSidebar.astro'
import TableOfContents from '@components/TableOfContents.astro'
import GitHubIcon from '@components/icons/GitHubIcon.astro'

interface Props {
frontmatter: CollectionEntry<'docs'>['data']
Expand Down Expand Up @@ -74,25 +75,50 @@ const multipleComponents = componentsVersions.length > 1 ? 's' : ''
<main class="bd-main order-1">
<div class="bd-intro pt-small ps-lg-small">
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<div class="mb-large mb-md-none d-flex text-nowrap">
<div class="d-flex gap-medium mb-large mb-md-none text-nowrap">
{
// This is needed because we want to show the badge if show_badge isn't present or is set to false
frontmatter.added &&
((frontmatter.added.show_badge !== undefined && frontmatter.added.show_badge === true) ||
frontmatter.added.show_badge === undefined) && (
<p class="mb-none me-small">
<p class="mb-none">
<span class="tag tag-small">Added in v{frontmatter.added.version}</span>
</p>
)
}
<a
class="btn btn-default"
class="btn btn-default btn-icon"
href={`${getConfig().repo}/blob/v${getConfig().current_version}-ouds-web/site/src/content/docs/${id}`}
title="View and edit this file on GitHub"
title="View this file on GitHub"
target="_blank"
rel="noopener"
>
View on GitHub
<span class="visually-hidden">View this file on GitHub</span>
<GitHubIcon class="pe-none" />
</a>
<a
class="btn btn-icon btn-default add-user-agent"
href={`${getConfig().repo}/issues/new?template=doc_report.yml&title=${encodeURIComponent(`Update the ${id.slice(0, -4)} page on ${getConfig().brand}`)}&version=${encodeURIComponent(getConfig().docs_version)}&labels=${encodeURIComponent('💪 contribution')}&what-happened=${encodeURIComponent(`I report a bug concerning ${id.slice(0, -4)} :`)}`}
title={`Report a bug on the ${id.slice(0, -4).split('/').pop()} page`}
target="_blank"
rel="noopener"
>
<svg aria-hidden="true">
<use xlink:href={`${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#bug')}`}></use>
</svg>
<span class="visually-hidden">Report a bug on the {id.slice(0, -4).split('/').pop()} page</span>
</a>
<a
class="btn btn-icon btn-default"
href={`${getConfig().repo}/discussions/new?category=q-a&title=${encodeURIComponent(`Question about ${id.slice(0, -4).split('/').pop()} on ${getConfig().brand}`)}&body=${encodeURIComponent('I have a question about ...')}`}
title={`Ask a question about ${id.slice(0, -4).split('/').pop()} topic`}
target="_blank"
rel="noopener"
>
<svg aria-hidden="true">
Comment thread
louismaximepiton marked this conversation as resolved.
Comment thread
louismaximepiton marked this conversation as resolved.
<use xlink:href={`${getVersionedDocsPath('/assets/img/ouds-web-sprite.svg#message-talk')}`}></use>
</svg>
<span class="visually-hidden">Ask a question about {id.slice(0, -4).split('/').pop()} topic</span>
</a>
</div>
<h1 class="bd-title mb-none" id="content">{frontmatter.title}</h1>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading