Skip to content

[WebProfilerBundle] Add clear button to ajax tab #31876

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

Merged
merged 1 commit into from
Jul 8, 2019

Conversation

Matts
Copy link

@Matts Matts commented Jun 5, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #31839
License MIT
Doc PR symfony/symfony-docs#...

For pages that have been open for a long time, the profiler ajax tab can start filling up fast. In #31839 the request to allow the history to be cleared with one click.

The reason why I did not align the button to the right, is because after looking at the other tabs. None of them had items that were aligned to the right. Moved the addEventListener above the ajax tab logic to keep the code consistent.

Ps. Please be nice, this is my first contribution 🍰

@Matts Matts force-pushed the feature/profiler/clear-ajax branch from b1eb707 to b3a5dab Compare June 5, 2019 15:16
@nicolas-grekas nicolas-grekas added this to the next milestone Jun 5, 2019
@Matts Matts force-pushed the feature/profiler/clear-ajax branch 2 times, most recently from e424848 to 945955a Compare June 5, 2019 15:22
@Matts Matts changed the title [WebProfilerBundle] [WIP] Add clear button to ajax tab [WebProfilerBundle] Add clear button to ajax tab Jun 5, 2019
@Matts Matts force-pushed the feature/profiler/clear-ajax branch from 945955a to 0c75396 Compare June 5, 2019 15:28
@Simperfit
Copy link
Contributor

@Matts Could you please post a screenshot on how it look ?

@Matts
Copy link
Author

Matts commented Jun 7, 2019

Option 1 (current)
image

Option 2 (i find this ugly, and not in line with the rest of the tabs)
image

@dFayet
Copy link

dFayet commented Jun 14, 2019

It seems it does not clear the calls's list just the counter, except if this is wanted?

Also for my last reset (post error), the block is still in "error" mode (red display)

Capture d’écran de 2019-06-14 14-54-37

@Matts
Copy link
Author

Matts commented Jun 19, 2019

It seems it does not clear the calls's list just the counter, except if this is wanted?

Also for my last reset (post error), the block is still in "error" mode (red display)

Capture d’écran de 2019-06-14 14-54-37

I indeed forgot to clear the request list. See changes

@Matts Matts force-pushed the feature/profiler/clear-ajax branch 3 times, most recently from 54919ec to da45743 Compare June 20, 2019 08:33
@Matts
Copy link
Author

Matts commented Jul 4, 2019

Status: ready

@fabpot fabpot force-pushed the feature/profiler/clear-ajax branch from 5716a70 to 6bff4db Compare July 8, 2019 07:42
@fabpot
Copy link
Member

fabpot commented Jul 8, 2019

Thank you @Matts.

@fabpot fabpot merged commit 6bff4db into symfony:4.4 Jul 8, 2019
fabpot added a commit that referenced this pull request Jul 8, 2019
This PR was squashed before being merged into the 4.4 branch (closes #31876).

Discussion
----------

[WebProfilerBundle] Add clear button to ajax tab

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31839
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

For pages that have been open for a long time, the profiler ajax tab can start filling up fast. In #31839 the request to allow the history to be cleared with one click.

The reason why I did not align the button to the right, is because after looking at the other tabs. None of them had items that were aligned to the right. Moved the addEventListener above the ajax tab logic to keep the code consistent.

Ps. Please be nice, this is my first contribution 🍰

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

6bff4db [WebProfilerBundle] Add clear button to ajax tab
@fabpot
Copy link
Member

fabpot commented Jul 8, 2019

Congrats for your first contrib @Matts!

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants