Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit d35c83d

Browse files
authored
Merge pull request #86 from agile-ts/develop
Develop
2 parents 4c6b398 + 02d76e8 commit d35c83d

File tree

10 files changed

+426
-398
lines changed

10 files changed

+426
-398
lines changed

docs/Interfaces.md

Lines changed: 247 additions & 207 deletions
Large diffs are not rendered by default.

docs/examples/Indroduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
id: introduction
3-
title: Introduction
3+
title: Examples
44
sidebar_label: Introduction
55
slug: /examples
66
---
77

88
Most of the time you can learn something better by seeing it in action.
99
That's why we've put together a few examples for you.
10-
If that's not enough for you, we have more examples in the [AgileTs repository](https://github.com/agile-ts/agile/tree/master/examples).
10+
If that's not enough, you can find even more examples in the [AgileTs repository](https://github.com/agile-ts/agile/tree/master/examples).
1111

1212
## 🚀 Quick Links
1313
- [React](./react/All.mdx)

docs/packages/core/features/agile-instance/Introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ new Agile({
4747
localStorage: false
4848
});
4949
```
50-
Here is a Typescript Interface for quick reference, however
51-
each property will be explained in more detail below.
50+
Here is a Typescript Interface for quick reference. However,
51+
each property is explained in more detail below.
5252
```ts
5353
export interface CreateAgileConfigInterface {
5454
logConfig?: CreateLoggerConfigInterface;

docs/packages/core/features/collection/Introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ There are two different ways of configuring a Collection. Both have their advant
193193
}))
194194
```
195195

196-
Here is a Typescript Interface of the configuration object for quick reference,
197-
however each property will be explained in more detail below.
196+
Here is a Typescript Interface for quick reference. However,
197+
each property is explained in more detail below.
198198
```ts
199199
export interface CreateCollectionConfigInterface<DataType = DefaultItem> {
200200
groups?: { [key: string]: Group<any> } | string[];

docs/packages/core/features/collection/Methods.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The `itemKeys` which the Group initially represents are passed as a first parame
6363
```ts
6464
collection.Group(["item1", "item2"]);
6565
```
66-
The object key will be used as `groupKey`, if we don't pass a separate key into the Group `config`.
66+
The object key is used as `groupKey`, if we don't pass a separate key into the Group `config`.
6767
```ts {3,9}
6868
App.createCollection((collection) => ({
6969
groups: {
@@ -122,7 +122,7 @@ The `itemKey` of the Item which the Selector initially represents is passed as a
122122
```ts
123123
collection.Selector("item1");
124124
```
125-
The object key will be used as `selectorKey`, if we don't pass a separate key into the Selector `config`.
125+
The object key is used as `selectorKey`, if we don't pass a separate key into the Selector `config`.
126126
```ts {3,9}
127127
App.createCollection((collection) => ({
128128
selectors: {
@@ -214,12 +214,12 @@ Be aware that each data needs one `primaryKey` to be correctly identified later.
214214
MY_COLLECTION.collect({id: 1, name: "jeff"});
215215
```
216216
In the above example, the `primaryKey` property is `id`,
217-
so '1' will be the unique identifier (`primaryKey`) of the collected data.
217+
so '1' is the unique identifier (`primaryKey`) of the collected data.
218218
We can also collect multiple data objects at once.
219219
```ts
220220
MY_COLLECTION.collect([{id: 9, name: "hans"}, {id: 22, name: "frank"}]);
221221
```
222-
Each collected data will be transformed to an extension of the `State Class` called [`Item`](./Introduction.md/#-Item).
222+
Each collected data is transformed to an extension of the `State Class` called [`Item`](./Introduction.md/#-Item).
223223
All Items are directly stored in the Collection.
224224
```ts
225225
{
@@ -240,7 +240,7 @@ If we pass a key that belongs to a not existing Group,
240240
the `collect()` method takes care of creating this Group.
241241
For example, if we assume that the Group with the `groupKey` 'group1' doesn't exist yet.
242242
Then a Group with the initial `itemKeys` '[1]'
243-
and the `groupKey` 'group1' will be created by the Collection.
243+
and the `groupKey` 'group1' is created by the Collection.
244244
```ts
245245
// Groups of Collection
246246
{
@@ -308,16 +308,16 @@ MY_COLLECTION.update(1, {name: "frank"});
308308
MY_COLLECTION.getItem(1); // Returns '{id: 1, name: "frank"}'
309309
```
310310
Therefore, we pass the `primary Key` of the Item, which should be updated as the first parameter.
311-
And specify as the second parameter the data object that will be merged into the found Item data by default.
311+
And specify as the second parameter the data object that is merged into the found Item data by default.
312312

313313
### 🌪 Overwrite Data
314314
In order to overwrite the entire Item data with the passed data object, we set `patch` to `false` in the configuration object.
315315
The configuration object can be passed as a third parameter.
316316
```ts
317317
MY_COLLECTION.update(1, {id: 1, name: 'hans'}, {patch: false});
318318
```
319-
Because the changes are not merged into the Item data, we have to redefine the `primaryKey` in the given data object.
320-
Otherwise, the `primary Key` is missing, which leads to problems.
319+
Because the changes are not merged into the Item data anymore, we have to redefine the `primaryKey` in the given data object.
320+
Otherwise, the `primary Key` gets missing, which can lead to problems.
321321

322322
### ❓ Deepmerge
323323
Unfortunately, the `update()` method doesn't support `deep merges` yet.
@@ -1146,7 +1146,7 @@ We can also add multiple `itemKeys` to multiple Groups at once.
11461146
```ts
11471147
MY_COLLECTION.put(['itemKey1', 'itemKey2', 'itemKey3'], ['groupKey1', 'groupKey2']);
11481148
```
1149-
Now `itemKey1`, `itemKey2`, `itemKey3` will be added to the Groups at `groupKey1` and `groupKey2`.
1149+
Now `itemKey1`, `itemKey2`, `itemKey3` are added to the Groups at `groupKey1` and `groupKey2`.
11501150

11511151
### 📭 Props
11521152

docs/packages/core/features/collection/group/Introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ const MY_GROUP = App.createGroup([1, 2, 3], {
159159

160160
MY_GROUP.exists(); // false
161161
```
162-
Groups are, for example, `placeholder` when AgileTs needs to hold a reference to them,
162+
Groups are `placeholder` when AgileTs needs to hold a reference to them,
163163
even though they aren't instantiated yet.
164-
This may be the case if we use the `getGroupWithReference()` method,
165-
which returns a `placeholder` Group, if the Group doesn't exist, to hold a reference.
164+
This can be the case if we use the `getGroupWithReference()` method,
165+
which returns a `placeholder` Group if the Group we are looking for doesn't exist yet.
166166
```ts
167167
const myGroup = useAgile(MY_COLLECTION.getGroupWithReference("group1")); // Causes rerender if Group got created
168-
const myGroup2 = useAgile(MY_COLLECTION.getGroup("group2")); // Doesn't Causes rerender if Group got created
168+
const myGroup2 = useAgile(MY_COLLECTION.getGroup("group2")); // Doesn't causes rerender if Group got created
169169
```
170170
This reference is essential to rerender the Component,
171171
whenever the Group got instantiated.

docs/packages/core/features/collection/selector/Introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ const MY_SELECTOR = App.creaateSelector(1, {
137137

138138
MY_SELECTOR.exists(); // false
139139
```
140-
Selectors are, for example, `placeholder` when AgileTs needs to hold a reference to them,
140+
Selectors are `placeholder` when AgileTs needs to hold a reference to them,
141141
even though they aren't instantiated yet.
142-
This may be the case if we use the `getSelectorWithReference()` method,
143-
which returns a `placeholder` Selector, if the Selector doesn't exist, to hold a reference.
142+
This can be the case if we use the `getSelectorWithReference()` method,
143+
which returns a `placeholder` Selector if the Selector we are looking for doesn't exist yet.
144144
```ts
145145
const mySeleector = useAgile(MY_COLLECTION.getSelectorWithReference("selector1")); // Causes rerender if Selector got created
146-
const mySeleector2 = useAgile(MY_COLLECTION.getSelector("selector2")); // Doesn't Causes rerender if Selector got created
146+
const mySeleector2 = useAgile(MY_COLLECTION.getSelector("selector2")); // Doesn't causes rerender if Selector got created
147147
```
148148
This reference is essential to rerender the Component,
149149
whenever the Selector got instantiated.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agile-docs",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -21,11 +21,11 @@
2121
"@agile-ts/core": "^0.0.14",
2222
"@agile-ts/event": "^0.0.4",
2323
"@agile-ts/react": "^0.0.15",
24-
"@docusaurus/core": "^2.0.0-alpha.73",
25-
"@docusaurus/module-type-aliases": "^2.0.0-alpha.73",
26-
"@docusaurus/preset-classic": "^2.0.0-alpha.73",
27-
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0-alpha.73",
28-
"@docusaurus/theme-live-codeblock": "^2.0.0-alpha.73",
24+
"@docusaurus/core": "^2.0.0-alpha.74",
25+
"@docusaurus/module-type-aliases": "^2.0.0-alpha.74",
26+
"@docusaurus/preset-classic": "^2.0.0-alpha.74",
27+
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0-alpha.74",
28+
"@docusaurus/theme-live-codeblock": "^2.0.0-alpha.74",
2929
"@mdx-js/react": "^1.6.21",
3030
"@tsconfig/docusaurus": "^1.0.2",
3131
"clsx": "^1.1.1",

src/css/custom.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,6 @@ body {
354354
}
355355
}
356356

357-
// ==============================================================================
358-
// Navbar
359-
// ==============================================================================
360-
361-
.navbar__link::after {
362-
transform: translate(0) !important; // Fixes the not centered drop down icon
363-
}
364-
365-
.navbar__item:not(:last-child) {
366-
margin-right: 10px;
367-
}
368-
369357
/* https://codyhouse.co/blog/post/dark-light-switch-css-javascript */
370358
[data-theme='dark'] {
371359
// ==============================================================================

0 commit comments

Comments
 (0)