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

[Debug] [4.2] Structure debug toolbar timeline with collapsible elements. #4886

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

sfadschm
Copy link
Contributor

@sfadschm sfadschm commented Jun 28, 2021

This is an extension of #4865.

This PR intrduces structuring of the debugbar timeline elements.
They are now sorted in a parent-children structure like this:

[
    'name'     => 'parentTimer',
    'start'    => '0',
    'duration' => '10',
    'children' => [
        [
            'name'     => 'childTimer',
            'start'    => 2,
            'duration' => 4
        ]
    ]
]

These elements are then echoed recursively and embedded in JS collapsible table rows.

For now, the Controller parent element is unfolded by default, as this will likely alway be the biggest and last part of the timeline.

One thing I am not yet fond of is the flexible indentation of the Timer name in the current state. That is, each deeper level is indented by an additional 10px, which I think might pose some issue on very narrow screens.

Demonstration

Timeline.Demonstration.mp4

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner
Copy link
Member

MGatner commented Jun 28, 2021

This looks great! Thanks so much - I've often wanted this "drill down" ability, especially in Controller.

@lonnieezell
Copy link
Member

Looks great. Thanks!

@lonnieezell lonnieezell merged commit 6d752f4 into codeigniter4:4.2 Jun 28, 2021
@sfadschm sfadschm deleted the 4.2 branch June 28, 2021 14:22
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.

3 participants