Skip to content

Add more descriptive headings #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025
Merged

Add more descriptive headings #17

merged 1 commit into from
Jul 8, 2025

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Jul 7, 2025

This is an experiment with more verbose headings to make it easy for users to browse through, and understand what they might find. Happy to take suggestions. One consideration is that rendering long headings might be ugly, but I feel the increased ease-of-use is worth it. We should definitely be very concise.

I kept the "class name" in the headings because we may have duplicates for example, "Intervals with pd.IntervalIndex" and Intervals with CFIntervalIndex`"

@dcherian dcherian requested review from scottyhq, benbovy and keewis July 7, 2025 18:31
@dcherian dcherian force-pushed the verbose-headings branch from 903ed83 to eba466d Compare July 7, 2025 18:33
@benbovy
Copy link
Member

benbovy commented Jul 7, 2025

I like it.

One consideration is that rendering long headings might be ugly, but I feel the increased ease-of-use is worth it. We should definitely be very concise.

One trick could be to keep short title versions in the left side panel and display a more detailed table of content in the homepage with something like this in index.md:

Built-in
- {doc}`builtin/pdrange`
- {doc}`builtin/range`
- {doc}`builtin/pdinterval`
- {doc}`builtin/cfinterval`

```{toctree}
---
caption: Built-in
hidden:
---
integer ranges <builtin/pdrange>
float ranges <builtin/range>
1-coordinate intervals <builtin/pdinterval>
2-coordinates CF intervals <builtin/cfinterval>
```

I kept the "class name" in the headings because we may have duplicates for example, "Intervals with pd.IntervalIndex" and Intervals with CFIntervalIndex`"

I initially thought about grouping PandasIndex[pd.IntervalIndex] / CFIntervalIndex in the same page (same for PandasIndex[pd.RangeIndex] / RangeIndex), but having one page per index might make sense.

@scottyhq
Copy link
Contributor

scottyhq commented Jul 8, 2025

One trick could be to keep short title versions in the left side panel and display a more detailed table of content

Clever, I'm definitely a fan of this because I like short titles in the left sidebar. That said, there is not too much currently that these longer titles are a problem, and agree it's much more informative for newcomers.

I also think "Built-in" and "Building Blocks" sections could be merged into a single "Built into Xarray".

Maybe this is also what @benbovy was thinking in addition to a big homepage toc/table, I like subsection indexes. So for example, built-in/index.md where the more descriptive toctree is shown. Something like this https://tutorial.xarray.dev/overview/learning-paths.html

You can set the theme so these subsections are expanded by default

@dcherian
Copy link
Contributor Author

dcherian commented Jul 8, 2025

One trick could be to keep short title versions in the left side panel and display a more detailed table of content

good idea indeed!

I also think "Built-in" and "Building Blocks" sections could be merged into a single "Built into Xarray".

I thought this would be good to distinguish, perhaps the index.md will be useful to make that distinction clearly here. I can push an update.

I initially thought about grouping PandasIndex[pd.IntervalIndex] / CFIntervalIndex in the same page (same for PandasIndex[pd.RangeIndex] / RangeIndex), but having one page per index might make sense.

I did too, but I think separating them makes it easier to browse.

@dcherian
Copy link
Contributor Author

dcherian commented Jul 8, 2025

built-in/index.md where the more descriptive toctree is shown.

This would mean things like "Built In" and "Earth Sciences" would not be captions anymore. I say we leave that to when we figure how to merge this Gallery with the existing Xarray Gallery.

@dcherian dcherian merged commit 589d17e into main Jul 8, 2025
2 checks passed
@dcherian dcherian deleted the verbose-headings branch July 8, 2025 13:46
@benbovy benbovy mentioned this pull request Jul 9, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy