Skip to content

Commit

Permalink
[add] updated after latest discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
dokato committed Jul 11, 2020
1 parent a977d13 commit 131b909
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,29 @@ function(input, another_argument){}

## Constants

Constants are defined with capital letter snake case.
Constants are defined with capital letter snake case and kept in the
`constants.R` script (unless they're internal).

```r
COLORS <- c("red", "green", "blue")
```

## Function names

TODO
Function are called with `snake_case`.

- Functions that define UI should contain name of the element, eg. `box`, `horizontal_menu`

- Functions that define active elements should contain `input` in their name, eg. `checkbox_input`.

## Overriding shiny functions

When overriding shiny functions we usually follow `shiny` styling. Usually it requires
creating a function with `shiny.semantic` syntax and then implementing a wrapper that
follows `shiny` syntax.

**!!** Here argument names can actually follow `camelCase` syntax.

Example:

```r
Expand Down

0 comments on commit 131b909

Please sign in to comment.