diff options
author | Matias Linares <matias@deprecated.org> | 2025-03-05 17:48:23 -0300 |
---|---|---|
committer | Matias Linares <matias@deprecated.org> | 2025-03-05 17:48:23 -0300 |
commit | 228cfa7b423d77d42c6db251108c9cb8b7a51eb5 (patch) | |
tree | 9acb329042a582168e08699ab3fa8c6b1ee49e6e | |
parent | 99a8e02c5fd26be5ac80efa35c33b550df9c0ee9 (diff) | |
download | kodereviewer-228cfa7b423d77d42c6db251108c9cb8b7a51eb5.tar.gz |
Add documentation
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | docs/Makefile | 7 | ||||
-rw-r--r-- | docs/data.adoc | 21 | ||||
-rw-r--r-- | docs/index.adoc | 9 | ||||
-rw-r--r-- | docs/qml.adoc | 68 |
5 files changed, 108 insertions, 0 deletions
@@ -165,3 +165,6 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +docs/*.html +docs/images diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..05b3f78 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,7 @@ +ADOC_FILES := $(wildcard *.adoc) +HTML_FILES := $(ADOC_FILES:%.adoc=%.html) + +all: $(HTML_FILES) + +%.html : %.adoc + asciidoctor $^ -o $@ diff --git a/docs/data.adoc b/docs/data.adoc new file mode 100644 index 0000000..b267959 --- /dev/null +++ b/docs/data.adoc @@ -0,0 +1,21 @@ += data.py + +== PullRequest + +References a pull request. + +This class is a `QObject` with the following properties: + +`number` :: (_int_)Pull request number. +`title` :: (_str_) Title of the pull request. +`state` :: (_str_) State of the pull request. This could be one of `open`, `closed` of `draft`. +`url` :: (_str_) Url of the pull request of the form `https://github.com/<user>/<repo>/pull/<number>`. +`body` :: (_str_) Description of the pull request. +`created_at` :: (_datetime_) When the pull requests was created. +`draft` :: (_bool_) If it's a draft pull request. +`username` :: (_str_) Who made the pull request +`reviewers` :: (_list[User]_) All reviewers. +`last_commit` :: (_str_) Sha of the latest commit. +`labels` :: (_list[Label]_) List of labels of the pull request. +`files` :: (_list[ChangedFile]_) List of files that are modified in this pull request. +`reviews` :: (_list[ReviewComment]_) List of reviews. diff --git a/docs/index.adoc b/docs/index.adoc new file mode 100644 index 0000000..552da19 --- /dev/null +++ b/docs/index.adoc @@ -0,0 +1,9 @@ += Kodereviewer documentation +Author Name <matias@deprecated.org> + +This a technical documentation for kodereviewer with the API of some modules +and explanations about every component. + +== Components + +- link:qml.html[QML Modules] diff --git a/docs/qml.adoc b/docs/qml.adoc new file mode 100644 index 0000000..23ac0ab --- /dev/null +++ b/docs/qml.adoc @@ -0,0 +1,68 @@ += QML Modules +:toc: + +== Main.qml + +Main `Kirigami.ApplicationWindow`. This window has a property `project` that tells the application which page should display. + +In case `project` is `null` (this is when the application starts), it will show a <<WelcomePage.qml, Welcome Page>>. + +If a project is selected, it will show a <<ProjectListPage.qml, Project List page>> and a <<PullRequestDescriptionPage.qml, Pull request description page>>. + +In the footer it will show a `Kirigami.NavigationTabBar` with four items. Selecting one will `pop` the current page and will push it related page. + +image::images/main-navigation-tab-bar.png[NavigationTabBar] + +Info :: Info of the current pull request. See <<PullRequestDescriptionPage.qml, Pull request description page>>. +Comments :: All comments of the pull request. See <<CommentPage.qml, Comment page>>. +Files :: Diff view of the files in the pull request. See <<FilesChangedPage.qml, Files changed page>>. +Reviews :: Reviews made to the pull request. See <<ReviewListPage.qml, Review list page>>. + +== WelcomePage.qml + +This page list the following items + +- Latest projects +- Button to add a project +- Settings page + +== SettingsPage.qml + +General settings of the application. + +Has the authorization token for github API. + +== ProjectListPage.qml + +`Kirigami.ScrollablePage` that list all pull requests in a project. + +image::images/ProjectListPage.png[ProjectListPage] + +Selecting a pull request the list will trigger a `pullRequestSelected` signal. + +=== Key actions + +* [x] Refresh pull request list +* [ ] Search pull requests + +== PullRequestDescriptionPage.qml + +Shows all the information of a selected pull request + +image::images/PullRequestDescriptionPage.png[PullRequestDescriptionPage] + +=== PullRequestDescription.qml + +`Kirigami.FormLayout` with all the info about the pull request. + +The `pullRequest` variable is of a type xref:data.adoc#PullRequest[`kodereviewer.data.PullRequest`] + +=== Key actions + +None. This page is informational only. + +== CommentPage.qml + +== FilesChangedPage.qml + +== ReviewListPage.qml |