forus-labs / forui

Forus Lab's Flutter UI library
https://forui.dev
Other
325 stars 14 forks source link

Minor bug with `dart pub unpack` #147

Open JCKodel opened 1 month ago

JCKodel commented 1 month ago

Describe the bug dart pub unpack is the newest addition do dart pub that allows us to fetch a package by its name.

It is meant for us to test packages that has an example folder (this is the scenario given in the what's new post for this feature).

But, this isn't working for forui:

To Reproduce

  1. Use dart pub unpack forui
  2. cd forui-0.4.0
  3. cd example
  4. flutter pub get or dart pub get

The result is:

Resolving dependencies...
Because forui_example depends on forui_assets from path which doesn't exist (could not find package forui_assets at "..\..\forui_assets"), version solving failed.

Expected behavior To work

Device (please complete the following information):

Additional context Using git clone works (it seems git has more contents than the published package, but, since dart pub unpack exists, it would be nice for the example folders to not use something that is not available in this context)

Pante commented 1 month ago

Thanks for bringing this to our attention, it's definitely something we should fix.

Out of curiosity, what do you usually do with the unpacked example/expect from the example? Do you usually use it as a playground to toy with Forui? Or would you prefer something similar to the samples project, which contains several demo pages?

JCKodel commented 1 month ago

Thanks for bringing this to our attention, it's definitely something we should fix.

... Or would you prefer something similar to the samples project, which contains several demo pages?

For a UI kit, an app showing all components, especially with no dependencies, such as routers, etc. is good.

The example provided doesn't work (meaning: the bottom navigation does nothing and the layout is broken (the centre text), as shown in this screenshot):

image

For me, the ideal would be a showcase of real uses. I had some trouble adapting a layout made with Material to ForUI (especially the tab component). And the misuse (or lack) of child property is a real deal break (it breaks VS Code ability to remove and move widgets, as well as linter rules that say child should be the last property of a widget (for good reason)).

Pante commented 1 month ago

The example provided doesn't work (meaning: the bottom navigation does nothing and the layout is broken (the centre text), as shown in this screenshot):

I'm assuming you're running the example on main, the weird text/bar in the middle's my bad. I was experimenting with stuff and accidentally committed it.

For me, the ideal would be a showcase of real uses. I had some trouble adapting a layout made with Material to ForUI (especially the tab component).

Are there any specific issues that make the tab widget especially difficult to adapt from Material (besides the child property)? We document it alongside a code example at https://forui.dev/docs/tabs, but perhaps we're missing something.

And the misuse (or lack) of child property is a real deal break (it breaks VS Code ability to remove and move widgets, as well as linter rules that say child should be the last property of a widget (for good reason)).

Are there any widgets where this is particularly bad? We generally try to name children widgets child/children but in certain cases we have to prioritize the clarity/more specific names.