Skip to content

Commit

Permalink
Documentation (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
jisungbin committed Mar 5, 2024
1 parent 645ccb9 commit 0cd39c5
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/document-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
- name: Install mkdocs-material via pip
run: pip install mkdocs-material

- name: Install mdx-gh-links via pip
run: pip install mdx-gh-links

- name: Build mkdocs-material
run: cd documentation && mkdocs build

Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ However, it can perform the following tasks:

### Getting Started ![gradle-plugin-version](https://img.shields.io/maven-central/v/land.sungbin.composeinvestigator/composeinvestigator-gradle-plugin?style=flat-square)

Just add a Gradle plugin like this one:
Just add the plugin to your module-level Gradle like this:

```kotlin
```groovy
plugins {
id("land.sungbin.composeinvestigator") version "<version>"
id 'land.sungbin.composeinvestigator' version '<version>'
}
```

Expand All @@ -34,6 +34,17 @@ plugins {
>
> In other words, you need to adjust the Compose Compiler version and Kotlin version to use ComposeInvestigator.
Snapshots of the development version are available in Sonatype's snapshots repository.

```groovy
repositories {
// ...
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
}
```

You don't need to use any APIs to get started. But if you're looking for a fancier experience,
consider using the runtime API.

Expand Down
11 changes: 5 additions & 6 deletions documentation/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ComposeInvestigator has a nice set of runtime features.

---

### Customizing reporting formats
## Customizing reporting formats

ComposeInvestigator has a default reporting format that you can see in`ComposeInvestigatorConfig`.
The two most important of these are organized as variables, so they can be easily changed.
Expand All @@ -30,7 +30,7 @@ class ComposeInvestigatorFormat : Application() {
}
```

### Data management classes
## Data management classes

ComposeInvestigator has a class, `ComposableInvalidationTrackTable`, for storing data and reporting
certain events at the right time. This class is initialized as a singleton in every file, so it is
Expand Down Expand Up @@ -80,10 +80,9 @@ Column(
```

To prevent composables from being named anonymously, we are developing an Android lint to help you
name temporary composables in appropriate situations.
[(#90)](https://github.com/jisungbin/ComposeInvestigator/issues/90)
name temporary composables in appropriate situations. (#90)

### Add custom invalidation callbacks
## Add custom invalidation callbacks

By default, all composables are registered as recomposition-tracking targets, but you may want to
duplicate registing them for arbitrary reasons. (If you have a composable that isn't
Expand Down Expand Up @@ -124,7 +123,7 @@ we provide the `ComposableInvalidationEffect` API, which works similarly to `Lau
}
```

### Add custom status tracking
## Add custom status tracking

By default, any state variable that inherits from `State` or `Animatable` is targeted for state
tracking. However, if you want to enable state tracking for state variables other than `State` and
Expand Down
7 changes: 6 additions & 1 deletion documentation/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ In other words, you need to adjust the Compose Compiler version and Kotlin versi

---

### 1.5.10-0.1.0
## [Unreleased]

## [1.5.10-0.1.0] - 2024-02-26

- Initial release.

[Unreleased]: https://github.com/jisungbin/ComposeInvestigator/compare/1.5.10-0.1.0...HEAD
[1.5.10-0.1.0]: https://github.com/jisungbin/ComposeInvestigator/releases/tag/1.5.10-0.1.0
22 changes: 17 additions & 5 deletions documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,25 @@ However, it can perform the following tasks:

---

### Getting Started ![gradle-plugin-version](https://img.shields.io/maven-central/v/land.sungbin.composeinvestigator/composeinvestigator-gradle-plugin?style=flat-square)
## Getting Started ![gradle-plugin-version](https://img.shields.io/maven-central/v/land.sungbin.composeinvestigator/composeinvestigator-gradle-plugin?style=flat-square)

Just add a Gradle plugin like this one:
Just add the plugin to your module-level Gradle like this:

``` kotlin
```groovy
plugins {
id("land.sungbin.composeinvestigator") version "<version>"
id 'land.sungbin.composeinvestigator' version '<version>'
}
```

Snapshots of the development version are available in Sonatype's snapshots repository.
Snapshot versions are released only occasionally when pre-validation is needed to resolve issues.

```groovy
repositories {
// ...
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
}
```

Expand All @@ -34,7 +46,7 @@ looking for a fancier experience, consider using the runtime API.

If you want to learn about the runtime API, check out our [advanced](advanced.md) page.

### License
## License

ComposeInvestigator is available under
the [MIT license](https://github.com/jisungbin/ComposeInvestigator/blob/main/LICENSE).
11 changes: 5 additions & 6 deletions documentation/docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ val composableCallstack: Stack<String> = Stack()

---

### Composable call stacks tracking
## Composable call stacks tracking

Composable callstack tracing has been implemented since
issue [#77](https://github.com/jisungbin/ComposeInvestigator/issues/77)
and is still an experimental feature.
Composable callstack tracing has been implemented since issue #77 and is still an experimental
feature.

The concept is simple: Wrap all calls to composable functions in `try-finally`, and push the
parent function name onto the stack before calling the composable. Then pop it from `finally`.
Expand All @@ -83,7 +82,7 @@ val composableCallstack: Stack<String> = Stack()

If you have an idea for a better way to track callstacks, please open an issue.

### Recomposition tracking
## Recomposition tracking

Recomposition tracing involves three different kinds of code generation.

Expand Down Expand Up @@ -196,7 +195,7 @@ val composeInvestigatorTable: ComposableInvalidationTrackTable = ComposableInval
}
```

### State change tracking
## State change tracking

All state variables that inherit from `State` or `Animatable` generate `registerStateObjectTracking`
code to enable tracking of state changes.
Expand Down
4 changes: 4 additions & 0 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.superfences
- pymdownx.saneheaders
- mdx_gh_links:
user: jisungbin
repo: ComposeInvestigator

nav:
- 'Overview': 'index.md'
Expand Down

0 comments on commit 0cd39c5

Please sign in to comment.