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

Feature/toolbar ui 2 #2350

Merged
merged 15 commits into from
Feb 7, 2014
Merged

Feature/toolbar ui 2 #2350

merged 15 commits into from
Feb 7, 2014

Conversation

schmunk42
Copy link
Contributor

continued from #2320 discussion...

  • @samdark the home icon could be handled just by a custom panel - maybe this will suit everyone?
  • instead of panelsPosition we could also introduce a position property
  • how to use   in the date formatter?
  • the toolbar on the debug module index view is a bit inconsistent with the other views

@schmunk42
Copy link
Contributor Author

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';
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@schmunk42
Copy link
Contributor Author

Some screens...

bildschirmfoto 2014-02-07 um 03 06 40


bildschirmfoto 2014-02-07 um 03 06 21


bildschirmfoto 2014-02-07 um 03 06 47


bildschirmfoto 2014-02-07 um 03 06 55


bildschirmfoto 2014-02-07 um 03 06 29

// load latest request
$tags = array_keys($this->getManifest());
$tag = reset($tags);
$this->loadData($tag);
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just merged it, great!

Copy link
Contributor Author

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.

qiangxue added a commit that referenced this pull request Feb 7, 2014
@qiangxue qiangxue merged commit 20fdbc3 into yiisoft:master Feb 7, 2014
@qiangxue
Copy link
Member

qiangxue commented Feb 7, 2014

Thanks!

@cebe cebe added this to the 2.0 Beta milestone Feb 7, 2014
@schmunk42
Copy link
Contributor Author

@qiangxue @samdark @Ragazzo One more thing :)

I would like to make the logo and title configurable via module configuration - any objections?
Then it would be absolutely perfect!

Another small issue is, that the panels request and db are mandatory at the moment, but that can be fixed I think.

Thanks also for merging so far, I am really looking forward seeing developers providing custom panels for their extensions.

@samdark
Copy link
Member

samdark commented Feb 7, 2014

No objections.

@Ragazzo
Copy link
Contributor

Ragazzo commented Feb 7, 2014

I would like to make the logo and title configurable via module configuration

i am not sure with this one, its fine as is. you already can override this methods if needed.

I ok with the rest.

@qiangxue
Copy link
Member

qiangxue commented Feb 7, 2014

Another small issue is, that the panels request and db are mandatory at the moment, but that can be fixed I think.

Yes, this should be fixed since we now allow disabling any core panel.

@schmunk42 schmunk42 deleted the feature/toolbar-ui-2 branch March 17, 2014 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants