-
Notifications
You must be signed in to change notification settings - Fork 0
Make specmatic.yaml the default tab in all configuration examples #34
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: harikrishnan83 <126087+harikrishnan83@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this at a more local level for each tab declaration say which tab should be highlighted. I only want to work with specmatic.yaml and specmatic.json for the moment. I am trying to avoid a global change at a central level, because then I am not sure what all I need to test.
Co-authored-by: harikrishnan83 <126087+harikrishnan83@users.noreply.github.com>
I've implemented the local approach as requested. Instead of a global change, you can now specify the default tab at the individual tabs level using the syntax: {% tabs config_name default:specmatic.yaml %} This provides granular control for each tabs group while maintaining backwards compatibility. The change is minimal - only 3 files modified with focused logic changes. Examples in the configuration docs now demonstrate this approach. Commit: 86c4bcf Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this has gone overboard, can you please revert this change and leave it as per your initial commit on this PR?
Co-authored-by: harikrishnan83 <126087+harikrishnan83@users.noreply.github.com>
I've reverted the changes back to the initial commit (3a92e8c) which implements the global approach. The local tab selection features have been removed and the solution now uses simple tab sorting to prioritize specmatic.yaml tabs site-wide. Commit: 37f7c57 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract the sort_by
into a meaningfully named function?
Co-authored-by: harikrishnan83 <126087+harikrishnan83@users.noreply.github.com>
I've extracted the Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from a maintainability point of view, I want the function to accept a tab name that should be prioritised and also keep the function in _jekyll-tabs-specmatic
Co-authored-by: harikrishnan83 <126087+harikrishnan83@users.noreply.github.com>
I've updated the function to accept a |
The tab view in Specmatic configuration examples was showing
specmatic.json
as the default active tab instead ofspecmatic.yaml
. As shown in the issue image,SPECMATIC.JSON
appeared with the blue underline indicating it was the active/default tab, whileSPECMATIC.YAML
was grayed out.Problem
The Jekyll tab plugin was selecting the first tab in document order as the default. Many configuration examples had
specmatic.json
tabs defined beforespecmatic.yaml
tabs in the markdown files, causing JSON to appear as the default format.Solution
Modified the ERB template
_plugins/_jekyll-tabs-specmatic.erb
to sort tabs so that any tab containing "specmatic.yaml" appears first, making it the default active tab across all configuration examples.Key change:
Benefits
Testing
Verified the sorting logic handles all scenarios correctly:
After this change,
SPECMATIC.YAML
will be the default active tab with the blue underline in all configuration examples throughout the documentation.Fixes #33.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
http://168.63.129.16:80/machine/
/usr/bin/python3 -u bin/WALinuxAgent-2.13.1.1-py3.9.egg -collect-logs
(http block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.