Question about API Documentation for Yii 2.0

Guys, tell me, please, do you have plans to improve API documentation? Now documentation is totally useless from my point of view. Google searches much better than your own documentation search. Here keywords that does not return any results: “dropDownList”, “where”, “submitButton”, “updateAll”, “batchInsert” etc. End even if I search deeper it returns strange not related results. For example"dropDownList" search returns “yii\widgets\ListView” instead of ActiveField, “batchInsert” returns " yii\db\BatchQueryResult" instead of Command. It’s not working at all. And even if I somehow find documentation about activeListBox it looks like this:


It jumps out of my screen and I can not read anything. What is wrong with this documentation? :confounded:

Previous documentation was much better and useful than this. So, why you stay with this version?

These are two separate issues. One about search, another about styling. Please report them to https://github.com/yiisoft-contrib/yiiframework.com/issues

btw., you can help fixing the website yourself if you have some time. It’s OpenSource.

There is already an issue about these:

1 Like

Wow! Issue since April and nothing changed. Now I see why Yii have questions like “Is Yii dead?”. Maybe it’s not, but sure looks like dead or at least zombie.

You still did not answer my question. Why Yii team switched to this documentation version if it’s not working and no one have time to fix it? Issues about overflow bugs since April. That tells a lot, how long no one can really use documentation. And previous version was working and quite good.

The new docs are working, there are just a few bugs with it. We have a lot of stuff to do so priority was on fixing the forum for me. If you want to help fix the documentation, I invite you to take a look at the code. Yii lives from the community contributions, if you see something you want to have fixed or changed, you can help us getting it fixed with not much effort.

Searching for methods works on the new website, you just have to prefix the search term with . or ::, e.g. .save(). You can still use the old docs if you want:

Download: https://www.yiiframework.com/doc/download/yii-docs-2.0-en.tar.gz
or online: http://stuff.cebe.cc/yii2docs/

but the search there also does not give you method names, so I don’t really see how they are better.

1 Like

You should be glad that there are issues created in the first place :wink:

I am amazed, and very thankful! that the small Yii team not only manages to keep Yii 2 afloat, but also drives it forward.
It is incredible that the team also has managed to write a new website from scratch! :slightly_smiling_face:
There are so many small cogs that needs to fit with each other, you have no idea: front page, news section, wiki, user management, comment functionality, responsive design, …
And, yes: a small part of that is the Yii guide and the API docs. It works, but - as you noticed - still have some outstanding issues.

The new site is the result of many, many heroic deeds over a long period of time.
So, I think, lots of kudos should be sent to the Yii team! :yii::heart:

Edit:
If you wonder whether or not Yii is dead, just check out the commit activity here:

3 Likes

Here are the results I get when I search for find:

image

I’d say 99% of the time when people are searching for find they are looking for ActiveRecord::find() method.

1 Like

but the search there also does not give you method names, so I don’t really see how they are better.

You really don’t?
Here are results when I search “.where”:

Click “Enter” and results are:
yii\db\conditions\BetweenColumnsCondition
yii\data\ActiveDataFilter
yii\data\Pagination
yii\base\Component
yii\data\Sort
yii\data\SqlDataProvider

and somewhere in middle finally I can see QueryInterface and something related to Query. And you say, there is no differences, and it is working??? And same happens, when I search “::where”. And one interesting thing. Search results do not contain class “yii\db\Query”.

Now do the same with old documentation, and QueryInterface will be first result.

not sure what’s wrong in your case, but searching for where() gives me this:

@GSTAR1 I agree that this could be improved somehow, but if you are looking for exact match, you can try find().

I have added HTTP caching to the API that returns the method and class information for the search. Maybe that makes the search work better on slow connections. But it does not work as expected in firefox. Works for me in Chrome though. Which browser are you using @DMGPage?

1 Like

I have fixed another issue where on slow connections the API docs result will show results for the first typed character (which is most likely empty) instead of the final search query.

@DMGPage I hope this solves the issues you are seeing with the search. please try again!

2 Likes

I use Firefox. And yes, now it is working much better. Thank you.