diff --git a/docs/docs/user/filter-directives.md b/docs/docs/user/filter-directives.md new file mode 100644 index 000000000..77814c99b --- /dev/null +++ b/docs/docs/user/filter-directives.md @@ -0,0 +1,83 @@ +# What Are Filter Directives? + +Filter Directives are a fancy way of *filtering* rows inside a table. + +They provide an advanced toolkit for users to whittle down what they +actually want to see! + +!!! tip + You can tell if a field supports filter directives if it has a lightning + bolt next to it. You can mouse over and click on the lightning bolt for + more information about what filter directives are available! + +## Simple Example + +In the below examples, let's assume we're talking about a table of a users +scores. + +By default, the filter bar loosely searches every column in the table. So if +you search for `AA`, You will get a list of all the scores that were on a song +that contains `AA` (such as `AA -rebuild-`) and all of the scores that have the grade +`AA` (OR `AAA`, as it's a loose match!). + +This isn't always what we want, though! What if I wanted to see only scores +on the song `AA`? + +That's where Filter Directives come in. We can search for that using: + +``` +title:AA +``` + +Simple enough, right! + +Now, depending on *where* you actually are, different filter directives are +available. The above example makes sense for filtering scores, but makes *no* +sense for filtering a table of users! + +!!! tip + You can *always* find out what directives are available by clicking the + lightning bolt next to the field. + +## Advanced Example + +Before, we mentioned that this was a *powerful* toolkit for filtering rows +in a table. The above example is fairly mundane, though. What else can we do? + +By default, a directive performs a loose match on that value, but we can +change that behaviour! + +| Name | Example | What it does. | +| :: | :: | :: | +| Normal | `title:AA` | Matches any title that contains "AA". | +| Exact | `title:!AA` | Matches any title that is *exactly* AA. | +| Less Than | `percent:<50` | Matches any percent that is less than 50. | +| Less Than Equal | `percent:<=50` | Matches any percent that is less than or equal to 50. | +| Greater Than | `percent:>50` | Matches any percent that is greater than 50. | +| Greater Than Equal | `percent:>=50` | Matches any percent that is greater than or equal to 50. | +| Regex | `title:~^[a-z]*$` | Matches any title that matches the regex `^[a-z]*$` | + +!!! note + Regex Mode refers to [Regular Expressions](https://en.wikipedia.org/wiki/Regular_expression). + + If you aren't familiar, don't worry! This specific mode is barely useful + and for nerds. + +## Other Things + +You can use multiple directives in one filter! + +`title:!AA percent:>50` - Find all scores on AA where the percent is greater than 50. + +Multiple directives are separated by spaces. However, if you need to use a +space inside a value, you should quote it, like this: + +`title:!"FREEDOM DiVE" percent:>50`. + +!!! tip + If you need quotes *inside* that, you should escape them, like this: + + `title:!"A Tribe Called \"Quest\"" percent:>50` + + However, it is likely you will never need to use this. + diff --git a/docs/docs/user/pbs-scores.md b/docs/docs/user/pbs-scores.md new file mode 100644 index 000000000..ff9d13f45 --- /dev/null +++ b/docs/docs/user/pbs-scores.md @@ -0,0 +1,15 @@ +# What's the difference between a PB and a Score? + +A PB is all of your best scores on that chart joined together. + +In most games, this means joining your best score with your best lamp. +Some games have some additional properties - like BP in IIDX and BMS - that +also need to be joined. + +## Why bother? + +It would *suck* if you could overwrite good scores with slightly worse ones, +and people would **NEVER** agree on what the primary metric for a games was. + +If you got a better lamp on a chart in BMS, and it ruined your existing *sick* +score, that would be terrible! diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index cd6bf2b6b..273e4e599 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -30,6 +30,8 @@ nav: - "user/rules.md" - "user/games.md" - "user/features.md" + - "user/pbs-scores.md" + - "user/filter-directives.md" - Terminology: - "user/terminology/lamps.md"