From 4ba018f04825f208d4cd7316ca343b568dd146a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A1udia?= Date: Fri, 31 Jul 2026 18:31:02 +0100 Subject: [PATCH 1/3] docs: add tabbed navigation with full section restructuring Introduces navigation.tabs and restructures the nav into four top-level tabs (Product, Management, Developer Tools, Release Notes) with matching sidebar icon and styling changes. Co-Authored-By: Claude Sonnet 5 --- docs/assets/javascripts/docs-theme.js | 19 +- mkdocs.yml | 289 +++++++++--------- .../vendor/ionicons/svg/umbrella-outline.svg | 1 + theme/partials/nav-item.html | 9 +- theme/stylesheets/header.css | 2 +- theme/stylesheets/layout.css | 2 +- theme/stylesheets/navigation.css | 27 +- theme/stylesheets/responsive.css | 25 ++ 8 files changed, 228 insertions(+), 146 deletions(-) create mode 100644 theme/assets/vendor/ionicons/svg/umbrella-outline.svg diff --git a/docs/assets/javascripts/docs-theme.js b/docs/assets/javascripts/docs-theme.js index bca89dd5f2..2bc3f9e41b 100644 --- a/docs/assets/javascripts/docs-theme.js +++ b/docs/assets/javascripts/docs-theme.js @@ -158,9 +158,24 @@ function initializeDocsTheme() { if (drawerToggle.checked) { window.setTimeout(function () { - var firstLink = drawer.querySelector(".md-nav__list a[href]"); + // With navigation.tabs, every tab's subtree stays mounted in the + // drawer (Material slides the active one into view instead of + // removing the rest). Opening the drawer reliably leaves + // .md-sidebar__scrollwrap scrolled one panel-width to the right, + // hiding the active tab's own list off-screen. Force it back to + // the resting position before moving focus. + var scrollwrap = drawer.querySelector(".md-sidebar__scrollwrap"); + if (scrollwrap) { + scrollwrap.scrollLeft = 0; + } + + // The first link in document order can belong to a tab that + // isn't currently visible; focusing it without a scoped lookup + // would re-trigger the same off-screen scroll. Prefer the + // active tab's first link, and pass preventScroll as a backstop. + var firstLink = drawer.querySelector(".md-nav__item--active > .md-nav .md-nav__list a[href]") || drawer.querySelector(".md-nav__list a[href]"); if (firstLink) { - firstLink.focus(); + firstLink.focus({ preventScroll: true }); } }, 0); } else { diff --git a/mkdocs.yml b/mkdocs.yml index 85ab3421ae..78ea4ddc70 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -39,6 +39,8 @@ theme: - "content.code.copy" - "content.tabs.link" - "navigation.path" + - "navigation.tabs" + - "navigation.tabs.sticky" extra_css: - "stylesheets/fonts.css" - "stylesheets/tokens.css" @@ -67,23 +69,29 @@ extra: user_feedback: "true" community_url: "https://community.codacy.com/" support_email: "support@codacy.com" - # Ionicons displayed for top-level entries in the navigation sidebar. + # Ionicons displayed for top-level tabs and, when navigation.tabs is + # active, for the top section within each tab's sidebar (see level == 2 + # handling in theme/partials/nav-item.html). sidebar_icons: + "Product": "business-outline" + "Management": "settings-outline" + "Developer Tools": "terminal-outline" + "Release Notes": "megaphone-outline" "Documentation home": "home-outline" "Getting started": "rocket-outline" - "Codacy Guardrails (IDE Extension)": "shield-checkmark-outline" - "Codacy Cloud CLI": "terminal-outline" - "Codacy AI": "sparkles-outline" - "Repositories on Codacy": "folder-open-outline" - "Configuring your repositories": "settings-outline" + "Quality": "code-slash-outline" + "Security": "shield-checkmark-outline" + "AI": "sparkles-outline" + "Coverage": "umbrella-outline" + "Support": "medical-outline" + "Configuring your repositories": "folder-open-outline" "Organizations": "people-outline" - "Enterprise Cloud": "business-outline" "Your account": "person-circle-outline" - "Codacy API": "code-slash-outline" + "Enterprise Cloud": "business-outline" "Managing Codacy Self-hosted": "server-outline" - "Troubleshooting and FAQs": "medical-outline" - "Release notes": "megaphone-outline" - "Special thanks": "heart-outline" + "Codacy Guardrails (IDE Extension)": "shield-checkmark-outline" + "Codacy Cloud CLI": "code-slash-outline" + "Codacy API": "share-social-outline" # Do not show a generated-by badge in the footer. generator: false # Add pull request preview banner @@ -613,138 +621,141 @@ plugins: "repositories-configure/file-extensions.md": "repositories-configure/languages.md" nav: - - Documentation home: "index.md" - - Getting started: - - getting-started/codacy-quickstart.md - - getting-started/configuring-your-repository.md - - getting-started/integrating-codacy-with-your-git-workflow.md - - Integrating Codacy with your IDE: - - getting-started/integrating-codacy-with-intellij-ides.md - - getting-started/integrating-codacy-with-visual-studio-code.md - - getting-started/supported-languages-and-tools.md - - getting-started/which-permissions-does-codacy-need-from-my-account.md - - getting-started/adding-a-codacy-badge.md - - Codacy Guardrails (IDE Extension): - - codacy-guardrails/codacy-guardrails-getting-started.md - - codacy-guardrails/codacy-guardrails-how-to-use.md - - codacy-guardrails/codacy-guardrails-how-to-configure-rules.md - - codacy-guardrails/codacy-guardrails-limitations.md - - codacy-guardrails/codacy-guardrails-troubleshooting.md - - codacy-guardrails/codacy-guardrails-faq.md - - Codacy Cloud CLI: - - codacy-cloud-cli/index.md - - Codacy AI: - - codacy-ai/codacy-ai.md - - Repositories on Codacy: - - repositories/repository-dashboard.md - - repositories/commits.md - - repositories/files.md - - repositories/issues.md - - repositories/coverage.md - - repositories/pull-requests.md - - Configuring your repositories: - - repositories-configure/configuring-code-patterns.md - - repositories-configure/managing-branches.md - - Managing integrations: - - repositories-configure/integrations/github-integration.md - - repositories-configure/integrations/gitlab-integration.md - - repositories-configure/integrations/bitbucket-integration.md - - repositories-configure/integrations/post-commit-hooks.md - - repositories-configure/ignoring-files.md - - repositories-configure/languages.md - - repositories-configure/adjusting-quality-gates.md - - repositories-configure/adjusting-quality-goals.md - - Setting up code coverage: + - Product: + - Documentation home: "index.md" + - Getting started: + - getting-started/codacy-quickstart.md + - getting-started/configuring-your-repository.md + - getting-started/integrating-codacy-with-your-git-workflow.md + - Integrating Codacy with your IDE: + - getting-started/integrating-codacy-with-intellij-ides.md + - getting-started/integrating-codacy-with-visual-studio-code.md + - getting-started/supported-languages-and-tools.md + - getting-started/which-permissions-does-codacy-need-from-my-account.md + - getting-started/adding-a-codacy-badge.md + - Quality: + - repositories/issues.md + - repositories-configure/configuring-code-patterns.md + - repositories-configure/adjusting-quality-gates.md + - repositories-configure/adjusting-quality-goals.md + - organizations/using-coding-standards.md + - organizations/using-gate-policies.md + - Using your repository: + - repositories/repository-dashboard.md + - repositories/commits.md + - repositories/files.md + - repositories/pull-requests.md + - Security: + - organizations/managing-security-and-risk.md + - Slack integration for Security issues: organizations/integrations/slack-integration.md + - Jira integration for Security and risk management: organizations/integrations/jira-integration.md + - AI: + - codacy-ai/codacy-ai.md + - organizations/ai-risk-hub.md + - Coverage: + - repositories/coverage.md - coverage-reporter/index.md - coverage-reporter/alternative-ways-of-running-coverage-reporter.md - coverage-reporter/uploading-coverage-in-advanced-scenarios.md - coverage-reporter/troubleshooting-coverage-cli-issues.md - - Local analysis: - - repositories-configure/local-analysis/client-side-tools.md - - repositories-configure/local-analysis/running-aligncheck.md - - repositories-configure/local-analysis/running-dartanalyzer.md - - repositories-configure/local-analysis/running-deadcode.md - - repositories-configure/local-analysis/running-spotbugs.md - - repositories-configure/local-analysis/running-eslint.md - - repositories-configure/using-submodules.md - - repositories-configure/codacy-configuration-file.md - - repositories-configure/removing-your-repository.md - - Organizations: - - organizations/what-are-organizations.md - - organizations/managing-repositories.md - - organizations/segments.md - - Reporting: - - organizations/reporting/organization-overview.md - - organizations/reporting/issues-metrics.md - - organizations/reporting/codacy-usage.md - - organizations/using-gate-policies.md - - organizations/using-coding-standards.md - - organizations/ai-risk-hub.md - - Managing integrations: + - Enterprise Cloud: + - enterprise-cloud/github-enterprise-cloud.md + - Managing Codacy Self-hosted: "!include submodules/chart/mkdocs.yml" + - Support: + - General: + - faq/general/which-platforms-and-technologies-does-codacy-support.md + - faq/general/how-does-codacy-support-github-enterprise.md + - faq/general/how-does-codacy-support-gitlab-cloud.md + - faq/general/how-does-codacy-support-gitlab-enterprise.md + - faq/general/how-does-codacy-support-bitbucket-cloud.md + - faq/general/how-does-codacy-support-bitbucket-server.md + - faq/general/how-does-codacy-keep-my-data-secure.md + - faq/general/how-does-codacy-protect-my-privacy.md + - faq/general/does-codacy-keep-audit-logs.md + - faq/general/how-do-i-allowlist-codacy-cloud-on-my-git-provider.md + - faq/general/how-can-i-change-or-cancel-my-plan.md + - Repositories: + - faq/repositories/how-do-i-reanalyze-my-repository.md + - faq/repositories/i-renamed-my-repository-on-the-git-provider.md + - Code analysis: + - faq/code-analysis/which-metrics-does-codacy-calculate.md + - faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md + - faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md + - faq/code-analysis/does-codacy-check-for-dependencies.md + - faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md + - faq/code-analysis/how-to-skip-an-analysis.md + - faq/code-analysis/can-i-bypass-codacy-status-check.md + - faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md + - Troubleshooting: + - faq/troubleshooting/why-cant-i-see-my-organization.md + - faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md + - faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md + - faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md + - faq/troubleshooting/not-a-member-of-the-organization.md + - faq/troubleshooting/we-no-longer-have-access-to-this-repository.md + - faq/troubleshooting/why-is-my-file-over-150-kb-missing.md + - faq/troubleshooting/error-line-endings.md + - Management: + - Configuring your repositories: + - repositories-configure/managing-branches.md + - Managing integrations: + - repositories-configure/integrations/github-integration.md + - repositories-configure/integrations/gitlab-integration.md + - repositories-configure/integrations/bitbucket-integration.md + - repositories-configure/integrations/post-commit-hooks.md + - repositories-configure/ignoring-files.md + - repositories-configure/languages.md + - Local analysis: + - repositories-configure/local-analysis/client-side-tools.md + - repositories-configure/local-analysis/running-aligncheck.md + - repositories-configure/local-analysis/running-dartanalyzer.md + - repositories-configure/local-analysis/running-deadcode.md + - repositories-configure/local-analysis/running-spotbugs.md + - repositories-configure/local-analysis/running-eslint.md + - repositories-configure/using-submodules.md + - repositories-configure/codacy-configuration-file.md + - repositories-configure/removing-your-repository.md + - Organizations: + - organizations/what-are-organizations.md + - organizations/managing-repositories.md + - organizations/segments.md + - Reporting: + - organizations/reporting/organization-overview.md + - organizations/reporting/issues-metrics.md + - organizations/reporting/codacy-usage.md - organizations/integrations/default-git-provider-integration-settings.md - - Slack integration for Security issues: organizations/integrations/slack-integration.md - - Jira integration for Security and risk management: organizations/integrations/jira-integration.md - - organizations/managing-security-and-risk.md - - organizations/managing-people.md - - organizations/audit-logs-for-organizations.md - - organizations/roles-and-permissions-for-organizations.md - - organizations/changing-your-plan-and-billing.md - - Enterprise Cloud: - - enterprise-cloud/github-enterprise-cloud.md - - Your account: - - account/managing-your-profile.md - - account/emails.md - - account/user-session-management.md - - Codacy API: - - codacy-api/using-the-codacy-api.md - - codacy-api/api-tokens.md - - API v3 reference (recommended): https://api.codacy.com/api/api-docs - - API v2 reference: https://api.codacy.com/api-docs - - Examples: - - codacy-api/examples/adding-people-to-codacy-programmatically.md - - codacy-api/examples/adding-repositories-to-codacy-programmatically.md - - codacy-api/examples/creating-repository-api-tokens-programmatically.md - - codacy-api/examples/obtaining-code-quality-metrics-for-files.md - - codacy-api/examples/obtaining-current-issues-in-repositories.md - - codacy-api/examples/identifying-commits-without-coverage-data.md - - codacy-api/examples/uploading-dast-results.md - - codacy-api/examples/triggering-dast-scans.md - - Managing Codacy Self-hosted: "!include submodules/chart/mkdocs.yml" - - Troubleshooting and FAQs: - - General: - - faq/general/which-platforms-and-technologies-does-codacy-support.md - - faq/general/how-does-codacy-support-github-enterprise.md - - faq/general/how-does-codacy-support-gitlab-cloud.md - - faq/general/how-does-codacy-support-gitlab-enterprise.md - - faq/general/how-does-codacy-support-bitbucket-cloud.md - - faq/general/how-does-codacy-support-bitbucket-server.md - - faq/general/how-does-codacy-keep-my-data-secure.md - - faq/general/how-does-codacy-protect-my-privacy.md - - faq/general/does-codacy-keep-audit-logs.md - - faq/general/how-do-i-allowlist-codacy-cloud-on-my-git-provider.md - - faq/general/how-can-i-change-or-cancel-my-plan.md - - Repositories: - - faq/repositories/how-do-i-reanalyze-my-repository.md - - faq/repositories/i-renamed-my-repository-on-the-git-provider.md - - Code analysis: - - faq/code-analysis/which-metrics-does-codacy-calculate.md - - faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md - - faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md - - faq/code-analysis/does-codacy-check-for-dependencies.md - - faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md - - faq/code-analysis/how-to-skip-an-analysis.md - - faq/code-analysis/can-i-bypass-codacy-status-check.md - - faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md - - Troubleshooting: - - faq/troubleshooting/why-cant-i-see-my-organization.md - - faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md - - faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md - - faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md - - faq/troubleshooting/not-a-member-of-the-organization.md - - faq/troubleshooting/we-no-longer-have-access-to-this-repository.md - - faq/troubleshooting/why-is-my-file-over-150-kb-missing.md - - faq/troubleshooting/error-line-endings.md - - Release notes: + - organizations/managing-people.md + - organizations/audit-logs-for-organizations.md + - organizations/roles-and-permissions-for-organizations.md + - organizations/changing-your-plan-and-billing.md + - Your account: + - account/managing-your-profile.md + - account/emails.md + - account/user-session-management.md + - Developer Tools: + - Codacy Guardrails (IDE Extension): + - codacy-guardrails/codacy-guardrails-getting-started.md + - codacy-guardrails/codacy-guardrails-how-to-use.md + - codacy-guardrails/codacy-guardrails-how-to-configure-rules.md + - codacy-guardrails/codacy-guardrails-limitations.md + - codacy-guardrails/codacy-guardrails-troubleshooting.md + - codacy-guardrails/codacy-guardrails-faq.md + - Codacy Cloud CLI: codacy-cloud-cli/index.md + - Codacy API: + - codacy-api/using-the-codacy-api.md + - codacy-api/api-tokens.md + - API v3 reference (recommended): https://api.codacy.com/api/api-docs + - API v2 reference: https://api.codacy.com/api-docs + - Examples: + - codacy-api/examples/adding-people-to-codacy-programmatically.md + - codacy-api/examples/adding-repositories-to-codacy-programmatically.md + - codacy-api/examples/creating-repository-api-tokens-programmatically.md + - codacy-api/examples/obtaining-code-quality-metrics-for-files.md + - codacy-api/examples/obtaining-current-issues-in-repositories.md + - codacy-api/examples/identifying-commits-without-coverage-data.md + - codacy-api/examples/uploading-dast-results.md + - codacy-api/examples/triggering-dast-scans.md + - Release Notes: - release-notes/index.md - Cloud: - 2026: @@ -907,4 +918,4 @@ nav: - release-notes/self-hosted/self-hosted-v1.1.0.md - release-notes/self-hosted/self-hosted-v1.0.1.md - release-notes/self-hosted/self-hosted-v1.0.0.md - - special-thanks.md + - special-thanks.md diff --git a/theme/assets/vendor/ionicons/svg/umbrella-outline.svg b/theme/assets/vendor/ionicons/svg/umbrella-outline.svg new file mode 100644 index 0000000000..bf36ce81c1 --- /dev/null +++ b/theme/assets/vendor/ionicons/svg/umbrella-outline.svg @@ -0,0 +1 @@ + diff --git a/theme/partials/nav-item.html b/theme/partials/nav-item.html index 420a8fe856..e65ca5ec05 100644 --- a/theme/partials/nav-item.html +++ b/theme/partials/nav-item.html @@ -17,7 +17,7 @@ {% macro render_content(nav_item, ref, level = none) %} {% set ref = ref or nav_item %} {% set section_icons = config.extra.sidebar_icons or {} %} - {% if level == 1 and section_icons.get(nav_item.title) %} + {% if (level == 1 or (level == 2 and "navigation.tabs" in features)) and section_icons.get(nav_item.title) %} {{ icon(section_icons.get(nav_item.title), "docs-nav-section-icon" ~ ("" if nav_item.children else " docs-nav-section-icon--standalone")) }} {% elif nav_item.meta and nav_item.meta.icon %} {% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %} @@ -63,7 +63,12 @@
  • {% if not is_pruned %} {% set checked = "checked" if nav_item.active %} - {% if "navigation.expand" in features and not checked %}{% set indeterminate = "md-toggle--indeterminate" %}{% endif %} + {# Every level looks expanded by default on desktop. `md-toggle--indeterminate` + drives Material's desktop-only grid-collapse CSS (@media min-width: 76.25em) + without touching `checked` itself or requiring JS: it has zero effect within + the mobile media query, so the lifted drawer's one-branch-at-a-time behavior + there is untouched, and there's no post-load re-render to flash on page load. #} + {% if not checked %}{% set indeterminate = "md-toggle--indeterminate" %}{% endif %} {% if not index %} {% set tabindex = "0" if not is_section %} diff --git a/theme/stylesheets/header.css b/theme/stylesheets/header.css index fc3ba65bd6..3379ca7b8e 100644 --- a/theme/stylesheets/header.css +++ b/theme/stylesheets/header.css @@ -1,4 +1,4 @@ -.md-header { border-bottom: 1px solid var(--docs-border); background: color-mix(in srgb, var(--docs-bg) 68%, transparent); box-shadow: none; -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); } +.md-header { border-bottom: 0; background: color-mix(in srgb, var(--docs-bg) 68%, transparent); box-shadow: none; -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); } .md-header__inner { display: grid; grid-template-columns: auto 1fr minmax(15rem, 30rem) 1fr auto auto auto; gap: .65rem; min-height: 4rem; align-items: center; } .md-header__button { margin: 0; color: var(--docs-text-secondary); } diff --git a/theme/stylesheets/layout.css b/theme/stylesheets/layout.css index e27e31989f..df67cee333 100644 --- a/theme/stylesheets/layout.css +++ b/theme/stylesheets/layout.css @@ -1,4 +1,4 @@ -.md-header__inner, .md-main__inner, .docs-footer__inner { +.md-header__inner, .md-main__inner, .docs-footer__inner, .md-tabs .md-grid { box-sizing: border-box; max-width: 90rem; margin-inline: auto; diff --git a/theme/stylesheets/navigation.css b/theme/stylesheets/navigation.css index c89198ec73..f5d67a1151 100644 --- a/theme/stylesheets/navigation.css +++ b/theme/stylesheets/navigation.css @@ -9,12 +9,21 @@ .md-sidebar--primary .md-nav--primary > .md-nav__list { padding-inline: 1rem; } .md-sidebar--primary .md-nav--primary .md-nav__link { margin-inline: 0; padding: .5rem; border-radius: var(--docs-radius-sm); } -.docs-nav-section-icon { flex: 0 0 .95rem; width: .95rem; height: .95rem; margin-right: .45rem; color: var(--docs-text-secondary); } +/* Material's stock ".md-nav__link svg { height: 1.3em }" outranks a plain + class selector on specificity, stretching every sidebar icon vertically. + Qualify with the element type to match and win on source order instead. */ +svg.docs-nav-section-icon { flex: 0 0 .95rem; width: .95rem; height: .95rem; margin-right: .45rem; color: var(--docs-text-secondary); } .docs-nav-section-icon--standalone { color: var(--docs-text-secondary); transition: color .12s ease; } .md-nav__link--active .docs-nav-section-icon--standalone { color: var(--docs-link); } .md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item { margin-block: .25rem; } .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link { margin-top: 0; } +/* Material's stock ".md-nav__link:focus { color: var(--md-accent-fg-color) }" + fires on plain :focus, not just :focus-visible — a link stays focused (and + blue) after a mouse click, not only real keyboard navigation, which reads + as a second "active" item sitting right under the actual one. Restrict the + accent color to genuine keyboard focus and non-active links. */ +.md-nav__link:focus:not(:focus-visible):not(.md-nav__link--active) { color: var(--docs-text-secondary); } .md-sidebar--primary .md-nav__link:is(:hover, :focus-visible) { color: var(--docs-text); background: var(--docs-bg-secondary); } .md-sidebar--primary .md-nav__item .md-nav__link--active { background: var(--docs-bg-brand); } .md-sidebar--primary .md-nav__item .md-nav__link--active:is(:hover, :focus-visible) { color: var(--docs-link); background: var(--docs-bg-brand); } @@ -37,6 +46,13 @@ .md-nav--primary .md-nav__toggle ~ .md-nav > .md-nav__list { padding-left: 0; } .md-nav--primary .md-nav .md-nav__toggle ~ .md-nav > .md-nav__list { padding-left: .8rem; } + +/* Align level-3 pages (the ones revealed when you expand a tab's top-level + group) with that group's own text, not just Material's default indent. + Scoped to exactly this depth via a full child-selector chain so it + doesn't cascade into deeper levels (FAQ subcategories, release-notes + years), which should keep the smaller default indent. */ +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list { padding-left: 1.8rem; } .md-sidebar__scrollwrap { overscroll-behavior: contain; scrollbar-color: auto !important; scrollbar-gutter: auto; scrollbar-width: auto !important; } .md-sidebar__scrollwrap::-webkit-scrollbar, .md-sidebar__scrollwrap::-webkit-scrollbar-thumb, .md-sidebar__scrollwrap::-webkit-scrollbar-track { width: auto; height: auto; background: initial !important; } .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover { background: initial !important; } @@ -62,3 +78,12 @@ .md-path__item + .md-path__item::before { display: none; } .docs-ionicon--breadcrumb { flex: 0 0 .8rem; width: .8rem; height: .8rem; margin: 0 .2rem; color: var(--docs-text-tertiary); } .md-path__item:first-child .docs-ionicon--breadcrumb { display: none; } + +.md-tabs { border-bottom: 1px solid var(--docs-border); background: transparent; } +.md-tabs__list { gap: .25rem; margin-inline: 0; } +.md-tabs__item { height: 2.75rem; padding-inline: .5rem; } +.md-tabs__item:first-child { padding-left: 0; } +.md-tabs__item:last-child { padding-right: 0; } +.md-tabs__link { display: flex; height: 100%; align-items: center; margin-top: 0; padding: 0 .1rem; border-bottom: 2px solid transparent; color: var(--docs-text-secondary); font-size: .8125rem; font-weight: 500; opacity: 1; transition: color .12s ease, border-color .12s ease; } +.md-tabs__link:hover { color: var(--docs-text); } +.md-tabs__item--active .md-tabs__link { border-bottom-color: var(--docs-link); color: var(--docs-link); font-weight: 600; opacity: 1; } diff --git a/theme/stylesheets/responsive.css b/theme/stylesheets/responsive.css index 4ac0c5338a..df4e45b73c 100644 --- a/theme/stylesheets/responsive.css +++ b/theme/stylesheets/responsive.css @@ -24,6 +24,31 @@ .md-header__button[data-drawer-trigger] { display: none; } .md-nav--primary > .md-nav__title { display: none; } + /* The active tab's own name already shows in the .md-tabs bar above, so + drop the redundant repeated label at the top of its sidebar (mobile + still needs it — it's the only place a tab name appears there). */ + .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link { display: none; } + + /* Material's own lifted-nav rule pulls each tab's level-2 list left by + .6rem (it assumes the now-hidden tab-name label above it needs the + extra room). With that label gone, the negative margin instead shifts + level-2 icons past the sidebar's left edge, clipping them. */ + [dir="ltr"] .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav:not(.md-nav--secondary) { margin-left: 0; } + [dir="rtl"] .md-nav--lifted > .md-nav__list > .md-nav__item > .md-nav:not(.md-nav--secondary) { margin-right: 0; } + + /* Give each tab's top-level items (e.g. "Quality", "Configuring your + repositories", but also flat pages like "AI" or "Documentation home") + the same small/bold/uppercase treatment the tab-name label above used + to have, now that it's the highest-level heading actually visible in + the sidebar. Applied uniformly regardless of whether the item has + children, so flat pages don't look out of place next to groups. */ + .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav > .md-nav__list > .md-nav__item > .md-nav__link { + font-size: .75rem; + font-weight: 700; + letter-spacing: .025em; + text-transform: uppercase; + } + .md-path { margin-top: 1.25rem; margin-right: 1.2rem; margin-left: 1.2rem; } .md-sidebar--primary { padding-top: .75rem; } .md-sidebar--secondary { padding-top: .75rem; } From d357cf065665252325ca5b2973400fe78e1b722d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A1udia?= Date: Fri, 31 Jul 2026 18:34:18 +0100 Subject: [PATCH 2/3] docs: reduce tabbed navigation to Documentation and Release notes Scale the tabs down to two: Documentation (the existing nav, unchanged) and Release notes (release notes plus special thanks, as before). Drops the Product/Management/Developer Tools split and its icon remapping, and restores the sidebar's original collapsed-by-default behavior now that navigation.expand isn't enabled. Co-Authored-By: Claude Sonnet 5 --- mkdocs.yml | 179 +++++++++--------- .../vendor/ionicons/svg/umbrella-outline.svg | 1 - theme/partials/nav-item.html | 7 +- 3 files changed, 87 insertions(+), 100 deletions(-) delete mode 100644 theme/assets/vendor/ionicons/svg/umbrella-outline.svg diff --git a/mkdocs.yml b/mkdocs.yml index 78ea4ddc70..b180abad8f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -69,29 +69,24 @@ extra: user_feedback: "true" community_url: "https://community.codacy.com/" support_email: "support@codacy.com" - # Ionicons displayed for top-level tabs and, when navigation.tabs is - # active, for the top section within each tab's sidebar (see level == 2 - # handling in theme/partials/nav-item.html). + # Ionicons displayed for the top section within each tab's sidebar (see + # level == 2 handling in theme/partials/nav-item.html). sidebar_icons: - "Product": "business-outline" - "Management": "settings-outline" - "Developer Tools": "terminal-outline" - "Release Notes": "megaphone-outline" "Documentation home": "home-outline" "Getting started": "rocket-outline" - "Quality": "code-slash-outline" - "Security": "shield-checkmark-outline" - "AI": "sparkles-outline" - "Coverage": "umbrella-outline" - "Support": "medical-outline" - "Configuring your repositories": "folder-open-outline" + "Codacy Guardrails (IDE Extension)": "shield-checkmark-outline" + "Codacy Cloud CLI": "terminal-outline" + "Codacy AI": "sparkles-outline" + "Repositories on Codacy": "folder-open-outline" + "Configuring your repositories": "settings-outline" "Organizations": "people-outline" - "Your account": "person-circle-outline" "Enterprise Cloud": "business-outline" + "Your account": "person-circle-outline" + "Codacy API": "code-slash-outline" "Managing Codacy Self-hosted": "server-outline" - "Codacy Guardrails (IDE Extension)": "shield-checkmark-outline" - "Codacy Cloud CLI": "code-slash-outline" - "Codacy API": "share-social-outline" + "Troubleshooting and FAQs": "medical-outline" + "Release notes": "megaphone-outline" + "Special thanks": "heart-outline" # Do not show a generated-by badge in the footer. generator: false # Add pull request preview banner @@ -621,7 +616,7 @@ plugins: "repositories-configure/file-extensions.md": "repositories-configure/languages.md" nav: - - Product: + - Documentation: - Documentation home: "index.md" - Getting started: - getting-started/codacy-quickstart.md @@ -633,70 +628,26 @@ nav: - getting-started/supported-languages-and-tools.md - getting-started/which-permissions-does-codacy-need-from-my-account.md - getting-started/adding-a-codacy-badge.md - - Quality: - - repositories/issues.md - - repositories-configure/configuring-code-patterns.md - - repositories-configure/adjusting-quality-gates.md - - repositories-configure/adjusting-quality-goals.md - - organizations/using-coding-standards.md - - organizations/using-gate-policies.md - - Using your repository: - - repositories/repository-dashboard.md - - repositories/commits.md - - repositories/files.md - - repositories/pull-requests.md - - Security: - - organizations/managing-security-and-risk.md - - Slack integration for Security issues: organizations/integrations/slack-integration.md - - Jira integration for Security and risk management: organizations/integrations/jira-integration.md - - AI: + - Codacy Guardrails (IDE Extension): + - codacy-guardrails/codacy-guardrails-getting-started.md + - codacy-guardrails/codacy-guardrails-how-to-use.md + - codacy-guardrails/codacy-guardrails-how-to-configure-rules.md + - codacy-guardrails/codacy-guardrails-limitations.md + - codacy-guardrails/codacy-guardrails-troubleshooting.md + - codacy-guardrails/codacy-guardrails-faq.md + - Codacy Cloud CLI: + - codacy-cloud-cli/index.md + - Codacy AI: - codacy-ai/codacy-ai.md - - organizations/ai-risk-hub.md - - Coverage: + - Repositories on Codacy: + - repositories/repository-dashboard.md + - repositories/commits.md + - repositories/files.md + - repositories/issues.md - repositories/coverage.md - - coverage-reporter/index.md - - coverage-reporter/alternative-ways-of-running-coverage-reporter.md - - coverage-reporter/uploading-coverage-in-advanced-scenarios.md - - coverage-reporter/troubleshooting-coverage-cli-issues.md - - Enterprise Cloud: - - enterprise-cloud/github-enterprise-cloud.md - - Managing Codacy Self-hosted: "!include submodules/chart/mkdocs.yml" - - Support: - - General: - - faq/general/which-platforms-and-technologies-does-codacy-support.md - - faq/general/how-does-codacy-support-github-enterprise.md - - faq/general/how-does-codacy-support-gitlab-cloud.md - - faq/general/how-does-codacy-support-gitlab-enterprise.md - - faq/general/how-does-codacy-support-bitbucket-cloud.md - - faq/general/how-does-codacy-support-bitbucket-server.md - - faq/general/how-does-codacy-keep-my-data-secure.md - - faq/general/how-does-codacy-protect-my-privacy.md - - faq/general/does-codacy-keep-audit-logs.md - - faq/general/how-do-i-allowlist-codacy-cloud-on-my-git-provider.md - - faq/general/how-can-i-change-or-cancel-my-plan.md - - Repositories: - - faq/repositories/how-do-i-reanalyze-my-repository.md - - faq/repositories/i-renamed-my-repository-on-the-git-provider.md - - Code analysis: - - faq/code-analysis/which-metrics-does-codacy-calculate.md - - faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md - - faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md - - faq/code-analysis/does-codacy-check-for-dependencies.md - - faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md - - faq/code-analysis/how-to-skip-an-analysis.md - - faq/code-analysis/can-i-bypass-codacy-status-check.md - - faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md - - Troubleshooting: - - faq/troubleshooting/why-cant-i-see-my-organization.md - - faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md - - faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md - - faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md - - faq/troubleshooting/not-a-member-of-the-organization.md - - faq/troubleshooting/we-no-longer-have-access-to-this-repository.md - - faq/troubleshooting/why-is-my-file-over-150-kb-missing.md - - faq/troubleshooting/error-line-endings.md - - Management: + - repositories/pull-requests.md - Configuring your repositories: + - repositories-configure/configuring-code-patterns.md - repositories-configure/managing-branches.md - Managing integrations: - repositories-configure/integrations/github-integration.md @@ -705,6 +656,13 @@ nav: - repositories-configure/integrations/post-commit-hooks.md - repositories-configure/ignoring-files.md - repositories-configure/languages.md + - repositories-configure/adjusting-quality-gates.md + - repositories-configure/adjusting-quality-goals.md + - Setting up code coverage: + - coverage-reporter/index.md + - coverage-reporter/alternative-ways-of-running-coverage-reporter.md + - coverage-reporter/uploading-coverage-in-advanced-scenarios.md + - coverage-reporter/troubleshooting-coverage-cli-issues.md - Local analysis: - repositories-configure/local-analysis/client-side-tools.md - repositories-configure/local-analysis/running-aligncheck.md @@ -720,27 +678,27 @@ nav: - organizations/managing-repositories.md - organizations/segments.md - Reporting: - - organizations/reporting/organization-overview.md - - organizations/reporting/issues-metrics.md - - organizations/reporting/codacy-usage.md - - organizations/integrations/default-git-provider-integration-settings.md + - organizations/reporting/organization-overview.md + - organizations/reporting/issues-metrics.md + - organizations/reporting/codacy-usage.md + - organizations/using-gate-policies.md + - organizations/using-coding-standards.md + - organizations/ai-risk-hub.md + - Managing integrations: + - organizations/integrations/default-git-provider-integration-settings.md + - Slack integration for Security issues: organizations/integrations/slack-integration.md + - Jira integration for Security and risk management: organizations/integrations/jira-integration.md + - organizations/managing-security-and-risk.md - organizations/managing-people.md - organizations/audit-logs-for-organizations.md - organizations/roles-and-permissions-for-organizations.md - organizations/changing-your-plan-and-billing.md + - Enterprise Cloud: + - enterprise-cloud/github-enterprise-cloud.md - Your account: - account/managing-your-profile.md - account/emails.md - account/user-session-management.md - - Developer Tools: - - Codacy Guardrails (IDE Extension): - - codacy-guardrails/codacy-guardrails-getting-started.md - - codacy-guardrails/codacy-guardrails-how-to-use.md - - codacy-guardrails/codacy-guardrails-how-to-configure-rules.md - - codacy-guardrails/codacy-guardrails-limitations.md - - codacy-guardrails/codacy-guardrails-troubleshooting.md - - codacy-guardrails/codacy-guardrails-faq.md - - Codacy Cloud CLI: codacy-cloud-cli/index.md - Codacy API: - codacy-api/using-the-codacy-api.md - codacy-api/api-tokens.md @@ -755,7 +713,42 @@ nav: - codacy-api/examples/identifying-commits-without-coverage-data.md - codacy-api/examples/uploading-dast-results.md - codacy-api/examples/triggering-dast-scans.md - - Release Notes: + - Managing Codacy Self-hosted: "!include submodules/chart/mkdocs.yml" + - Troubleshooting and FAQs: + - General: + - faq/general/which-platforms-and-technologies-does-codacy-support.md + - faq/general/how-does-codacy-support-github-enterprise.md + - faq/general/how-does-codacy-support-gitlab-cloud.md + - faq/general/how-does-codacy-support-gitlab-enterprise.md + - faq/general/how-does-codacy-support-bitbucket-cloud.md + - faq/general/how-does-codacy-support-bitbucket-server.md + - faq/general/how-does-codacy-keep-my-data-secure.md + - faq/general/how-does-codacy-protect-my-privacy.md + - faq/general/does-codacy-keep-audit-logs.md + - faq/general/how-do-i-allowlist-codacy-cloud-on-my-git-provider.md + - faq/general/how-can-i-change-or-cancel-my-plan.md + - Repositories: + - faq/repositories/how-do-i-reanalyze-my-repository.md + - faq/repositories/i-renamed-my-repository-on-the-git-provider.md + - Code analysis: + - faq/code-analysis/which-metrics-does-codacy-calculate.md + - faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md + - faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md + - faq/code-analysis/does-codacy-check-for-dependencies.md + - faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md + - faq/code-analysis/how-to-skip-an-analysis.md + - faq/code-analysis/can-i-bypass-codacy-status-check.md + - faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md + - Troubleshooting: + - faq/troubleshooting/why-cant-i-see-my-organization.md + - faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md + - faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md + - faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md + - faq/troubleshooting/not-a-member-of-the-organization.md + - faq/troubleshooting/we-no-longer-have-access-to-this-repository.md + - faq/troubleshooting/why-is-my-file-over-150-kb-missing.md + - faq/troubleshooting/error-line-endings.md + - Release notes: - release-notes/index.md - Cloud: - 2026: diff --git a/theme/assets/vendor/ionicons/svg/umbrella-outline.svg b/theme/assets/vendor/ionicons/svg/umbrella-outline.svg deleted file mode 100644 index bf36ce81c1..0000000000 --- a/theme/assets/vendor/ionicons/svg/umbrella-outline.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/theme/partials/nav-item.html b/theme/partials/nav-item.html index e65ca5ec05..255bb5c8f5 100644 --- a/theme/partials/nav-item.html +++ b/theme/partials/nav-item.html @@ -63,12 +63,7 @@
  • {% if not is_pruned %} {% set checked = "checked" if nav_item.active %} - {# Every level looks expanded by default on desktop. `md-toggle--indeterminate` - drives Material's desktop-only grid-collapse CSS (@media min-width: 76.25em) - without touching `checked` itself or requiring JS: it has zero effect within - the mobile media query, so the lifted drawer's one-branch-at-a-time behavior - there is untouched, and there's no post-load re-render to flash on page load. #} - {% if not checked %}{% set indeterminate = "md-toggle--indeterminate" %}{% endif %} + {% if "navigation.expand" in features and not checked %}{% set indeterminate = "md-toggle--indeterminate" %}{% endif %} {% if not index %} {% set tabindex = "0" if not is_section %} From e79b7b4891ce88e2be44e16a59bc00e679be55a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A1udia?= Date: Fri, 31 Jul 2026 18:51:58 +0100 Subject: [PATCH 3/3] docs: remove icons from Release notes and Special thanks Co-Authored-By: Claude Sonnet 5 --- mkdocs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index b180abad8f..1a8492a208 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -85,8 +85,6 @@ extra: "Codacy API": "code-slash-outline" "Managing Codacy Self-hosted": "server-outline" "Troubleshooting and FAQs": "medical-outline" - "Release notes": "megaphone-outline" - "Special thanks": "heart-outline" # Do not show a generated-by badge in the footer. generator: false # Add pull request preview banner