Skip to content

Make template docs the default tab, and change the order of tabs#272

Merged
thibaudcolas merged 3 commits into
torchbox:mainfrom
LucidDan:issue-259
Jul 24, 2026
Merged

Make template docs the default tab, and change the order of tabs#272
thibaudcolas merged 3 commits into
torchbox:mainfrom
LucidDan:issue-259

Conversation

@LucidDan

@LucidDan LucidDan commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Description

This does three things:

  1. Changes order of tabs so "Docs" comes first, "Source" comes last (effectively swapping these two tabs).
  2. Makes the "Docs" tab the default tab.
  3. Adds a "No template doc available" message if there is no .md file or the file is empty.

Number 3 is not part of the original request but I think it makes sense, I'd like a review of that thought - my line of thinking was that "template source" is always set to something, so you never get an empty tab. Adding a message makes it clear why there is nothing there for the docs. If you don't agree, I committed the change separately so its easy to revert it.

Note: I have not as yet screenshotted a replacement for docs/images/pattern-library-screenshot.webp and docs/images/getting-started/getting-started-complete.png, but if needed I can do that before the PR is merged.

Fixes #259

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added an appropriate CHANGELOG entry

LucidDan added 2 commits March 5, 2026 12:47
… tab

Also change the order of display of tabs so the template docs is the first tab - this reads more naturally, and makes more sense visually to have the left-hand tab be default.
Shows "No template doc available" if there is no .md file or the file is empty.

@helenb helenb 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.

I've tested this and it is working well - thank you @LucidDan. Just one small nitpick which is not essential.

Comment thread pattern_library/templates/pattern_library/index.html Outdated
Co-authored-by: Helen Chapman <helen.chapman@torchbox.com>
@thibaudcolas
thibaudcolas merged commit d720879 into torchbox:main Jul 24, 2026
1 check passed
@thibaudcolas

Copy link
Copy Markdown
Member

thank you!

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.

Make the "Template docs" tab be the default tab

3 participants