Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[VarDumper] Scroll into view when searching #28854

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
Oct 27, 2018
Merged

[VarDumper] Scroll into view when searching #28854

merged 1 commit into from
Oct 27, 2018

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Oct 14, 2018

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

This jumps to the found element when using the javascript widget for searching HTML dumps. Inspired by Ctrl+F in Chrome :)

It's super convenient with long dumps, however i wasnt able to position the search input on the right in a fixed manner... because CSS 😓 i was hoping @ogizanagi could add a patch for it.

Also see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

@ogizanagi
Copy link
Contributor

Positioning it fixed relative to the main pre.sf-dump should be easy, but you cannot combine float and position: fixed. So that means the search bar would be over the content and thus hide part of it instead of "pushing it". It can be tricky for its width too. Both these issues can be annoying in narrow places (like in the profiler) where it's used. So not sure it's worth it, but I'll have a look.

@ro0NL
Copy link
Contributor Author

ro0NL commented Oct 14, 2018

So not sure it's worth it, but I'll have a look.

Maybe using flex display will do? But no blocker for me.. the keyboard shortcuts work either way.

@ogizanagi
Copy link
Contributor

Actually I don't see how using a flex display could help for this :/
The only "working" solution to me is having a toolbar on top of the dump content instead of being inside.

@ro0NL
Copy link
Contributor Author

ro0NL commented Oct 14, 2018

👍 for a fixed top bar, that reduces the possible min. width as well. Let me know if i should have a look in this PR.

@nicolas-grekas nicolas-grekas added this to the next milestone Oct 14, 2018
@ro0NL
Copy link
Contributor Author

ro0NL commented Oct 27, 2018

friendly ping for 4.2 as-is :)

@fabpot
Copy link
Member

fabpot commented Oct 27, 2018

Thank you @ro0NL.

@fabpot fabpot merged commit 647a937 into symfony:master Oct 27, 2018
fabpot added a commit that referenced this pull request Oct 27, 2018
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Scroll into view when searching

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This jumps to the found element when using the javascript widget for searching HTML dumps. Inspired by Ctrl+F in Chrome :)

It's super convenient with long dumps, however i wasnt able to position the search input on the right in a fixed manner... because CSS 😓 i was hoping @ogizanagi could add a patch for it.

Also see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

Commits
-------

647a937 [VarDumper] Scroll into view when searching
@ro0NL ro0NL deleted the dump branch October 27, 2018 16:22
This was referenced Nov 3, 2018
@ro0NL ro0NL mentioned this pull request Nov 12, 2018
nicolas-grekas added a commit that referenced this pull request Jan 27, 2019
This PR was squashed before being merged into the 4.2 branch (closes #29984).

Discussion
----------

[VarDumper] Fixed search bar

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Continuation of #28854, replaces #29176

initial:

![image](https://user-images.githubusercontent.com/1047696/51747953-3c9e1400-20ab-11e9-913d-d60bd59ee2d9.png)

ctrl f:

![image](https://user-images.githubusercontent.com/1047696/51747973-4b84c680-20ab-11e9-8d07-e6128822fbb2.png)

scroll:

![image](https://user-images.githubusercontent.com/1047696/51747984-550e2e80-20ab-11e9-8b54-b24109d2280a.png)

tested in chrome+ff

cc @ogizanagi

ref https://caniuse.com/#feat=css-sticky

Commits
-------

99d2893 [VarDumper] Fixed search bar
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.

5 participants