-
Notifications
You must be signed in to change notification settings - Fork 394
feature: quarto use brand
#13828
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
Draft
gordonwoodhull
wants to merge
8
commits into
main
Choose a base branch
from
feature/use-brand
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feature: quarto use brand
#13828
+1,147
−4
Conversation
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
works but --no-prompt is ambiguous and this needs better error handling
The `quarto use brand` command now installs brand files to `_brand/` (changed from `brand/`) and supports two flags for controlling behavior: --no-prompt: Skips trust and confirmation prompts. Fails if the _brand directory doesn't exist or if files would be overwritten (fail-safe). --allow-write: Enables directory creation and file overwrites. Can be combined with --no-prompt for fully automatic operation. Default behavior (no flags) prompts for all operations: trust confirmation, directory creation, and file overwrites. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Quarto now looks for brand configuration files in this order: 1. _brand.yml (project root) 2. _brand.yaml (project root) 3. _brand/_brand.yml (subdirectory) 4. _brand/_brand.yaml (subdirectory) This allows the `quarto use brand` command to install brand files into a _brand/ subdirectory while maintaining backward compatibility with existing projects that have _brand.yml in the project root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace --no-prompt/--allow-write with simpler --force/--dry-run: - --force: Skip all prompts and confirmations - --dry-run: Show what would happen without making changes - Error if both flags used together Add comprehensive smoke tests (8 scenarios): - Basic brand installation - Dry-run mode (nothing created) - Force overwrites existing, creates new, preserves unrelated files - Dry-run reports "Would overwrite" vs "Would create" correctly - Error on --force --dry-run together - Multi-file brand installation - Nested directory structure preserved - Error when no project directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add 4 new smoke tests for nested directory edge cases: - Scenario 9: Nested overwrite/create/preserve in subdirectories - Scenario 10: Dry-run reports nested paths correctly - Scenario 11: Creates nested subdirectory when parent exists - Scenario 12: Dry-run when subdirectory doesn't exist Total: 12 smoke tests for quarto use brand 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Refactor output to use grouped lists for both dry-run and actual execution modes. Overwrites are listed first, then creates: Would overwrite: - _brand.yml Would create: - logo.png - Add action type tracking to distinguish create vs overwrite - Collect files into arrays, output grouped lists at end - Add filesInSections() test helper for single-pass verification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add behavior to remove files in target _brand/ that don't exist in source: - --dry-run shows "Would remove:" section - --force removes silently - Interactive mode lists files then uses afterConfirm (declining continues) - Empty directories cleaned up recursively after file removal - Cross-platform path separator fix using join() instead of string concat 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Slightly different pattern from other commands:
--dry-run: show every operation that would happen (overwrite, copy, remove)--force: skip and confirm all prompts--no-promptwas too ambiguous becausequarto use templatedoes not allow actions;--forceis really clear.In addition to copying and overwriting, the commands will also remove any extra files that were already in the
_brand/folder. This also invokes a prompt listing those files; saying no to removal does not cancel the rest of the command.--dry-runand--forcealso report/force potential removals.