orchidsoftware / orchidsoftware/platform

Make relation documentation clearer

Open
#2,650 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4.8k
Forks
662
Avg merge
1d 9h
Merged PRs (30d)
7

Description

I've struggled a little getting started with this framework, especially when it comes to documentation of the relation fields.

In [https://orchid.software/en/docs/field/#relation](the docs), relations are mentioned as standalone, like this.

Relation::make('idea')
    ->fromModel(Idea::class, 'name')
    ->title('Choose your idea');

For me, this will leave an empty relation field that fails silently.
I've since learned that in my projects, I have to do something like this:

Relation::make('user.idea')
    ->fromModel(Idea::class, 'name')
    ->title('Choose your idea');

Since the relation appears on a page belonging to another model.
I don't mind adding a PR with a suggestion for how to reflect this in the docs but wanted to gather feedback beforehand, as I don't have a lot of experience contributing to public repos.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the relation-field documentation linked in the issue and compare the standalone example with the nested user.idea example. Clarify the reported distinction in the documentation, with the work complete when users can understand why the standalone example produces an empty relation field in this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.