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

[Refactor]: Folder structure improvement proposal #345

Closed
mukireus opened this issue Dec 1, 2024 · 7 comments
Closed

[Refactor]: Folder structure improvement proposal #345

mukireus opened this issue Dec 1, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@mukireus
Copy link
Contributor

mukireus commented Dec 1, 2024

What feature would you like to see?

The current folder structure appears disorganized, with example projects and packages nested within each other. It is recommended to refactor the folder structure to provide better clarity and organization.

By restructuring the folder organization, users who only include this package in their projects will avoid downloading unused example files when executing flutter pub get. This change is expected to improve the performance of the command execution by reducing the amount of data that needs to be fetched.

See

Before After
Screenshot Before Screenshot After
@mukireus mukireus added the enhancement New feature or request label Dec 1, 2024
@ulusoyca
Copy link
Collaborator

ulusoyca commented Dec 1, 2024

Thanks for the proposal. We need the example folder separately AFAIK to be able to show this page on pub dev. Otherwise examples folder looks good. I would also like to keep widgetbook inside coffee_maker_navigator_2 since it belongs to that specific project.

Other than than wolt_state_management and wolt_di also only used in coffee_maker_navigator_2. We should include them under it imo.

@mukireus
Copy link
Contributor Author

mukireus commented Dec 1, 2024

Package layout conventions - Examples
According to the explanation on this page, we can generate markdown files to add and redirect example project paths. For instance, the flutrlint project already includes a markdown file under the "Example" tab, which can serve this purpose.

We can re-add the Widgetbook project as you suggested.

I recommend moving the wolt_di and wolt_state_management packages to the packages folder for easier access in future projects. These packages are currently located in the root directory.

Edited: You can also check out the "example" section of the widgetbook package: Widgetbook example section on pub.dev

@mukireus
Copy link
Contributor Author

mukireus commented Dec 1, 2024

Also you can check this PR: [DRAFT] Refactor - Clean folder structure

@ulusoyca
Copy link
Collaborator

ulusoyca commented Dec 6, 2024

@mukireus The draft PR looks good. We can merge this way. @TahaTesser what is your take?

@mukireus we will also need to update the ReadMe.

@TahaTesser
Copy link
Collaborator

Looks good to me. This will make the samples navigation a lot better. I wanted to do this but couldn't get around it.

TahaTesser pushed a commit that referenced this issue Dec 10, 2024
* refactor: move coffee_maker example project from root to examples folder

* refactor: move coffee_maker_navigator_2 example project from root to examples folder

* refactor: move demo_ui_components example project from root to examples folder

* refactor: move playground example project from root to examples folder

* refactor: move playground_navigator2 example project from root to examples folder

* refactor: move widgetbook example project from coffe_maker_navigator2 to examples folder

* chore: update dependency paths in example projects for consistency

* refactor: move wolt_di package from root to packages folder

* refactor: move wolt_state_management package from root to packages folder

* chore: update dependency paths in packages for consistency

* Revert "refactor: move widgetbook example project from coffe_maker_navigator2 to examples folder"

This reverts commit 28ca416.

* chore: update paths on yaml files

* doc: update README file
@mukireus
Copy link
Contributor Author

@ulusoyca Should we also move the wolt_modal_sheet package into the packages directory? I can open a separate PR for this, or we can pair on it together. We can close the issue if needed.

@ulusoyca
Copy link
Collaborator

@mukireus Thanks for the great changes, and the PR! This repo is made for Wolt Modal Sheet, the other packages are planned to be released a packages during next year in separate repos, so let's keep them under the packages folder for now. I am closing this issue. Once more, thanks for the great work.

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

No branches or pull requests

3 participants