Comments (3)
@eric-schneider @djsauble I dug into the extension source code a bit and discovered it does have the ability to customize the id of the tabs block, and prefixes that custom id to the individual tabs.
Without a custom id the the extension generates tab ids like tabs-4-python
which we can link to.
Using that client example, if we add a custom id install
to the tab block like so
[tabs,id=install]
======
Python::
...
TypeScript::
...
Java::
======
The tab ids become install-python
install-typescript
install-java
and we can create a direct link like url/astra-db-vector/get-started/quickstart.html#install-java
Conveniently linking to the individual tab does open it correctly and even opens all other linked tabs. There are a few issues remaining though:
- The auto scroll doesn't go down far enough and the tab text is covered by the header. This should be an easy fix with the
scroll-margin-top
css property. - Linking to a nested tab does not open the parent tab(s). I could probably do this with some custom js by searching for tab ids when an anchor link is present but it would be a bit of a hack and like you say might break with future versions of the tabs extension.
Is linking to the top level tabs like this a good enough solution?
from docs-ui.
This is great news, and yes I think as long as we can link to top-level tabs, that's likely a good enough solution for now.
Personally, I think nested tabs are a bit of an anti-pattern, so I'd like to avoid them where possible anyway.
from docs-ui.
Agree that we should avoid nested tabs when possible. Though, there are some complex procedures (e.g. Cassandra upgrade) where nested tabs are the only viable option to maintain flow while still presenting the breadth of possible options.
@colegoldsmith, what's the pattern for nested tab IDs? Is it simply tabsetID-tabID-nestedTabID
?
Also, what's your take on the two issues I linked? Seems like they're actually unrelated to what we're trying to achieve here, except that maybe we might not have the ability to set custom IDs on individual tabs. Also, neither issue seems appropriate for requesting support for deep linking to nested tabs. Do you think we should open a new issue for that in the upstream project?
from docs-ui.
Related Issues (20)
- Improve in-page ToC HOT 3
- Link to glossary does not contain site path
- Add component title to left nav HOT 2
- Ensure that page titles in social previews use same duplicate name logic as meta titles
- Update favicon
- Site search enhancements
- Add inline image support to `svg` macro; attempt feature parity with built-in `image:` and `image::` macros
- hrefs in section titles are rendered in the wrong location
- Docs feedback - add an option to include an email address
- Add a pill or other visual cue to help people confirm they are in the right docs HOT 1
- Admonition colors and icons
- Linked code font is sometimes indistinguishable from non-link code font except on hover
- Awkward text wrapping in version picker
- Apply <strong> color to material-icons class
- Text in callout lists is wrong color
- Left nav doesn't auto-scroll when the number of nav entries overflows the viewable nav area HOT 1
- Don't break/wrap in the middle of a word HOT 3
- Breadcrumb not honoring navigation hierarchy
- Link text isn't auto-generated if the xref has an anchor HOT 1
- Left nav sometimes seems very wide or awkwardly spaced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs-ui.