Closed cjbrooks12 closed 1 year ago
I understand your idea but at the moment I'm not sure that I want to group dependencies. I would like to keep wizard logic as simple as possible.
One solution that I propose for the Icons Packs is a way to add all Icon packs to Version Catalog but apply only one into the project itself. It will make easier to just switch or add more icon packs because it would be already present in Version Catalog, avoid complexity of multiple selection of icon packs.
In my previous PR I add this flag to the dependencies: applyToModule
that means that it would add the build script of composeApp
module, if false, it would only add to Version Catalog.
@DevSrSouza it does not work well. Why might I have a few different DI libraries or logging? To have a mess in a catalog is a bad idea, IMO
@terrakok You've already started grouping dependencies with the Loggers, Build Config, Icons, and DI, it's just not very clear in the UI. The "edit" icon doesn't really communicate that you're picking a different dependency of the same type, at first glance it looks like there are some options you can configure for that one dependency. So this PR mostly just adds labels to clarify that there are multiple options for logging, etc.
And the specific categories I set up with this PR are not the important part, we can definitely change/rename those categories, or flatten them out so more dependencies are shown at the top-level rather than within the dialogs.
I will think about the better grouping UI/UX later.
@DevSrSouza it does not work well. Why might I have a few different DI libraries or logging? To have a mess in a catalog is a bad idea, IMO
Yes, I agree, is kinda a different idea of the Pull Request, is more towards minimizing the requirement for Groupping dependencies now, that actually a solution for groupping dependency. 2 DI libraries at the version catalog does not make sense, you are right, the idea is more towards dependency that was selected but is modular and has a bunch of modules. For example Compose Icons, Voyager, Slack Circuit (if it get Multiplatform support soon), Accompanist (if it get some libraries multiplatform), etc.
My main idea: to keep the wizard as simple as possible. It shouldn't be over configurable. I see it clean and simple. Just a few clicks to get a new Compose project. It shouldn't contain all possible libraries or something like that. It is not a library catalog. I selected my favorite libraries for a fast start.
This is a WIP, but wanted to open the PR to as a suggested improvement to the UI organization, which will help as more dependencies get added to this generator. I'm hoping that opening this as a draft PR will help fix some of the issues with it before getting merged.
This PR sets up "Dependency Types", such as Logging, Navigation, DI, etc. and categorizes the available dependencies into those categories. Categories can be defined as single-select where you pick only one of the available options (which is how it is currently done with things like DI Koin vs Kodein), and adds the possibility of multi-selection where a single category can allow the inclusion of multiple dependencies in that group. This is new, but is useful for things like Icons, where you might need multiple icon packs.
Also note that this PR is my first time using React or Kotlin/React (I'm used to using Compose for Web stuff), so I have no idea if the code is structured the right way. Also, with the multi-select category, I could not figure out how to keep the dialog open after selecting an item.