diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6d2dbe8dc..799a3fd4c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,7 @@ --- layout: default title: Changelog +nav_order: 5 --- @@ -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. diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 56236706b..4bf679bb4 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,6 +1,7 @@ --- layout: default title: Code of conduct +nav_order: 6 --- # Contributor Covenant Code of Conduct diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 4cf9e67f8..517ae0a47 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,6 +1,7 @@ --- layout: default title: Contributing +nav_order: 7 --- # Contributing diff --git a/adr/0001-record-architecture-decisions.md b/docs/adrs/0001-record-architecture-decisions.md similarity index 81% rename from adr/0001-record-architecture-decisions.md rename to docs/adrs/0001-record-architecture-decisions.md index 1c8632201..a5b3b9182 100644 --- a/adr/0001-record-architecture-decisions.md +++ b/docs/adrs/0001-record-architecture-decisions.md @@ -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 diff --git a/adr/0002-naming-conventions-for-view-components.md b/docs/adrs/0002-naming-conventions-for-view-components.md similarity index 93% rename from adr/0002-naming-conventions-for-view-components.md rename to docs/adrs/0002-naming-conventions-for-view-components.md index 6e30f41a7..aad6761b7 100644 --- a/adr/0002-naming-conventions-for-view-components.md +++ b/docs/adrs/0002-naming-conventions-for-view-components.md @@ -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 diff --git a/adr/0003-polymorphic-slot-definitions.md b/docs/adrs/0003-polymorphic-slot-definitions.md similarity index 98% rename from adr/0003-polymorphic-slot-definitions.md rename to docs/adrs/0003-polymorphic-slot-definitions.md index fbf9f52db..a8779235d 100644 --- a/adr/0003-polymorphic-slot-definitions.md +++ b/docs/adrs/0003-polymorphic-slot-definitions.md @@ -1,3 +1,10 @@ +--- +layout: default +title: 3. Polymorphic slots +parent: Architectural decisions +nav_order: 3 +--- + # 3. Polymorphic slots Date: 2021/09/29 @@ -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 diff --git a/adr/0004-slots-separate-getter-setter.md b/docs/adrs/0004-slots-separate-getter-setter.md similarity index 94% rename from adr/0004-slots-separate-getter-setter.md rename to docs/adrs/0004-slots-separate-getter-setter.md index e5439253f..022eea710 100644 --- a/adr/0004-slots-separate-getter-setter.md +++ b/docs/adrs/0004-slots-separate-getter-setter.md @@ -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 diff --git a/docs/adrs/index.md b/docs/adrs/index.md new file mode 100644 index 000000000..b664718a2 --- /dev/null +++ b/docs/adrs/index.md @@ -0,0 +1,8 @@ +--- +layout: default +title: Architectural decisions +nav_order: 15 +has_children: true +--- + +# Architectural decisions diff --git a/docs/api.md b/docs/api.md index ffadcf677..7da45baaa 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,6 +1,6 @@ --- layout: default -title: API +title: API reference nav_order: 3 --- diff --git a/docs/compatibility.md b/docs/compatibility.md index a715d3456..769cb2263 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -1,6 +1,7 @@ --- layout: default title: Compatibility +nav_order: 6 --- # Compatibility diff --git a/docs/guide/collections.md b/docs/guide/collections.md index 7ecdd7762..ac490346e 100644 --- a/docs/guide/collections.md +++ b/docs/guide/collections.md @@ -1,7 +1,7 @@ --- layout: default title: Collections -parent: Guide +parent: How-to guide --- # Collections diff --git a/docs/guide/conditional_rendering.md b/docs/guide/conditional_rendering.md index 6b4fef975..cb65e3630 100644 --- a/docs/guide/conditional_rendering.md +++ b/docs/guide/conditional_rendering.md @@ -1,7 +1,7 @@ --- layout: default title: Conditional rendering -parent: Guide +parent: How-to guide --- # Conditional rendering diff --git a/docs/guide/generators.md b/docs/guide/generators.md index 02974410a..a71f758a2 100644 --- a/docs/guide/generators.md +++ b/docs/guide/generators.md @@ -1,7 +1,7 @@ --- layout: default title: Generators -parent: Guide +parent: How-to guide --- # Generators diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 9c8fb7bd3..2c947ec94 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -1,7 +1,7 @@ --- layout: default title: Getting started -parent: Guide +parent: How-to guide nav_order: 1 --- diff --git a/docs/guide/helpers.md b/docs/guide/helpers.md index 72d4282e8..38413b998 100644 --- a/docs/guide/helpers.md +++ b/docs/guide/helpers.md @@ -1,7 +1,7 @@ --- layout: default title: Helpers -parent: Guide +parent: How-to guide --- # Helpers diff --git a/docs/guide/index.md b/docs/guide/index.md index fc1ffcc4d..05d3f845f 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -1,8 +1,8 @@ --- layout: default -title: Guide +title: How-to guide nav_order: 2 has_children: true --- -# Guide +# How-to guide diff --git a/docs/guide/instrumentation.md b/docs/guide/instrumentation.md index 3af12d51d..712164adf 100644 --- a/docs/guide/instrumentation.md +++ b/docs/guide/instrumentation.md @@ -1,7 +1,7 @@ --- layout: default title: Instrumentation -parent: Guide +parent: How-to guide --- # Instrumentation diff --git a/docs/guide/javascript_and_css.md b/docs/guide/javascript_and_css.md index 98e3874ad..0a7dda2ec 100644 --- a/docs/guide/javascript_and_css.md +++ b/docs/guide/javascript_and_css.md @@ -1,7 +1,7 @@ --- layout: default title: Javascript and CSS -parent: Guide +parent: How-to guide --- # Javascript and CSS diff --git a/docs/guide/lifecycle.md b/docs/guide/lifecycle.md index 5cf40599d..de159c4c3 100644 --- a/docs/guide/lifecycle.md +++ b/docs/guide/lifecycle.md @@ -1,7 +1,7 @@ --- layout: default title: Lifecycle -parent: Guide +parent: How-to guide --- # Lifecycle diff --git a/docs/guide/previews.md b/docs/guide/previews.md index 2304c2ffa..ee9b3169a 100644 --- a/docs/guide/previews.md +++ b/docs/guide/previews.md @@ -1,7 +1,7 @@ --- layout: default title: Previews -parent: Guide +parent: How-to guide --- # Previews diff --git a/docs/guide/slots.md b/docs/guide/slots.md index 645f3e6cd..0e2dbaf1e 100644 --- a/docs/guide/slots.md +++ b/docs/guide/slots.md @@ -1,7 +1,7 @@ --- layout: default title: Slots -parent: Guide +parent: How-to guide --- # Slots diff --git a/docs/guide/templates.md b/docs/guide/templates.md index 5b890a675..106c2a5be 100644 --- a/docs/guide/templates.md +++ b/docs/guide/templates.md @@ -1,7 +1,7 @@ --- layout: default title: Templates -parent: Guide +parent: How-to guide --- # Templates diff --git a/docs/guide/testing.md b/docs/guide/testing.md index acb19a0ba..f8754265a 100644 --- a/docs/guide/testing.md +++ b/docs/guide/testing.md @@ -1,7 +1,7 @@ --- layout: default title: Testing -parent: Guide +parent: How-to guide --- # Testing diff --git a/docs/guide/translations.md b/docs/guide/translations.md index 334614091..43675ca98 100644 --- a/docs/guide/translations.md +++ b/docs/guide/translations.md @@ -1,7 +1,7 @@ --- layout: default title: Translations -parent: Guide +parent: How-to guide --- # Translations diff --git a/docs/history.md b/docs/history.md index dc1c20cbb..4f588da94 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,6 +1,7 @@ --- layout: default title: History +nav_order: 8 --- # History diff --git a/docs/known_issues.md b/docs/known_issues.md index 67e4d7e15..1f970c77a 100644 --- a/docs/known_issues.md +++ b/docs/known_issues.md @@ -1,6 +1,7 @@ --- layout: default title: Known issues +nav_order: 9 --- # Known issues diff --git a/docs/logo.md b/docs/logo.md index 3f90aa559..8425de30a 100644 --- a/docs/logo.md +++ b/docs/logo.md @@ -1,6 +1,7 @@ --- layout: default title: Logo +nav_order: 11 --- # Logo diff --git a/docs/resources.md b/docs/resources.md index 75cc6c272..cf14c5e5a 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -1,6 +1,7 @@ --- layout: default title: Resources +nav_order: 12 --- # Resources diff --git a/docs/viewcomponents-in-practice.md b/docs/viewcomponents-at-github.md similarity index 99% rename from docs/viewcomponents-in-practice.md rename to docs/viewcomponents-at-github.md index 4fe38ce23..75aba6335 100644 --- a/docs/viewcomponents-in-practice.md +++ b/docs/viewcomponents-at-github.md @@ -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._