') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Only show latest minor versions in version drop-down in docs by potiuk · Pull Request #57243 · apache/airflow · GitHub
Skip to content

Only show latest minor versions in version drop-down in docs - #57243

Merged
potiuk merged 1 commit into
mainfrom
filter-versions-to-latest-minor
Oct 25, 2025
Merged

Only show latest minor versions in version drop-down in docs#57243
potiuk merged 1 commit into
mainfrom
filter-versions-to-latest-minor

Conversation

@potiuk

Copy link
Copy Markdown
Member

This does not remove the actual versions from S3 only limits the drop-down. All versions are available still to see and they are indexed, also links from PyPI continue to work, you can also manually update version in the URL.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@jscheffljscheffl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good solution! I like it.

@gopidesupavangopidesupavan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed, definitely worth limiting :) LGTM

@potiuk

potiuk commented Oct 25, 2025

Copy link
Copy Markdown
MemberAuthor

Let's wait for others / devlist comments -> this is quite a change. It might be a little confusing for users (I imagine) - and I am not entirely sure if 10 last versions is good cut-off ?

@jscheffl

jscheffl commented Oct 25, 2025

Copy link
Copy Markdown
Contributor

Let's wait for others / devlist comments -> this is quite a change. It might be a little confusing for users (I imagine) - and I am not entirely sure if 10 last versions is good cut-off ?

I think when all the non-latest minor are off then we can get back to the full list in my view... At least every 6 months I have a reason to check for 1.10 docs :-D
But as I manage to change the URL myself, top 10 is also OK'ish. But it might feel the other versions are not there anymore.

Maybe a "all other versions..." can be added in the dropdown leading to a version browser page that lists all in a scrollable page?

@potiuk

potiuk commented Oct 25, 2025

Copy link
Copy Markdown
MemberAuthor

Maybe a "all other versions..." can be added in the dropdown leading to a version browser page that lists all in a scrollable page?

That's "advanced" UI work - that no-one pivcked up yet :)

@potiukpotiuk linked an issue Oct 25, 2025 that may be closed by this pull request
1 task
@potiuk
potiukforce-pushed the filter-versions-to-latest-minor branch from 09c654d to e045634CompareOctober 25, 2025 18:31
This does not remove the actual versions from S3 only limits
the drop-down. All versions are available still to see and they
are indexed, also links from PyPI continue to work, you can
also manually update version in the URL.
@potiuk
potiukforce-pushed the filter-versions-to-latest-minor branch from e045634 to a64ed77CompareOctober 25, 2025 19:26
@potiuk

Copy link
Copy Markdown
MemberAuthor

The setup for 20 versions seems like really good for now :)

@potiuk
potiuk merged commit a0b4d29 into mainOct 25, 2025
115 checks passed
@potiuk
potiuk deleted the filter-versions-to-latest-minor branch October 25, 2025 21:09
github-actionsBot pushed a commit that referenced this pull request Oct 25, 2025
…ocs (#57243)
This does not remove the actual versions from S3 only limits
the drop-down. All versions are available still to see and they
are indexed, also links from PyPI continue to work, you can
also manually update version in the URL.
(cherry picked from commit a0b4d29)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-1-test

StatusBranchResult
v3-1-testPR Link

potiuk added a commit that referenced this pull request Oct 25, 2025
…ocs (#57243) (#57262)
This does not remove the actual versions from S3 only limits
the drop-down. All versions are available still to see and they
are indexed, also links from PyPI continue to work, you can
also manually update version in the URL.
(cherry picked from commit a0b4d29)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@jscheffl

Copy link
Copy Markdown
Contributor

The setup for 20 versions seems like really good for now :)

Cool!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make version drop-down usable for the docs

3 participants

@potiuk@jscheffl@gopidesupavan