Closed Gerych1984 closed 1 month ago
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ✔️ |
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
develop@76d3a7a
). Learn more about missing BASE report.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please let me know when it's ready for review.
Please let me know when it's ready for review.
Already now, thx
I've kept the old widgets for now, so I can peek around and not forget any functionality
It looks good at first, some observations.
Menu::class
and NavTabs::class
, you couldn't have a single widget for both cases.TabPane::class
what do we mean by this widget.Enum
.Base
.It looks good at first, some observations.
- You can use enums for constants and avoid psalm-suppress, so the user can use them too.
- PSALM needs to be fixed.
- What is the difference between
Menu::class
andNavTabs::class
, you couldn't have a single widget for both cases.TabPane::class
what do we mean by this widget.- You need to add phpdoc to all widgets.
- Move enums to a different directory than widgets, it could be
Enum
.- Move abstract class to a diffirent directory than widgets, it could be
Base
.
TabPane(l)
- An auxiliary widget to indicate that a link/tab has content. TabPane always contains a link associated with it and they customize each other in this case. NavLink can be either a standalone tab link or content (in these cases the link attributes are not set). Yes, the code has improved a lot, some observations.
If you don't have any problems i can fix the static analysis and upload the changes, then send the PR for review and merge it, and continue improving this package.
Yes, the code has improved a lot, some observations.
- Add phpdoc to classes and methods.
If you don't have any problems i can fix the static analysis and upload the changes, then send the PR for review and merge it, and continue improving this package.
Yes. Later i can show you my psalm config error. But i think - it last step. By the way - how do you think about move that or similar widgets/components (where few files) in sub-directory?
I think that widgets in the root directory are fine, because we have a shorter namespace, ideally everything that is not a widget can be moved, anyway let's ask for opinions from @samdark @vjik
If widgets can be used with other widgets, then of course i would rename them, one thing we want to do is replace the array items in all widgets with one widget.
That my pslam error
It would be great if we convert NavItem::widget()
to Item::widget()
, and add support for icons, template to build in link as we wanted, support for container by link, with these changes Item::widget()
would be agnostic, and could be used in all widgets that need a menu.
We could do it in a separate PR and thus eliminate the array methods from all the widgets.
That my pslam error
It looks like you either have a different version of psalm installed globally, or you have an outdated version of psalm that the package uses.
That my pslam error
It looks like you either have a different version of psalm installed globally, or you have an outdated version of psalm that the package uses.
Maybe i have error with PHP 8.3
That my pslam error
It looks like you either have a different version of psalm installed globally, or you have an outdated version of psalm that the package uses.
It would be great if we convert
NavItem::widget()
toItem::widget()
, and add support for icons, template to build in link as we wanted, support for container by link, with these changesItem::widget()
would be agnostic, and could be used in all widgets that need a menu.We could do it in a separate PR and thus eliminate the array methods from all the widgets.
Maybe rename NavItem
-> Item
, NavLink
-> Link
. It strongly looks like this could be used in conjunction with Dropdown in future
Dropdown::widget()
->items(
Link::widget(),
Link::widget()->item(Item::widget())
)
Default Dropdown list can generally be inherited from AbstractNav
That my pslam error
It looks like you either have a different version of psalm installed globally, or you have an outdated version of psalm that the package uses.
It would be great if we convert
NavItem::widget()
toItem::widget()
, and add support for icons, template to build in link as we wanted, support for container by link, with these changesItem::widget()
would be agnostic, and could be used in all widgets that need a menu. We could do it in a separate PR and thus eliminate the array methods from all the widgets.Maybe rename
NavItem
->Item
,NavLink
->Link
. It strongly looks like this could be used in conjunction with Dropdown in futureDropdown::widget() ->items( Link::widget(), Link::widget()->item(Item::widget()) )
Default Dropdown list can generally be inherited from
AbstractNav
If we can use it in all the widgets that generate a menu, which are several, let's do it.
@terabytesoftw can you look and help? Maybe remove Button
widget and replace/rename it with Link
What is missing to finish the PR?
What is missing to finish the PR?
It's works, so i need your solution ))
There are a few things I don't like related to immutability. But as a prototype, it's a 100% workable option
I'm thinking of merging this PR into a develop branch, so that the missing stuff can be addressed, do you agree?
I'm thinking of merging this PR into a develop branch, so that the missing stuff can be addressed, do you agree?
Yes. Two things I don't like:
I'm thinking of merging this PR into a develop branch, so that the missing stuff can be addressed, do you agree?
Yes. Two things I don't like:
- How I solved the psalm tests in places
- The setParent method is not immutable. If you make it immutable - it gets lost in all cloning or starts referencing another object
No problem, i'll solve it in the develop branch.