Repository navigation
Load tmuxp's example catalog through the workspace loader - #102
Merged
Merged
Conversation
why: libtmux.org shows a preset picker on a port's Workspace Manager pages only when the port's repository loads more than one workspace file in a test. This port loaded one, so its pages showed a single example. Rust loads tmuxp's example catalog, and the docs read the files a test loads. what: - Add tmuxp's 23 example files and its MIT license under `test/fixtures/tmuxp/`, copied from libtmux-rs at ab33c91add4c - Load each of the 9 files `Workspace.load` reads and check its profile (`test/unit/workspace_test.rb`) - Record the exact `ConfigError` message of each of the 14 files the loader refuses, so a change in the loader fails the case until the entry is updated or removed - Fail when a catalog file is in neither list, so a new tmuxp example is classified instead of skipped
why: The catalog fixtures change what the docs site shows for the workspace loader, and no gem changelog owns a test-only change. what: - Add an unreleased entry to the root changelog (`CHANGELOG.md`)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libtmux.org shows a preset picker on a port's Workspace Manager pages only when the port's repository loads more than one workspace file in a test. This port loaded one. This PR adds tmuxp's example catalog as fixtures under
test/fixtures/tmuxp/, with tmuxp's MIT license, copied from libtmux-rs at ab33c91, and loads every file throughLibTmux::Workspace.loadintest/unit/workspace_test.rb, as Rust'severy_tmuxp_example_parsesdoes. Nothing in the loader changes.Nine of the 23 files load. The other 14 are kept and recorded with the exact error the loader raises, so a loader change fails the case until the entry is updated or removed. A catalog file in neither list also fails, so a new tmuxp example gets classified.
Closes #101
Part of libtmux/docs#282
Findings: files the loader refuses
LibTmux::Workspace::ConfigError)2-pane-synchronized.yamlblank-panes.yamlenv-variables.yamlmain-pane-height-percentage.yamlminimal.yamloptions.yamlpane-shell.yamlplugin-system.yamlskip-send-pane-level.yamlskip-send.yamlsleep-pane-level.yamlsleep-virtualenv.yamlsleep.yamlsuppress-history.yamlmain-pane-height.yaml,start-directory.yamlandfocus-window-and-panes.yamlload, but the docs support table marks them unsupported because the loader reads their~paths and barepaneentries differently from tmuxp. The docs generator refuses to show them until that table agrees.Test plan
bundle exec ruby test/unit/workspace_test.rbbundle exec scripts/check midscripts/gen-workspace-showcase.mjs) run at libtmux/docs main with the port pinned to this branch lists seven examples for ruby, six of them tmuxp's files, each tested bytest_tmuxp_examples_load_through_workspace_load