-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add categories on json list #149
base: main
Are you sure you want to change the base?
Add categories on json list #149
Conversation
Hi @mattstauffer now PR is updated. This PR needs #157 . |
🥺 |
@danielebarbaro Whoops, sorry!
|
hi @mpociot , what you think about this implementation?
oookkeeeei 🧐 🤓
I prefer grouping to "select" only one group a time 💪🏻 |
@danielebarbaro OK, I'm going to say definitely throw them into the main body of each entry, and give a flat response of entries. @josecanhelp had a great idea as well: To add the category under a Thanks! |
Cool, if you need any help i can support you . |
@danielebarbaro If you're up to code the change, I'd love it! If you don't have time, please let me know. |
i'm always on the cutting edge 🏄🏼♂️. i will rewrite the PR with the new changes |
Hi @mattstauffer , PR updated but i have some doubts to discuss.
My opinion is to have same output (add category column on list) and with #173 filter base alias, full alias and category fields
My opinion is to have same output :) convert category to lowercase and use ucfirst() on menu (
My opinion is: container name isn't clean to parse, base alias is "more confident" to use |
🙋🏻♂️ |
|
app/Services/Category.php
Outdated
@@ -10,4 +12,30 @@ abstract class Category | |||
const SEARCH = 'Search'; | |||
const STORAGE = 'Storage'; | |||
const TOOLS = 'Tools'; | |||
|
|||
public static function all(): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would more be a method on the Service class named allByCategory
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all()
now returns:
$result = [
'beanstalkd' => "Cache",
'clickhouse' => "Database",
'dynamodb' => "Cache",
'elasticsearch' => "Search",
'eventstoredb' => "Database",
'expose' => "Tools",
'influxdb' => "Database",
'mailhog' => "Mail",
'mariadb' => "Database",
'meilisearch' => "Search",
'memcached' => "Cache",
'minio' => "Storage",
'mongo' => "Database",
'mssql' => "Database",
'mysql' => "Database",
'neo4j' => "Database",
'postgis' => "Database",
'postgresql' => "Database",
'redis' => "Cache",
'sftp' => "Storage",
'sqs' => "Cache"
];
so the right name (for me) is mapByService()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but I still think this is more of a list of services than a list of categories, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops sorry 🙈 I misunderstood!
Apologies, you're right, it is a method for Service class.
@danielebarbaro Thanks for all your hard work on this! |
@danielebarbaro OK, I'm finally getting back into my open source tasks. Taking a look now! |
@@ -2,6 +2,8 @@ | |||
|
|||
namespace App\Services; | |||
|
|||
use App\Services; | |||
|
|||
abstract class Category |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this has been sitting open for ages so I'm sorry to make one more request, but could you write tests for these two new methods?
Thanks so much!
Hi @mattstauffer , first implementation of #143 could be like this:
The json is:
I decided to group container by category as i've done in the principal menu #88 (PR #135) but we can discuss about it.
I think that isn't useful category column in list output.