-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Feature/toolbar ui 2 #2350
Feature/toolbar ui 2 #2350
Conversation
Will do some more iterations on this... |
@@ -42,6 +42,10 @@ class Module extends \yii\base\Module | |||
*/ | |||
public $panels = []; | |||
/** | |||
* @var string postion of the custom configured panels 'begin' or 'end' | |||
*/ | |||
public $panelsPosition = 'end'; |
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 don't think this is needed.
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.
What's about position then? Currently custom panels are appended, but I want them at to appear in custom order.
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.
Is this really that important? Anyway I just added the support for disabling a core panel. You can now freely adjust the panel position as you want.
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.
Yes :) I'll add some screens to give you a better impression.
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.
Well, then I would ask why couldn't my own panel be placed within core panels, and so on. Adding this option doesn't really solve problem.
…toolbar-ui-2 Conflicts: extensions/debug/Module.php
// load latest request | ||
$tags = array_keys($this->getManifest()); | ||
$tag = reset($tags); | ||
$this->loadData($tag); |
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.
It would cause confusion to show on the toolbar the latest debug data.
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.
But this is the only page were no data is shown, otherwise it's the current request or the request you debug at the moment. But yeah, could be removed.
But then the custom panels should be rendered before the core panels, otherwise this gets ugly and confusing.
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.
Ok, we can show the latest data. But need to check if data is available.
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.
FYI, I just improved the Module::panels
property so that you can specify the display order of core panels in whatever order you like.
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.
Just merged it, great!
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.
Ok, we can show the latest data. But need to check if data is available.
@qiangxue There's already an exception in the loadData method.
throw new NotFoundHttpException("Unable to find debug data tagged with '$tag'.");
The problem is, when we don't define the panels
for rendering we'd have to change the view also.
Thanks! |
@qiangxue @samdark @Ragazzo One more thing :) I would like to make the logo and title configurable via module configuration - any objections? Another small issue is, that the panels Thanks also for merging so far, I am really looking forward seeing developers providing custom panels for their extensions. |
No objections. |
i am not sure with this one, its fine as is. you already can override this methods if needed. I ok with the rest. |
Yes, this should be fixed since we now allow disabling any core panel. |
continued from #2320 discussion...
panelsPosition
we could also introduce aposition
property
in the date formatter?