Skip to content

Adjust docs#86

Merged
ChristophWurst merged 7 commits intomasterfrom
adjust-docs
Dec 13, 2016
Merged

Adjust docs#86
ChristophWurst merged 7 commits intomasterfrom
adjust-docs

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Dec 12, 2016

  • IProvider
  • ISetting
  • IFilter
  • Endpoint docs
  • Adjust README

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just some typos and nitpicks :-)

docs/create.md Outdated
To create and publish an event to the activity app, a new `IEvent` should be fetched from the activity manager and afterwards be passed to the `publish()` method:

```php
$event = \OC::$server->getActivityManager()->createEvent();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also mention that IManager can be injected into classes, which is obviously preferred over querying the server directly. Expect people to copy sample code from the docs :-)

docs/create.md Outdated
\OC::$server->getActivityManager()->publish($event);
```

Tthe following values **must** be set, before publishing an event:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. "Tthe" ;-)
  2. remove the comma

* `setType()`
* `setAffectedUser()`
* `setAuthor()`
* `setTimestamp()`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't set a timestamp in twofactor_totp and it still worked 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/provider.md Outdated

### Check responsibility

The first thing the provider should do, is to check whether the `IEvent` is on it cares about. A simple check for the app and maybe additionally the type, if the app has more then one provider, should be enough:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on -> one

docs/provider.md Outdated

### Long translations with "rich object" string

In the long version for the normal activity stream contains the filename. Objects like users , files and more can be highlighted in the "rich subject", which allows the app to show an avatar next to the name, link the file name to the file list, and many more things.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space before comma

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comma before "and" at the end of the last sentence

docs/provider.md Outdated
The `IEvent::setRichSubject()` method has two arguments:

1. The already translated string with placeholders
2. The list of placeholders, in the case of the favorite provider it's the file that was favorites
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"was marked as favorit"?

* Both events need to have the same subject `getSubject()`
* Both events need to have the same object type `getObjectType()`
* The time difference between both events must not be bigger then 3 hours
* Only up to 5 events can be merged.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have a limit of 5 events? Imagine I upload a series of photos, say a batch of 500. I don't want to see 100 activities.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the API queries 30 entries at once, so that is the highest limit. But then again, when you dont see thumbnails and file names but just a "and 100 more" it's of no use either. We can discuss this further in the future, but for now that is the limitation.

docs/setting.md Outdated

## Name

The name **must** already be translated and should bea short and descriptive sentence. One or two important words can also be highlighted using the `<strong>` HTML tag, to allow easier recognition of the setting.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"bea" -> "be a"

docs/setting.md Outdated

## Is default enabled stream / mail

The two "is default enabled x" booleans specify whether the setting is enabled or disabled by default for the stream or mail. Once a user changed their setting, the default is not used for them anymore. Changing the default is therefor not "retro active".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

therefore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristophWurst ChristophWurst removed their assignment Dec 12, 2016
Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ChristophWurst ChristophWurst merged commit 58094a8 into master Dec 13, 2016
@ChristophWurst ChristophWurst deleted the adjust-docs branch December 13, 2016 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants