Skip to content

Commit

Permalink
Documentation fixes (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 authored Dec 31, 2024
2 parents 55fc8f9 + 13f4b49 commit 3074b5d
Show file tree
Hide file tree
Showing 10 changed files with 224 additions and 198 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Begin by reading the [Quickstart Guide](https://opensource.respawn.pro/FlowMVI/q
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -426,30 +426,30 @@ Begin by reading the [Quickstart Guide](https://opensource.respawn.pro/FlowMVI/q
limitations under the License.
```

[badge-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
[badge-android]: https://img.shields.io/badge/-android-6EDB8D.svg?style=flat

[badge-android-native]: http://img.shields.io/badge/support-[AndroidNative]-6EDB8D.svg?style=flat
[badge-android-native]: https://img.shields.io/badge/support-[AndroidNative]-6EDB8D.svg?style=flat

[badge-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg?style=flat
[badge-jvm]: https://img.shields.io/badge/-jvm-DB413D.svg?style=flat

[badge-js]: http://img.shields.io/badge/-js-F8DB5D.svg?style=flat
[badge-js]: https://img.shields.io/badge/-js-F8DB5D.svg?style=flat

[badge-js-ir]: https://img.shields.io/badge/support-[IR]-AAC4E0.svg?style=flat

[badge-nodejs]: https://img.shields.io/badge/-nodejs-68a063.svg?style=flat

[badge-linux]: http://img.shields.io/badge/-linux-2D3F6C.svg?style=flat
[badge-linux]: https://img.shields.io/badge/-linux-2D3F6C.svg?style=flat

[badge-windows]: http://img.shields.io/badge/-windows-4D76CD.svg?style=flat
[badge-windows]: https://img.shields.io/badge/-windows-4D76CD.svg?style=flat

[badge-wasm]: https://img.shields.io/badge/-wasm-624FE8.svg?style=flat

[badge-apple-silicon]: http://img.shields.io/badge/support-[AppleSilicon]-43BBFF.svg?style=flat
[badge-apple-silicon]: https://img.shields.io/badge/support-[AppleSilicon]-43BBFF.svg?style=flat

[badge-ios]: http://img.shields.io/badge/-ios-CDCDCD.svg?style=flat
[badge-ios]: https://img.shields.io/badge/-ios-CDCDCD.svg?style=flat

[badge-mac]: http://img.shields.io/badge/-macos-111111.svg?style=flat
[badge-mac]: https://img.shields.io/badge/-macos-111111.svg?style=flat

[badge-watchos]: http://img.shields.io/badge/-watchos-C0C0C0.svg?style=flat
[badge-watchos]: https://img.shields.io/badge/-watchos-C0C0C0.svg?style=flat

[badge-tvos]: http://img.shields.io/badge/-tvos-808080.svg?style=flat
[badge-tvos]: https://img.shields.io/badge/-tvos-808080.svg?style=flat
1 change: 1 addition & 0 deletions docs/docs/integrations/essenty.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 3
sidebar_label: Essenty
---

# Essenty Integration
Expand Down
4 changes: 0 additions & 4 deletions docs/docs/plugins/prebuilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ execute _in the order they were installed_ into the Store.
This allows you to assemble business logic like a lego by placing the "bricks" in the order you want, and transparently
inject some logic into any store at any point.

Here's how the Plugin chain works:

![](/chart.png)

## Plugin Ordering

:::danger[The order of plugins matters! ]
Expand Down
17 changes: 15 additions & 2 deletions docs/docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sidebar_position: 1

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';
import ThemedImage from '@theme/ThemedImage';

# Get Started with FlowMVI

Expand All @@ -20,6 +22,19 @@ First of all, here's how the library works:
- Clients _subscribe_ to Stores to _render_ their **State** and _consume_ side-effects, called **Actions**.
- States, Intents, and Actions together form a **Contract**.

<details>
<summary>Show the diagram</summary>

<ThemedImage
alt="Chart depicting FlowMVI Plugin Chain"
sources={{
light: useBaseUrl('/diagram-light.webp'),
dark: useBaseUrl('/diagram-dark.webp'),
}}
/>

</details>

## Step 1: Configure the library

### 1.1: Add dependencies ![Maven Central](https://img.shields.io/maven-central/v/pro.respawn.flowmvi/core?label=Maven%20Central)
Expand Down Expand Up @@ -166,8 +181,6 @@ sealed interface CounterAction : MVIAction {
}
```

- All Contract classes _must_ be **immutable** and **comparable**. If you don't define `equals`, your IDE will
complain.
- If your store does not have a `State`, you can use an `EmptyState` object provided by the library.
- If your store does not have side effects, use `Nothing` in place of the side-effect type.

Expand Down
124 changes: 69 additions & 55 deletions docs/docs/state/statemanagement.md

Large diffs are not rendered by default.

206 changes: 95 additions & 111 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,74 @@
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";

const description = "Architecture Framework for Kotlin. Reuse every line of code. Handle all errors automatically. No boilerplate. Analytics, metrics, debugging in 3 lines. 50+ features."
const description =
"Architecture Framework for Kotlin. Reuse every line of code. Handle all errors automatically. No boilerplate. Analytics, metrics, debugging in 3 lines. 50+ features.";

const config: Config = {
title: 'FlowMVI',
tagline: 'Simplify Complexity.',
favicon: '/favicon.ico',
url: 'https://opensource.respawn.pro',
baseUrl: '/FlowMVI/',
organizationName: 'respawn-app',
projectName: 'FlowMVI',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onDuplicateRoutes: 'throw',
title: "FlowMVI",
tagline: "Simplify Complexity.",
favicon: "/favicon.ico",
url: "https://opensource.respawn.pro",
baseUrl: "/FlowMVI/",
organizationName: "respawn-app",
projectName: "FlowMVI",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
onDuplicateRoutes: "throw",
trailingSlash: false,
markdown: {
mermaid: true,
},
i18n: {
defaultLocale: 'en',
locales: ['en'],
defaultLocale: "en",
locales: ["en"],
},
stylesheets: [
"https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&family=Montserrat+Alternates:wght@500;600;700&display=swap",
],
headTags: [
{
tagName: "link",
attributes: {
rel: "preconnect",
href: "https://fonts.googleapis.com",
},
},
{
tagName: "link",
attributes: {
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossorigin: "anonymous",
},
},
{
tagName: "link",
attributes: {
rel: "preload",
href: "https://cdn.jsdelivr.net/gh/githubnext/[email protected]/fonts/webfonts/MonaspaceNeon-Regular.woff",
as: "font",
type: "font/woff",
crossorigin: "anonymous",
},
},
],
presets: [
[
'classic',
"classic",
{
docs: {
breadcrumbs: false,
sidebarCollapsed: false,
sidebarPath: './sidebars.ts',
routeBasePath: '/',
editUrl: 'https://github.com/respawn-app/flowmvi/tree/main/docs',
sidebarPath: "./sidebars.ts",
routeBasePath: "/",
editUrl: "https://github.com/respawn-app/FlowMVI/blob/master/docs/",
},
blog: false,
pages: false,
theme: {
customCss: './src/css/custom.css',
customCss: "./src/css/custom.css",
},
gtag: {
trackingID: "G-NRB9ZFKNGN",
Expand All @@ -47,7 +78,7 @@ const config: Config = {
],
themeConfig: {
colorMode: {
defaultMode: 'dark',
defaultMode: "dark",
respectPrefersColorScheme: true,
},
metadata: [
Expand All @@ -60,7 +91,7 @@ const config: Config = {
{ name: "og:description", content: description },
{ name: "description", content: description },
],
image: '/banner.png',
image: "/banner.png",
algolia: {
contextualSearch: false,
appId: "YFIMJHUME7",
Expand All @@ -75,29 +106,29 @@ const config: Config = {
},
},
navbar: {
title: 'FlowMVI',
title: "FlowMVI",
hideOnScroll: true,
style: "dark",
logo: {
alt: 'Logo',
src: '/icon.svg',
alt: "Logo",
src: "/icon.svg",
},
items: [
{
href: "/",
label: ${new Date().getFullYear()} Respawn OSS`,
position: 'right',
position: "right",
},
{
href: 'https://opensource.respawn.pro/FlowMVI/javadocs/index.html',
label: 'API Docs',
position: 'right',
href: "https://opensource.respawn.pro/FlowMVI/javadocs/index.html",
label: "API Docs",
position: "right",
},
{
href: 'https://github.com/respawn-app/FlowMVI',
href: "https://github.com/respawn-app/FlowMVI",
label: undefined,
className: 'header-github-link',
position: 'right',
className: "header-github-link",
position: "right",
},
],
},
Expand All @@ -106,107 +137,60 @@ const config: Config = {
theme: prismThemes.oneLight,
darkTheme: prismThemes.oneDark,
additionalLanguages: [
'java',
'kotlin',
'bash',
'diff',
'json',
'toml',
'yaml',
'gradle',
'groovy',
"java",
"kotlin",
"bash",
"diff",
"json",
"toml",
"yaml",
"gradle",
"groovy",
`properties`,
],
magicComments: [
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: { start: 'highlight-start', end: 'highlight-end' },
className: "theme-code-block-highlighted-line",
line: "highlight-next-line",
block: { start: "highlight-start", end: "highlight-end" },
},
{
className: 'code-block-error-line',
line: 'This will error',
className: "code-block-error-line",
line: "This will error",
},
],
},
headTags: [
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.googleapis.com',
},
},
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossorigin: 'anonymous',
},
},
{
tagName: 'link',
attributes: {
rel: 'preload',
href: 'https://cdn.jsdelivr.net/gh/githubnext/[email protected]/fonts/webfonts/MonaspaceNeon-Regular.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
},
{
tagName: 'link',
attributes: {
rel: 'preload',
href: 'https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@500;600;700&display=swap',
as: 'style',
},
},
{
tagName: 'link',
attributes: {
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&display=swap',
},
}
],
} satisfies Preset.ThemeConfig,
plugins: [
[
'@docusaurus/plugin-pwa',
"@docusaurus/plugin-pwa",
{
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
'saveData',
],
offlineModeActivationStrategies: ["appInstalled", "standalone", "queryString", "saveData"],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: 'icon.svg',
tagName: "link",
rel: "icon",
href: "icon.svg",
},
{
tagName: 'link',
rel: 'manifest',
href: 'manifest.json',
tagName: "link",
rel: "manifest",
href: "manifest.json",
},
{
tagName: 'meta',
name: 'theme-color',
content: '#00d46a',
tagName: "meta",
name: "theme-color",
content: "#00d46a",
},
{
tagName: 'link',
rel: 'apple-touch-icon',
href: 'apple-touch-icon.png',
tagName: "link",
rel: "apple-touch-icon",
href: "apple-touch-icon.png",
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-capable',
content: 'yes',
tagName: "meta",
name: "apple-mobile-web-app-capable",
content: "yes",
},
],
},
Expand Down
Loading

0 comments on commit 3074b5d

Please sign in to comment.