Skip to content

Commit fe1f9cf

Browse files
committed
Improve language in documentation
1 parent 107c2cf commit fe1f9cf

File tree

11 files changed

+49
-49
lines changed

11 files changed

+49
-49
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
[![Build Status](https://travis-ci.org/trikoder/trim.svg?branch=master)](https://travis-ci.org/trikoder/trim)
33
[![NPM Status](https://img.shields.io/npm/v/@trikoder/trim.svg)](https://www.npmjs.com/package/@trikoder/trim)
44

5-
Responsive user interface framework for building content management systems with simple authoring api.
6-
Designed to run as a browser application connected to json:api powered backend.
5+
Responsive user interface framework for building content management systems with simple authoring API.
6+
Designed to run as a browser application connected to JSON:API powered backend.
77

88
## Documentation and demo
99
[Browse documentation and demo pages](https://trikoder.github.io/trim).

documentation/.vitepress/components/HomeCustom.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
<div class="featuresAccented">
1818
<ul>
1919
<li>
20-
<h3 class="title">Headless and powered by JSON API standard</h3>
20+
<h3 class="title">Headless and powered by JSON:API standard</h3>
2121
<p class="text">
2222
Client applications built with Trikoder Trim are decoupled from
2323
server side technology stack. Develop with any
24-
backend that can process json api datasets
25-
compliant with json:api specification.
24+
backend that can process JSON datasets
25+
compliant with JSON:API specification.
2626
</p>
2727
</li>
2828
<li>
@@ -45,7 +45,7 @@
4545
</div>
4646
<h3 class="quote">
4747
Elevate developer and user experience by decoupling frontend
48-
and agreeing on standardized api.
48+
and agreeing on standardized API.
4949
</h3>
5050
<div class="features">
5151
<ul>
@@ -64,15 +64,15 @@
6464
Define how resource is browsed, filtered and sorted in list,
6565
what form fields are rendered when resource is created or updated.
6666
All this is done inside one javascript file via domain specific
67-
language or api that anyone can easily read and write.
67+
language or API that anyone can easily read and write.
6868
</p>
6969
</li>
7070
<li>
7171
<h3 class="title">Design with built-in performance</h3>
7272
<p class="text">
7373
Vue.js is doing its magic underneath all Trim controllers and components.
7474
To ensure maximum performance and scalability every controller and its resources
75-
are loaded on demand by utilizing webback's code splitting features.
75+
are loaded on demand by utilizing your bundler’s code splitting features.
7676
No css framework is used and css is component scoped.
7777
Browser only downloads css and js related to currently viewed page.
7878
</p>

documentation/.vitepress/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const baseAbsoluteUrl = process.env.CI ? 'https://trikoder.github.io' : 'http://
33
export default {
44
outDir: '../docs',
55
title: 'Trikoder Trim',
6-
description: 'Responsive UI framework for building content management systems with simple authoring api. Designed to run as a browser application connected to json:api powered backend.',
6+
description: 'Responsive UI framework for building content management systems with simple authoring API. Designed to run as a browser application connected to JSON:API powered backend.',
77
base: '/trim/',
88
head: [
99
['link', {rel: 'shortcut icon', href: `/favicon.ico`}],
@@ -14,7 +14,7 @@ export default {
1414
nav: [
1515
{ text: 'Documentation', link: '/about' },
1616
{ text: 'Demo', link: baseAbsoluteUrl + '/trim/demo/index.html' },
17-
{ text: 'Github', link: 'https://github.com/trikoder/trim' }
17+
{ text: 'GitHub', link: 'https://github.com/trikoder/trim' }
1818
],
1919
sidebar: [
2020
{text: 'Home', link: '/'},

documentation/about.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Trikoder Trim is user interface framework for building headless content manageme
33
Craft responsive single page applications that work on all devices.
44

55
Content management systems built on top of Trikoder Trim are decoupled from server side technology stack.
6-
UI framework works nicely with any server side technology that can process and render json api dataset compliant with [json:api specification](http://jsonapi.org/).
6+
UI framework works nicely with any server side technology that can process and render JSON dataset compliant with [JSON:API specification](http://jsonapi.org/).
77

8-
Trim enables you to quickly build administration CRUD (create, read, update, delete) interface for your application resources. Resulting CMS is responsive and fast - all styles and behavior for standard use cases come included - programmers job is only to define how each application resource is listed and edited.
8+
Trim enables you to quickly build administration CRUD (create, read, update, delete) interface for your application resources. Resulting CMS is responsive and fast - all styles and behavior for standard use cases come included - developers job is only to define how each application resource is listed and edited.
99

10-
Sensible dependency on standardized backend api enables us to create CMS domain specific language or api in javascript that is pretty much decoupled from JS libraries and frameworks that are used underneath. Any capable programmer should be able to define complete interface for resource in need of administration.
10+
Sensible dependency on standardized backend API enables us to create CMS domain specific language or API in JS that is pretty much decoupled from JS libraries and frameworks that are used underneath. Any capable developer should be able to define complete interface for resource in need of administration.
1111

1212

1313
## Technology and tooling
@@ -19,7 +19,7 @@ Trikoder Trim is built on following open source stack:
1919
* [Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/) is used for module bundling and code splitting
2020

2121
## Code sneek peek
22-
Lets assume your application has a simple "tag" resource and backend api for this resource is ready.
22+
Let’s assume your application has a simple `tag` resource and backend API for this resource is ready.
2323
You want to show list of tags that can be filtered by title.
2424
Additionally you want to setup create and edit interface with input for setting tag title.
2525
Your code should end up looking something like this:
@@ -66,6 +66,6 @@ export default {
6666
```
6767

6868
## Demo application
69-
Visit [demo application](https://trikoder.github.io/trim/demo/index.html) to get a feeling how CMS built with Trikoder CMF looks and behaves. Is is completely safe to browse, edit and delete items - backend api on demo pages is running on client json api server that stores data in browser memory - so no harm can be done. Dataset can be reset by clicking "reset demo data" control in lower left corner of administration UI. Examine how everything is composed in [demo codebase](https://github.com/trikoder/trim/tree/master/demo).
69+
Visit [demo application](https://trikoder.github.io/trim/demo/index.html) to get a feeling how CMS built with Trikoder CMF looks and behaves. Is is completely safe to browse, edit and delete items - backend API on demo pages is running on client JSON:API server that stores data in browser memory - so no harm can be done. Dataset can be reset by clicking "reset demo data" control in lower left corner of administration UI. Examine how everything is composed in [demo codebase](https://github.com/trikoder/trim/tree/master/demo).
7070

7171
Feel free to browse, cut and paste from demo codebase for your CMS needs and use it as reference.

documentation/adding-resource.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Adding resource
2-
We will examine typical scenario where new resource is ready on backend api and admin user interface has to be created.
2+
We will examine typical scenario where new resource is ready on backend API and admin user interface has to be created.
33
Steps needed to complete UI for this new resource:
4-
- examine resource api
4+
- examine resource API
55
- create resource controller
66
- add resource route
77
- add navigation link
88
- register controller as service
99

1010
For simple resources this can be completed in less then 5 minutes.
1111

12-
## Examine resource api
13-
Make sure that resource backend api is ready to handle get, post, and put requests.
12+
## Examine resource API
13+
Make sure that resource backend API is ready to handle get, post, and put requests.
1414
Check that backend properly outputs relation includes, make sure that filtering and validation rules are respected.
1515
Examine new resource attributes and relations and decide what list and form elements have to be used.
1616

1717
Everything works? Then lets build resource UI controller.
1818

1919
## Create resource controller
20-
Lets say new resource in need of UI is "tag" entity.
20+
Let’s say new resource in need of UI is `tag` entity.
2121
We will need a component to describe how resource is browsed, filtered and sorted in list, what form fields are rendered when resource is created or updated.
2222

2323
For this purpose we will build a tag resource controller in 'src/controllers/tag.js' file:

documentation/base-controllers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
```
2525

2626
Sometimes empty resource is required for meaningful create admin interface.
27-
In this case draft resource is created on api (with id but no attributes and relation data) and edited in UI immediately.
27+
In this case draft resource is created on API (with id but no attributes and relation data) and edited in UI immediately.
2828

2929
```js
3030
export default {
@@ -98,7 +98,7 @@ Used for hierarchal resources that can be presented in nested tree view form.
9898
Categories as resources usually have parent and child categories.
9999
Example [demo controller](https://trikoder.github.io/trim/demo/index.html#category) and [codebase](https://github.com/trikoder/trim/tree/master/demo/controllers/category.js).
100100

101-
Lets examine category api response:
101+
Let’s examine category API response:
102102
```js
103103
{
104104
type: 'category',
@@ -161,7 +161,7 @@ Properties mapChildrenTo, mapLevelTo, mapIsLeafTo can be defined as strings or f
161161
Used for browse, create (upload) and edit media resources sush as images or files.
162162
Example [demo controller](https://trikoder.github.io/trim/demo/index.html#media) and [codebase](https://github.com/trikoder/trim/tree/master/demo/controllers/media.js).
163163

164-
Lets examine typical media api response:
164+
Let’s examine typical media API response:
165165
```js
166166
{
167167
type: 'media',

documentation/core-concepts-and-api.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Core concepts and api
1+
# Core concepts and API
22
Understanding of how core components work is essential for building applications with Trikoder Trim.
33
This chapter provides insight into resource controller, resource list, resource edit, router, navigation, service container and application object.
44

@@ -8,7 +8,7 @@ Here we define how resource is browsed, filtered and sorted in list, what form f
88

99
In most use cases controller looks like a simple configuration file.
1010
This configuration based architecture delegates most of the work to components that are composed out of our sight.
11-
Resource controller is a container component which calls service components for listing and editing resources who build their own component subtrees - all that is abstracted from user via simple and easy to use api.
11+
Resource controller is a container component which calls service components for listing and editing resources who build their own component subtrees - all that is abstracted from user via simple and easy to use API.
1212

1313
All resource controllers share same basic skeleton. We define what resource type controller is handling (resourceName) and implement methods for resource listing (setupList) and resource editing (setupEdit):
1414

@@ -67,7 +67,7 @@ createRelatedStrategy: 'relatedFirst'
6767
````
6868

6969
### includedRelationships
70-
Specify relationships to include in api payload for resource listing (index) and editing (edit)
70+
Specify relationships to include in API payload for resource listing (index) and editing (edit)
7171
Previously named "includeApiData" in versions up to v0.77, now deprecated.
7272
```js
7373
includedRelationships: {
@@ -77,7 +77,7 @@ includedRelationships: {
7777
````
7878
7979
### includedFields (sparse fieldsets)
80-
Specify fields to include in api payload for resource listing (index) and editing (edit)
80+
Specify fields to include in API payload for resource listing (index) and editing (edit)
8181
```js
8282
includedFields: {
8383
index: {
@@ -240,7 +240,7 @@ list.addSort([
240240
```
241241

242242
### filterAlwaysBy
243-
Method for setting persistent api filters.
243+
Method for setting persistent API filters.
244244

245245
```js
246246
list.filterAlwaysBy('deleted', 'no');
@@ -249,7 +249,7 @@ list.filterAlwaysBy({deleted: 'no'});
249249
```
250250

251251
### filterInitiallyBy
252-
Method for setting initial api and UI filters.
252+
Method for setting initial API and UI filters.
253253

254254
```js
255255
list.filterInitiallyBy('published', 'yes');
@@ -389,7 +389,7 @@ Application utilizes simple service container to register and locate components
389389
All form and list components are registered and retrieved from service container by default.
390390

391391
Your resource controllers should also be registered as services.
392-
We encourage you to do so with dynamic import to utilize webpack code splitting and load controller code only when it is requested.
392+
We encourage you to do so with dynamic import to utilize your bundler’s code splitting and load controller code only when it is requested.
393393

394394
A typical service container with navigation and few registered controllers looks something like this:
395395

@@ -609,7 +609,7 @@ app.getLocale() // en by default;
609609
```
610610

611611
### beforeAdminEnter
612-
Used to set Promise function before creating admin instance.
612+
Used to set `Promise` function before creating admin instance.
613613
```js
614614
app.beforeAdminEnter(() => { return Promise.resolve(); });
615615
```
@@ -619,33 +619,33 @@ Once called application will setup router, services and main view components.
619619

620620
## Configuration
621621
Trim based application is configured by setting boot (or config) data in your main entry point.
622-
Anything can be inserted in boot data storage, only "baseUrl" and "baseApiUrl" are mandatory.
622+
Anything can be inserted in boot data storage, only `baseUrl` and `baseApiUrl` are mandatory.
623623

624624
```js
625625
app.setBootData({
626626
baseUrl: process.env.BASE_URL,
627627
baseApiUrl: process.env.BASE_API_URL
628628
})
629629
````
630-
### Use browser history api
631-
Configure Trim application to use browser history api.
630+
### Use browser history API
631+
Configure Trim application to use browser history API.
632632
```js
633633
app.setBootData({
634634
usesPushState: true
635635
})
636636
````
637637
638638
### Using patch for resource updates
639-
Api adapter can be instructed to use 'PATCH' insted of 'PUT' method when updating JSON api resources.
639+
API adapter can be instructed to use `PATCH` insted of `PUT` method when updating JSON:API resources.
640640
```js
641641
app.setBootData({
642642
usePatchForUpdate: true
643643
})
644644
````
645645

646-
### Configuring resource url slugs
647-
JSON api resource url slugs can be customized via 'resourceToApiMap' config property.
648-
Used this when JSON api resource type is not directly mapped to resource api url.
646+
### Configuring resource URL slugs
647+
JSON:API resource URL slugs can be customized via `resourceToApiMap` config property.
648+
Used this when JSON:API resource type is not directly mapped to resource API URL.
649649
```js
650650
app.setBootData({
651651
resourceToApiMap: {
@@ -655,9 +655,9 @@ app.setBootData({
655655
})
656656
````
657657
658-
### Api pagination strategies
658+
### API pagination strategies
659659
Trim comes with offset (default) and page based pagination strategies included.
660-
Customize offset based strategy (creates api query like ?page[offset]=0&page[limit]=15):
660+
Customize offset based strategy (creates API query like `?page[offset]=0&page[limit]=15`):
661661
```js
662662
app.setBootData({
663663
apiPagination: {
@@ -667,7 +667,7 @@ app.setBootData({
667667
}
668668
})
669669
````
670-
Set and customize page based strategy (creates api query like ?page[number]=1&page[size]=15):
670+
Set and customize page based strategy (creates API query like `?page[number]=1&page[size]=15`):
671671
```js
672672
app.setBootData({
673673
apiPagination: {
@@ -691,7 +691,7 @@ app.setBootData({
691691
app.setBootData({
692692
toggleColumnsVisibility: true, // activate toggle list table columns visibility feature, default is FALSE
693693
itemsPerPage: 15, // default number of items per page
694-
googleMapsApiKey: '123123', // api key for google maps
694+
googleMapsApiKey: '123123', // API key for google maps
695695
ckEditorPath: 'https://cdn.ckeditor.com/4.10.0/standard-all/' // ckeditor CDN
696696
})
697697
````
@@ -706,7 +706,7 @@ bootData('baseUrl'); // outputs boot data baseUrl value
706706
## Authentication
707707
To authenticating users to your app you have to implement simple authentication driver.
708708
Default view for authenticating with username and password is included in Trim.
709-
Examine [base auth api](https://github.com/trikoder/trim/tree/master/src/js/library/auth.js) for full implementation details.
709+
Examine [base auth API](https://github.com/trikoder/trim/tree/master/src/js/library/auth.js) for full implementation details.
710710
Simple driver implementation is shown bellow:
711711

712712
```js

documentation/form-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ edit.addField('HtmlComponentsFormElement', {
166166
});
167167
```
168168

169-
Expects api attribute structure similar to one defined bellow:
169+
Expects API attribute structure similar to one defined bellow:
170170

171171
```js
172172
[{

documentation/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting started
2-
Before digging into UI code make sure you have a basic understanding of core json api concepts (how relations, attributes, getting, creating and updating resources work). A functional backend api compliant with json api standard is prerequisite for building UI.
3-
Browse [json:api webpage](http://jsonapi.org/) and [examples](http://jsonapi.org/examples/) to familiarize yourself with standard.
2+
Before digging into UI code make sure you have a basic understanding of core JSON:API concepts (how relations, attributes, getting, creating and updating resources work). A functional backend API compliant with JSON:API standard is prerequisite for building UI.
3+
Browse [JSON:API webpage](http://jsonapi.org/) and [examples](http://jsonapi.org/examples/) to familiarize yourself with standard.
44

55
Everything explained in this chapter has concrete implementation details in demo application codebase.
66
Feel free to [browse demo codebase](https://github.com/trikoder/trim/tree/master/demo) and take what you need.

documentation/list-elements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All list elements are Vue components found in [listElement folder](https://githu
1010
All list elements accept following set of options:
1111

1212
* **caption**: used to define cell heading content.
13-
* **mapTo**: used for mapping list item content to resource attribute or relationship data. Can be string of function. When defined as string it will fetch model value under that key. Learn how to use [JSON api resource](https://dbrekalo.github.io/json-api-resource/) api to query and transform data.
13+
* **mapTo**: used for mapping list item content to resource attribute or relationship data. Can be string of function. When defined as string it will fetch model value under that key. Learn how to use [JSON:API resource](https://dbrekalo.github.io/json-api-resource/) to query and transform data.
1414
* **attributes**: List of DOM element attributes.
1515

1616
---
@@ -227,7 +227,7 @@ list.addItem('ContextMenu', {
227227

228228
## Media
229229
List element used for presenting media items (image, video, audio, file).
230-
Best used with "card" resource list template.
230+
Best used with card resource list template.
231231
[Code reference](https://github.com/trikoder/trim/tree/master/src/js/listElements/media.vue).
232232

233233
```js

0 commit comments

Comments
 (0)