From 83a96757db34c511a26bd448cbc1de59c7219e04 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Thu, 20 Feb 2020 15:57:08 -0500 Subject: [PATCH] Add section for patterns --- awx/ui_next/CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/ui_next/CONTRIBUTING.md b/awx/ui_next/CONTRIBUTING.md index 105935734f..aa2a6a65a9 100644 --- a/awx/ui_next/CONTRIBUTING.md +++ b/awx/ui_next/CONTRIBUTING.md @@ -138,6 +138,9 @@ Inside these folders, the internal structure is: - **/shared** - Components that are meant to be used specifically by a particular route, but might be sharable across pages of that route. For example, a form component which is used on both add and edit screens. - **/util** - Stateless helper functions that aren't tied to react. +### Patterns +- A **screen** shouldn't import from another screen. If a component _needs_ to be shared between two or more screens, it is a generic and should be moved to `src/components`. + #### Bootstrapping the application (root src/ files) In the root of `/src`, there are a few files which are used to initialize the react app. These are