You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove TEAMS WITH ASKS placeholder and implement automatic team injection
Successfully removed the manual `<!-- TEAMS WITH ASKS -->` placeholder system from the
rust-project-goals mdbook preprocessor and implemented automatic team injection.
Key Accomplishments:
1. **Eliminated Manual Placeholders**
- Removed `<!-- TEAMS WITH ASKS -->` requirement from goal documents
- Cleaned up regex definitions and verification code
- Updated template to remove Teams row entirely
2. **Implemented Smart Auto-Injection**
- Automatically computes team names from goal's `teams_with_asks()` data
- Handles both existing goals (replaces placeholder) and new goals (adds row)
- Shows "(none)" for goals without team asks, formatted team links otherwise
3. **Robust Implementation**
- Added milestone directory filtering to avoid processing documentation files
- Proper error handling to prevent panics on malformed paths
- Template exclusion to avoid processing template files as goals
4. **Backward Compatibility**
- Existing goal files with old placeholders continue to work
- Seamless transition - no manual migration required
- New goals from updated template work automatically
Technical Changes:
- Modified: crates/mdbook-goals/src/mdbook_preprocessor.rs - Added inject_teams_into_metadata_table()
- Modified: crates/rust-project-goals/src/goal.rs - Removed placeholder verification, added template exclusion
- Modified: crates/rust-project-goals/src/re.rs - Removed TEAMS_WITH_ASKS regex
- Modified: src/TEMPLATE.md - Removed Teams row entirely
Result: Goal authors can now focus purely on content - team information is
automatically handled based on their team asks data. The system is cleaner,
more maintainable, and eliminates a common source of manual errors.
* Remove TASK OWNERS placeholder and implement automatic task owner injection
Extended the automatic injection system to also handle task owners. Removed the manual
`<!-- TASK OWNERS -->` placeholder requirement and implemented automatic task owner
injection. Goal documents no longer need to include either Teams or Task owners
placeholders in their metadata tables.
Key Accomplishments:
1. **Eliminated Both Placeholder Systems**
- Removed `<!-- TASK OWNERS -->` requirement from goal documents
- Completely removed the old placeholder replacement system
- Cleaned up all related regex definitions and verification code
2. **Fully Automatic Injection**
- Both Teams and Task owners rows are now computed and injected automatically
- Smart row placement: Task owners after Teams (if present) or after Point of contact
- Shows "(none)" for goals without task owners, formatted names otherwise
3. **Dramatically Simplified Template**
- Removed both Teams and Task owners rows from template entirely
- Template now only has 4 metadata rows instead of 6
- Focuses on what authors actually need to fill out manually
4. **Consistent Implementation**
- Applied the same robust pattern for both injection systems
- Milestone directory filtering, template exclusion, backward compatibility
- Proper error handling and smart placement logic
5. **Complete Backward Compatibility**
- Existing goal files with old placeholders continue to work seamlessly
- System replaces existing rows or adds missing ones as needed
- No manual migration required
Technical Changes:
- Modified: crates/mdbook-goals/src/mdbook_preprocessor.rs - Added inject_task_owners_into_metadata_table(), removed replace_metadata_placeholder()
- Modified: crates/rust-project-goals/src/goal.rs - Removed placeholder verification, removed unused verify_row function
- Modified: crates/rust-project-goals/src/re.rs - Removed TASK_OWNERS regex
- Modified: src/TEMPLATE.md - Removed Task owners row entirely
Result: Goal authors can now focus entirely on content - all metadata injection
is handled automatically based on the goal's structured data. The template is
significantly simplified and less error-prone.
* Clean up legacy placeholder rows from goal files
Successfully removed all legacy `<!-- TEAMS WITH ASKS -->` and `<!-- TASK OWNERS -->`
placeholder rows from 115+ goal files. These placeholders are no longer needed since
the preprocessor now automatically injects Teams and Task owners information based
on the goal's metadata.
Key Accomplishments:
1. **Massive Cleanup**
- Removed 115 instances of `<!-- TEAMS WITH ASKS -->` placeholders
- Removed 115 instances of `<!-- TASK OWNERS -->` placeholders
- Eliminated 230+ lines of legacy placeholder code across all goal files
2. **Fixed Table Structure Issues**
- Resolved broken metadata tables where placeholder removal left empty lines
- Fixed markdown table parsing errors that prevented successful builds
- Ensured all metadata tables have proper continuous structure
3. **Verified Auto-injection System**
- Confirmed Teams rows are automatically injected with correct team information
- Confirmed Task owners rows are automatically injected with correct owner data
- Verified consistent formatting across all goal files
4. **Template Simplification**
- Template now only contains 4 metadata rows that authors need to fill manually
- Removed 2 placeholder rows that were confusing and error-prone
- Goal authors can now focus purely on content creation
Impact:
- Goal authors no longer need to manage manual placeholders
- Cleaner, simpler template reduces chance of formatting errors
- Automatic, consistent formatting of team and owner information
- Better maintainability and system consistency
- Successful mdbook builds without table parsing errors
Result: The placeholder cleanup is complete. All goal files are clean, the build
works perfectly, and the auto-injection system handles all metadata formatting
automatically. Goal authors can focus purely on writing content while the system
handles metadata presentation.
* Replace HTML comment syntax with triple-parentheses syntax for mdbook preprocessor
- Change regex patterns from <!-- PATTERN --> to (((PATTERN)))
- Update all 7 regex patterns in re.rs: TEAM_ASKS, GOAL_LIST, FLAGSHIP_GOAL_LIST, OTHER_GOAL_LIST, GOAL_NOT_ACCEPTED_LIST, GOAL_COUNT, VALID_TEAM_ASKS
- Update error messages in mdbook_preprocessor.rs to reference new syntax
- Update all markdown files across 2024h2, 2025h1, 2025h2, admin/samples, and about directories
- Solves HTML comment processing issues in mdbook templates where comments get stripped or require HTML encoding
The new triple-parentheses syntax is HTML-safe, template-friendly, and visually distinctive.
* Add categorical flagship goal tracking system
- Replace binary flagship status with categorical system using | Flagship | CategoryName |
- Add support for filtered macros like (((FLAGSHIP GOALS:Performance)))
- Maintain backward compatibility with existing (((FLAGSHIP GOALS))) macro
- Add metadata.flagship() method returning Option<&str>
- Include migration script to convert existing flagship goals to | Flagship | Yes |
- Refactor goal list processing to use unified replace_goal_lists_helper function
- Support whitespace trimming in both macro filters and metadata values
All existing flagship goals migrated to use 'Yes' category.
New filtered macros enable focused flagship goal pages by category.
* support `(((#FLAGSHIP GOALS)))` notation
* fix :-- columns
* Refactor metadata injection to eliminate duplication
- Combined inject_teams_into_metadata_table and inject_task_owners_into_metadata_table into single inject_metadata_rows function
- Added find_markdown_table_end helper that finds any table by looking for lines starting with '|'
- Simplified logic: find table end, insert both rows - no complex conditional checking
- Added test for table finding logic
let content = "Some text before\n\n| Metadata | Value |\n|----------|-------|\n| Point of contact | @nikomatsakis |\n| Teams | (none) |\n\nSome text after";
602
+
603
+
let result = GoalPreprocessorWithContext::find_markdown_table_end(content);
604
+
assert!(result.is_some());
605
+
606
+
let offset = result.unwrap();
607
+
let(before, after) = content.split_at(offset);
608
+
609
+
// Should split right before the blank line after the table
610
+
assert!(before.ends_with("| Teams | (none) |\n"));
611
+
assert!(after.starts_with("\nSome text after"));
612
+
613
+
// Test that inserting at this offset works correctly
614
+
letmut test_content = content.to_string();
615
+
test_content.insert_str(offset,"| New row | value |\n");
616
+
assert!(test_content.contains("| Teams | (none) |\n| New row | value |\n\nSome text after"));
0 commit comments