UserScape / Laravel-Bundles

An application for posting and finding Laravel Bundles
44 stars 13 forks source link

API should return "uri" in name slot #30

Closed taylorotwell closed 12 years ago

taylorotwell commented 12 years ago

In the "name" slot of the JSON object returned by the API, we should use the "URI" database field instead of the display name / title.

Example: http://bundles.laravel.com/bundle/query-viewer

This bundle should return "query-viewer" in the name slot from the API. Currently returns "Query Viewer".

ericlbarnes commented 12 years ago

Are you sure this shouldn't be bundle->location? The uri was really just for the app itself and the location was designed to be the path in the bundles folder.

To give an example I have this bundle - http://bundles.laravel.com/bundle/laravel-logviewer

The uri is laravel-logviewer generated from the title but the actual location should be bundles/logviewer

taylorotwell commented 12 years ago

The name slot should be whatever they are going to make the "key" of the array in the bundles.php file, like:

'log-viewer' => array('auto' => true)

Make sense? I guess it should basically be whatever key you used to install it with Artisan, so if you use "install favebook-sdk" the name slot in the API should be "facebook-sdk". Really the more I think about it really the title should just always be in slug form to avoid confusion.

On Feb 25, 2012, at 7:35 PM, Eric Barnesreply@reply.github.com wrote:

Are you sure this shouldn't be bundle->location? The uri was really just for the app itself and the location was designed to be the path in the bundles folder.

To give an example I have this bundle - http://bundles.laravel.com/bundle/laravel-logviewer

The uri is laravel-logviewer generated from the title but the actual location should be bundles/logviewer


Reply to this email directly or view it on GitHub: https://github.com/UserScape/Laravel-Bundles/issues/30#issuecomment-4177930

ericlbarnes commented 12 years ago

Here are my original thoughts for the bundle's app setup. I was thinking the bundle title, uri, summary, and description was just for the app itself. That way users could have any title they wanted. Also I tend to name my repos differently than the way I want artisan to install them. The main reason I do this is for when people are browsing my github page they can easily see what they are looking for. "CodeIgniter Code", "Laravel Code", etc..

That also leads into why I thought the title would not really be associated. Since the title is more for browsing the bundles website and for easily spotting what you want to install.

To break down the fields I thought would be used in the api for one of my bundles:

location -> ericbarnes/Laravel-Log-Viewer provider -> github path -> logviewer bundles.php -> 'logviewer' => array('auto' => true)

I am fine changing all this around but I just want to ensure we are on the same page with everything. Also I want to change the add/edit form so that users adding bundles understand as well.

taylorotwell commented 12 years ago

So what exactly do you consider the thing that you use to install the bundle? I guess I think of that as the title, and think that slug should be the bundle's title on the page. We've had some confusion as to what exactly goes in the bundle config array. I think we need to unify the display name, the artisan slug, and what you put in the bundle array. I would suggest just converting all existing titles to slugs and using the alpha_dash validation rule on title for future bundles. I think that will alleviate confusion, and of course your title / slug can still be different from your repo name. Make sense? :) on my phone so pardon any typos.

On Feb 25, 2012, at 8:11 PM, Eric Barnesreply@reply.github.com wrote:

Here are my original thoughts for the bundle's app setup. I was thinking the bundle title, uri, summary, and description was just for the app itself. That way users could have any title they wanted. Also I tend to name my repos differently than the way I want artisan to install them. The main reason I do this is for when people are browsing my github page they can easily see what they are looking for. "CodeIgniter Code", "Laravel Code", etc..

That also leads into why I thought the title would not really be associated. Since the title is more for browsing the bundles website and for easily spotting what you want to install.

To break down the fields I thought would be used in the api for one of my bundles:

location -> ericbarnes/Laravel-Log-Viewer provider -> github path -> logviewer bundles.php -> 'logviewer' => array('auto' => true)

I am fine changing all this around but I just want to ensure we are on the same page with everything. Also I want to change the add/edit form so that users adding bundles understand as well.


Reply to this email directly or view it on GitHub: https://github.com/UserScape/Laravel-Bundles/issues/30#issuecomment-4178104

taylorotwell commented 12 years ago

I'll be online a little later and we can talk it over if you want :)

On Feb 25, 2012, at 8:11 PM, Eric Barnesreply@reply.github.com wrote:

Here are my original thoughts for the bundle's app setup. I was thinking the bundle title, uri, summary, and description was just for the app itself. That way users could have any title they wanted. Also I tend to name my repos differently than the way I want artisan to install them. The main reason I do this is for when people are browsing my github page they can easily see what they are looking for. "CodeIgniter Code", "Laravel Code", etc..

That also leads into why I thought the title would not really be associated. Since the title is more for browsing the bundles website and for easily spotting what you want to install.

To break down the fields I thought would be used in the api for one of my bundles:

location -> ericbarnes/Laravel-Log-Viewer provider -> github path -> logviewer bundles.php -> 'logviewer' => array('auto' => true)

I am fine changing all this around but I just want to ensure we are on the same page with everything. Also I want to change the add/edit form so that users adding bundles understand as well.


Reply to this email directly or view it on GitHub: https://github.com/UserScape/Laravel-Bundles/issues/30#issuecomment-4178104

ericlbarnes commented 12 years ago

Here is the final decision:

The auto generated uri field is going to be changed to user editable (with unique validation) and in the add/edit form will be named "Name" and will be the first after selecting your repo. Title will be second.

For help text it will display:

Under "Name:": "The keyword used to install and register your bundle." Under "Listing Title": "The title displayed in the bundle list."

That means name will be php artisan bundle:install name and title will only be used for the bundle app.