Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Revamp the documentation #2649

Merged
merged 8 commits into from
Oct 19, 2015
Merged

Conversation

wouterj
Copy link
Contributor

@wouterj wouterj commented Dec 24, 2014

I don't have to explain the idea behind this PR, I think. SonataAdminBundle is known to be very hard to work with, mostly due to it's "not that great" documentation. There is lots of duplication and it's more written in a "complete reference style" than a nice-to-read book.

That's why I've choosen SonataAdminBundle as my christmas project this year and with this PR, I want to give you the christmas present: A complete new, easy to read, guide for beginners.
In the end, this will replace most of the hard to understand things in the reference guide. I'm also planning to remove the great amount of duplication between the adapter bundles.

To be honest, I failed. I wanted to have it finished before Christmas, but I didn't have enough time. That's why I present you the first 3 chapters here, while working on the other chapters (I think it's going to be around 5 chapters).

I'm welcoming all feedback on this PR.

I wish the complete Sonata team, it's contributors and all other people reviewing this PR a merry christmas and very happy new year! 🎄 🎅 ⛄ 🎆

// ...

/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="blogPosts")
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation

@cryptiklemur
Copy link

Thank you @wouterj !

database. This means the form view just needs 3 fields: title, body and
category.

The title and body fields are simple text and textarea fields, you can add them
Copy link
Contributor

Choose a reason for hiding this comment

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

simple "text" and "textarea" (quotes)

@wouterj
Copy link
Contributor Author

wouterj commented Dec 24, 2014

Thank you, @dantleech and @greg0ire. I've applied most of your suggestions.

---------------------------

If you already know the `Symfony Form component`_, the ``FormMapper`` will look
very similair.
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar

@greg0ire
Copy link
Contributor

Merry Christmas to you too and thanks a lot for the present!


Now you've created the admin class for your category, you probably want to know
how this looks like in the admin interface. Well, let's find out by going to
http://localhost:8000/admin
Copy link
Contributor

Choose a reason for hiding this comment

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

Here can be information, that this tutorial expects a server running on port 8000 (Apache/Nginix/Built-in php).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've put that in the first chapter of the guide:

This tutorial assumes you are using the build-in server using the
php app/console server:start (or server:run) command.

@pulzarraider
Copy link
Contributor

Thank you @wouterj. Merry Christmas to you all!

available in this bundle. The bundle also uses `Bower <http://bower.io/>`_,
so you can use bower to handle your assets. To make sure you get the
dependencies that match the version of SonataAdminBundle you are using, you
can make bower use the local bower dependency file, like this:
Copy link
Member

Choose a reason for hiding this comment

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

Using bower is not required as all assets are bundled inside the bundle

Choose a reason for hiding this comment

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

Really? Then why I get 404 errors and Uncaught ReferenceError: jQuery is not defined ? Even when I am using Bower?

Copy link
Contributor

Choose a reason for hiding this comment

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

@smilesrg Jquery and some other js/css dependencies were moved to SonataCoreBundle. You are probably using dev-master of SonataAdmin, but tagged branch of SonataCoreBundle.


$formMapper
->tab('Post')
->group('Content', ...)
Copy link
Member

Choose a reason for hiding this comment

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

i would say group() is wrong, with() should be correct

@wouterj
Copy link
Contributor Author

wouterj commented Oct 10, 2015

@OskarStark rebased & applied your comments.

@OskarStark
Copy link
Member

please fix travis @wouterj

Warning, treated as error:
/home/travis/build/sonata-project/SonataAdminBundle/Resources/doc/getting_started/installation.rst:29: ERROR: Unknown target name: "sonatadoctrinemongodbadminbundle".

Thank you 👍

@wouterj
Copy link
Contributor Author

wouterj commented Oct 10, 2015

done

@greg0ire
Copy link
Contributor

Warning, treated as error:

/home/travis/build/sonata-project/SonataAdminBundle/Resources/doc/index.rst:17: ERROR: Error in "toctree" directive:

invalid option block.

.. toctree::
    :maxdepth: 1
    :numbered

    getting_started/installation
    getting_started/creating_an_admin
    getting_started/the_form_view
    getting_started/the_list_view

What option is it complaining about ?

@wouterj
Copy link
Contributor Author

wouterj commented Oct 10, 2015

@greg0ire it was complaining about the syntax (missing colon after :numbered).

@greg0ire
Copy link
Contributor

Thanks for fixing that!

@OskarStark
Copy link
Member

@wouterj , please squash your commits into one, after that i can finally push the button 😄

@soullivaneuh
Copy link
Member

@OskarStark please check if this will be mergeable to master.

@OskarStark
Copy link
Member

i checked, it is 👍

OskarStark added a commit that referenced this pull request Oct 19, 2015
Revamp the documentation and added "Getting started" as own chapter
@OskarStark OskarStark merged commit 2c11eb5 into sonata-project:2.3 Oct 19, 2015
@OskarStark
Copy link
Member

Thank you for this awesome work @wouterj

@OskarStark
Copy link
Member

@soullivaneuh would be great if you could merge 2.3 in current master

Thank you

@rande
Copy link
Member

rande commented Oct 19, 2015

Awesome! Thanks for this contribution ;)

@wouterj wouterj deleted the revamp_docs branch October 19, 2015 22:43
@rande
Copy link
Member

rande commented Oct 21, 2015

I think some images need to be resized :)

https://sonata-project.org/bundles/admin/2-3/doc/getting_started/creating_an_admin.html

@soullivaneuh
Copy link
Member

I think some images need to be resized :)

Could not be managed by the website itself? Image resize, click to enlarge...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.