YouTube Video PiWzaD8X4H0
๐ **Source:** [YouTube Video PiWzaD8X4H0](https://www.youtube.com/watch?v=PiWzaD8X4H0)
> [!note]+ Document Notes
> tags: [etch, wordpress, agency-builds, component-development]
> author: AgencyGrade
> source: YouTube
> reference: https://www.youtube.com/watch?v=PiWzaD8X4H0
> date created: 2024-12-28 13:45
>
> # ๐ท๏ธ Title: AgencyGrade Builds: Tool Single Template with Object Props in Etch
>
<!-- deep-read:sections start -->
## ๐งฐ Action Inbox
- [H1] Refactor tool category cards to use object props โ 5:23 #etch
- [H2] Build static tool single template โ 15:30 #component-development
- [H3] Implement conditional logic for deal cards โ 52:45 #wordpress
## ๐งญ Table of Contents
- [๐ Summary](#-summary)
- [๐ Main Content](#-main-content)
- [๐๏ธ Notes](#๏ธ-notes)
- [๐ References](#-references)
- [๐ฃ๏ธ Paraphrase](#๏ธ-paraphrase)
- [๐ฐ Newsletter](#-newsletter)
- [โ
Action Items](#-action-items)
- [๐งช Hypotheses](#-hypotheses)
- [๐ Methodology](#-methodology)
- [โ Questions](#-questions)
- [๐ฎ Future Research](#-future-research)
- [๐ก Implications](#-implications)
- [๐ง Learning Styles Assessment](#-learning-styles-assessment)
- [๐ Accessibility Assessment](#-accessibility-assessment)
- [๐ DEIB Assessment](#-deib-assessment)
- [โ
Logical Validity](#-logical-validity)
- [๐ก๏ธ DARVO Analysis](#-darvo-analysis)
- [๐ฏ Conclusion](#-conclusion)
### ๐ References
- [Etch Documentation](https://docs.edgewp.com)
- [AgencyGrade Builds Season 1](https://www.youtube.com/playlist?list=PLuNm1Lhyto_OKx6gw_i71vkh0s7jt4QCp)
## ๐ Summary
- AgencyGrade continues rebuilding Trailers.com using Etch framework
- Refactored tool category cards to use new object prop feature
- Built static version of tool single page template
- Object props reduce complexity by mapping loop data to components
- Component development follows static-first, then dynamic approach
## ๐ Main Content
In this episode of AgencyGrade Builds, Kevin and Christian demonstrate advanced component development in Etch by refactoring existing tool category cards to use the new object prop feature and building a comprehensive tool single page template. The object prop feature allows components to accept entire data objects from loops rather than individual props, significantly reducing complexity and improving maintainability.
The team explains that object props are ideal when components will always be used within loops and never as standalone instances. This pattern simplifies component usage by eliminating the need to manually map dynamic data values for each prop. The refactor took only 5 minutes but provided substantial improvements in developer experience.
For the tool single template, they built a complex layout featuring hero sections, deal cards, video embeds, and content areas using BEM methodology and CSS custom properties for maintainable, scalable styles.
## ๐๏ธ Notes
#### โฑ๏ธ [00:00](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=0) โ [H1] Introduction and episode overview
- Key idea: Continuing Trailers.com rebuild with tool refactoring and single template
- Evidence: "We refactored a little bit of our tool category cards. We're using the object prop now in Etch"
#### โฑ๏ธ [05:23](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=323) โ [H2] Object prop refactoring explanation
- Key idea: Object props eliminate prop management complexity for loop-driven components
- Evidence: "Instead of like a laundry list of props going on... there's a new prop called the object prop"
#### โฑ๏ธ [08:15](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=495) โ [H2] When to use object props vs manual props
- Key idea: Use object props when components are always loop-driven, never standalone
- Evidence: "If you're always going to use this component in a loop... it's probably a good idea to use an object prop"
#### โฑ๏ธ [11:30](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=690) โ [H3] Object prop preview data requirements
- Key idea: Current version requires manual key matching between component and loop data
- Evidence: "This needs to be the key that exists inside the loop"
#### โฑ๏ธ [12:45](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=765) โ [H2] Object prop future enhancements
- Key idea: Version 1.0 limitations will be addressed in future iterations
- Evidence: "This is the 1.0 version of the object prop... let's get something working and then make it better"
#### โฑ๏ธ [15:30](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=930) โ [H1] Tool single template design review
- Key idea: Complex template with hero, ratings, deals, and conditional content
- Evidence: "There's a lot going on in this template... rating, category, cost, custom fields"
#### โฑ๏ธ [18:45](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=1125) โ [H2] Deal card architecture discussion
- Key idea: Simple text fields for deals rather than separate CPT
- Evidence: "There is no deal CPT. There's literally a deal text field in each one of the tools"
#### โฑ๏ธ [22:15](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=1335) โ [H3] Container queries for responsive deal cards
- Key idea: Container queries handle same-breakpoint different layouts
- Evidence: "Critical use of container queries... two different layouts just depending on whether it's in sidebar or not"
#### โฑ๏ธ [25:30](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=1530) โ [H1] Building tool hero section structure
- Key idea: Static-first approach with semantic HTML structure
- Evidence: "First step always is if you just build a static version... you can always come back and make it dynamic"
#### โฑ๏ธ [32:00](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=1920) โ [H2] Logo positioning with CSS custom properties
- Key idea: Mathematical relationships between logo size and positioning
- Evidence: "Made a locally scope variable to tie this padding and this logo position together"
#### โฑ๏ธ [38:15](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=2295) โ [H2] Content structure with sidebar layout
- Key idea: Grid-based layout with content wrapper and sidebar
- Evidence: "Content wrapper and sidebar... display grid, grid template columns grid 2"
#### โฑ๏ธ [45:30](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=2730) โ [H3] SVG logo handling and aspect ratios
- Key idea: Wrapper approach for consistent logo display
- Evidence: "Wrap this in a div... force the aspect ratio to happen on this"
#### โฑ๏ธ [52:45](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=3165) โ [H2] Deal card component structure
- Key idea: Conditional display logic for promo codes vs affiliate links
- Evidence: "If there's no code, we're going to hide the code group completely"
#### โฑ๏ธ [58:00](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=3480) โ [H3] CSS gradient backgrounds and styling
- Key idea: Complex gradients using color-mix function
- Evidence: "Linear gradient to bottom... color mix in sRGB from var primary light"
#### โฑ๏ธ [62:30](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=3750) โ [H3] CSS border dash customization challenges
- Key idea: Custom dash patterns require CSS hacks
- Evidence: "You got to fake it. You got to do a repeating linear gradient with border image"
## ๐ References
- [Etch Documentation](https://docs.edgewp.com)
- [Component Props Documentation](https://docs.edgewp.com/components/component-props)
- [Object Prop Documentation](https://docs.edgewp.com/components/component-props/object-prop)
## ๐ฃ๏ธ Paraphrase
- Object props in Etch allow passing entire data objects to components instead of individual props, reducing complexity for loop-driven components
- The refactoring process is quick (5 minutes) but provides significant developer experience improvements
- Static-first development approach allows building complex templates incrementally with later dynamic integration
## ๐ฐ Newsletter
**Etch Object Props: Streamlining Component Development**
The latest AgencyGrade Builds episode showcases Etch's new object prop feature, a game-changer for WordPress developers working with dynamic components. Instead of managing dozens of individual props, you can now pass entire data objects from loops directly to components.
**Key Benefits:**
- Drastically reduced prop management overhead
- Better maintainability for loop-driven components
- 5-minute refactor with substantial UX improvements
**When to Use Object Props:**
Perfect for components that will always live inside loops and never exist as standalone instances. The feature maps loop data directly to component internals, eliminating manual prop configuration.
**What's Next:**
Version 1.0 is just the beginning. Future iterations will add UI improvements, better key mapping, and enhanced third-party data source support.
Resources: [Etch Docs](https://docs.edgewp.com), [Component Props Guide](https://docs.edgewp.com/components/component-props), [AgencyGrade Builds](https://www.youtube.com/playlist?list=PLuNm1Lhyto_OKx6gw_i71vkh0s7jt4QCp)
## โ
Action Items
#### WordPress
- Core: Implement object prop patterns in WordPress component development
- Themes: Refactor existing component libraries to use object props where appropriate
- Performance: Monitor object prop impact on rendering performance
- Documentation: Create best practice guides for object prop implementation
#### Component Development
- Architecture: Define clear guidelines for when to use object props vs manual props
- Testing: Establish testing patterns for object prop components
- Migration: Create migration paths for existing prop-heavy components
- Standards: Document BEM methodology integration with object props
## ๐งช Hypotheses
- Object props will significantly reduce development time for loop-driven components
- Static-first development approach leads to more maintainable WordPress themes
- CSS custom properties improve component flexibility and maintainability
- Container queries will become essential for responsive WordPress design
### ๐ Methodology
- Compare development time: traditional props vs object props
- Measure code complexity reduction in component refactors
- Test responsive behavior with container queries vs media queries
### โ Questions
- How will object props perform with large datasets in WordPress loops?
- What's the optimal balance between object props and manual props in component libraries?
- How should object prop components handle missing or malformed data?
### ๐ฎ Future Research
- Object prop performance optimization in WordPress environments
- Integration patterns with popular WordPress builders
- Automated migration tools for existing component libraries
### ๐ก Implications
- Practice: Faster component development and reduced prop management overhead
- Education: Need for updated WordPress development curricula covering object props
- Tooling: Enhanced debugging tools needed for object prop components
- Standards: New best practices for WordPress component architecture
### ๐ง Learning Styles Assessment
Reading level estimate: 12th grade
#### ๐ Visual learners
- Present: Code examples, component diagrams, before/after comparisons
- Improve: Interactive demos, visual prop mapping diagrams
#### ๐ Aural learners
- Present: Detailed verbal explanations of concepts
- Improve: Audio-only tutorial versions, podcast format
#### ๐ฃ๏ธ Verbal learners
- Present: Clear terminology, step-by-step explanations
- Improve: Glossary of Etch-specific terms, analogies
#### ๐งฉ Kinesthetic learners
- Present: Hands-on coding examples, live refactoring
- Improve: Interactive coding sandboxes, practice exercises
#### ๐ง Logical learners
- Present: Decision trees for prop selection, systematic approach
- Improve: Flowcharts for component architecture decisions
#### ๐งโ๐คโ๐ง Social learners
- Present: Team development discussion, collaborative problem solving
- Improve: Community challenges, peer code review sessions
#### ๐งโโ๏ธ Solitary learners
- Present: Individual coding exercises, self-paced learning
- Improve: Personal project templates, solo practice guides
#### ๐ฟ Naturalistic learners
- Present: Organic development process, evolutionary approach
- Improve: Real-world project context, ecosystem thinking
### ๐ Accessibility Assessment
#### Screen reader semantics
- Present: Proper heading structure, semantic HTML elements
- Improve: ARIA labels for component relationships
#### Keyboard navigation
- Present: Focus management in components
- Improve: Skip links for complex component structures
#### Contrast and readability
- Present: High contrast code examples
- Improve: Dark mode support for code demonstrations
#### Text resizing and reflow
- Present: Responsive design patterns
- Improve: Component flexibility at 200% zoom
#### Media and captions
- Present: Video content with visual demonstrations
- Improve: Detailed captions for code explanations
#### Forms and interactions
- Present: Accessible component patterns
- Improve: Error handling documentation
### ๐ DEIB Assessment
#### Cultural breadth
- Present: Universal development patterns
- Improve: Multi-language component examples
#### Inclusive language
- Present: Clear, technical terminology
- Improve: Avoid assumptions about prior knowledge
#### Neurodiversity support
- Present: Structured, step-by-step approach
- Improve: Multiple explanation formats
#### Representation
- Present: Diverse development scenarios
- Improve: Various skill level examples
#### Psychological safety
- Present: Encouragement of experimentation
- Improve: Emphasize learning from mistakes
### โ
Logical Validity
#### Strong reasoning
- Deductive strength: Object props reduce complexity (demonstrated through refactoring)
- Inductive strength: Static-first approach works (shown across multiple components)
- Causal reasoning: Proper CSS architecture enables maintainability
- Analogical strength: Component development parallels to other frameworks
#### Fallacies
- Appeal to novelty: Assuming newer features are always better without context
- False dilemma: Presenting object props vs manual props as exclusive choices
#### Tone of voice
- Overall tone: Collaborative, educational, technically focused with practical demonstrations
### ๐ก๏ธ DARVO Analysis
- Deny: No concerning denial patterns observed
- Attack: No attacks on alternative approaches
- Reverse victim/offender: Not applicable
- Emotional cues and rhetoric: Positive, encouraging tone throughout
## ๐ฏ Conclusion
Object props represent a significant evolution in WordPress component development, offering substantial improvements in developer experience and code maintainability. The AgencyGrade team's approach of iterative improvement and static-first development provides a practical framework for implementing complex WordPress templates efficiently.
The demonstration shows how modern CSS features like custom properties, container queries, and advanced gradients can create sophisticated, maintainable WordPress themes when combined with proper component architecture.
## ๐งฑ Refactor Appendix
### ๐ Literature Split Pad
### [H1] Object props eliminate component complexity
> [!quote] [AgencyGrade Builds: Tool Single Template](https://www.youtube.com/watch?v=PiWzaD8X4H0) by [[AgencyGrade]] via [[YouTube]]. Published 2024-11-03. Accessed 2024-12-28.
> "Instead of like a laundry list of props going on... there's a new prop called the object prop"
Demonstrates how object props reduce component management overhead in Etch framework.
[view highlight](https://www.youtube.com/watch?v=PiWzaD8X4H0?t=323)
<!-- deep-read:sections end -->