Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Changelog
nav_order: 5
---

<!-- Add unreleased changes under the "main" heading. -->
Expand All @@ -9,9 +10,13 @@ title: Changelog

## main

* Add architectural decisions to documentation and rename sidebar sections.

*Joel Hawksley*

* Clarify documentation on testability of Rails views.

*Joel Hawksley
*Joel Hawksley*

* Add Arrows to list of companies using ViewComponent.

Expand Down
1 change: 1 addition & 0 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Code of conduct
nav_order: 6
---

# Contributor Covenant Code of Conduct
Expand Down
1 change: 1 addition & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Contributing
nav_order: 7
---

# Contributing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: 1. Record architecture decisions
parent: Architectural decisions
nav_order: 1
---

# 1. Record architecture decisions

Date: 2021/02/19
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: 2. Naming conventions for ViewComponents
parent: Architectural decisions
nav_order: 2
---

# 2. Naming conventions for ViewComponents

Date: 2021/07/13
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
layout: default
title: 3. Polymorphic slots
parent: Architectural decisions
nav_order: 3
---

# 3. Polymorphic slots

Date: 2021/09/29
Expand Down Expand Up @@ -97,6 +104,7 @@ In such cases, there are several viable workarounds:
1. Add the wrapping HTML to the template.
1. Provide a lambda for each polymorphic type that adds the wrapping HTML. There is the potential for code duplication here, which could be mitigated by calling a class or helper method.
1. Manually implement a polymorphic slot using a positional `type` argument and `case` statement, as shown in the example below. This effectively replicates the behavior described in this proposal.

```ruby
renders_many :items do |type, *args, **kwargs|
content_tag :td, class: kwargs[:table_row_classes] do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Separate Slot Getters and Setters
---
layout: default
title: 4. Separate Slot Getters and Setters
parent: Architectural decisions
nav_order: 4
---

# 4. Separate Slot Getters and Setters

Date: 2022/03/22

Expand Down
8 changes: 8 additions & 0 deletions docs/adrs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Architectural decisions
nav_order: 15
has_children: true
---

# Architectural decisions
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: API
title: API reference
nav_order: 3
---

Expand Down
1 change: 1 addition & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Compatibility
nav_order: 6
---

# Compatibility
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/collections.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Collections
parent: Guide
parent: How-to guide
---

# Collections
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/conditional_rendering.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Conditional rendering
parent: Guide
parent: How-to guide
---

# Conditional rendering
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/generators.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Generators
parent: Guide
parent: How-to guide
---

# Generators
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Getting started
parent: Guide
parent: How-to guide
nav_order: 1
---

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/helpers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Helpers
parent: Guide
parent: How-to guide
---

# Helpers
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: default
title: Guide
title: How-to guide
nav_order: 2
has_children: true
---

# Guide
# How-to guide
2 changes: 1 addition & 1 deletion docs/guide/instrumentation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Instrumentation
parent: Guide
parent: How-to guide
---

# Instrumentation
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/javascript_and_css.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Javascript and CSS
parent: Guide
parent: How-to guide
---

# Javascript and CSS
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Lifecycle
parent: Guide
parent: How-to guide
---

# Lifecycle
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/previews.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Previews
parent: Guide
parent: How-to guide
---

# Previews
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/slots.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Slots
parent: Guide
parent: How-to guide
---

# Slots
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/templates.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Templates
parent: Guide
parent: How-to guide
---

# Templates
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/testing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Testing
parent: Guide
parent: How-to guide
---

# Testing
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/translations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Translations
parent: Guide
parent: How-to guide
---

# Translations
Expand Down
1 change: 1 addition & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: History
nav_order: 8
---

# History
Expand Down
1 change: 1 addition & 0 deletions docs/known_issues.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Known issues
nav_order: 9
---

# Known issues
Expand Down
1 change: 1 addition & 0 deletions docs/logo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Logo
nav_order: 11
---

# Logo
Expand Down
1 change: 1 addition & 0 deletions docs/resources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: Resources
nav_order: 12
---

# Resources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: default
title: ViewComponents in practice
title: ViewComponents at GitHub
nav_order: 4
---

# ViewComponents in practice
# ViewComponents at GitHub

_GitHub's internal guide to building component-driven UI in Rails. Consider it to be more opinion than fact._

Expand Down