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

Skip to content

fix query explanation table width restrictions #46750

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 22, 2022
Merged

fix query explanation table width restrictions #46750

merged 1 commit into from
Jul 22, 2022

Conversation

zolikonta
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

max width for query explanation table was too wide for Normal page width
max width for query explanation table was too narrow for Full-page

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@zolikonta zolikonta marked this pull request as ready for review June 23, 2022 13:32
@carsonbot carsonbot added this to the 6.2 milestone Jun 23, 2022
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

I think @Amunak has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

I left a minor comment, but I think it's safe to make this change because it's true that the available space for the SQL explain table is less than 920px, so we must reduce that value.

The proposed new value is arbitrary, but it's fine in this case.

max-width: 888px;
}
.width-full .sql-explain {
max-width: min-content;
Copy link
Member

Choose a reason for hiding this comment

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

Here we could even use max-width: unset to not restrict the max width, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you Javier for taking the time to review my pull request. I'm OK with the suggested change.
Let me know if I should make that change. Not sure about the workflow here since it's my first PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe max-width: fit-content? Unset would make simple explain windows too wide on big screens.

image
as opposed to
image

But it's your call. We could go either way.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I didn't reply earlier. Don't worry about this. Now that this is merged, people can test it for real and if there's any issue we'll get reports. So, everything is fine. Thanks!

@fabpot
Copy link
Member

fabpot commented Jul 22, 2022

Thank you @zolikonta.

@fabpot fabpot merged commit 75e7a75 into symfony:6.2 Jul 22, 2022
@zolikonta
Copy link
Contributor Author

Great. Thank you guys!
Is there a chance to see this later on 4.4 and 5.4 branches too?

nicolas-grekas added a commit that referenced this pull request Feb 21, 2023
… with Postgresql (stof)

This PR was merged into the 6.2 branch.

Discussion
----------

[WebProfilerBundle] Fix the rendering of query explanation with Postgresql

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        | n/a

Postgresql (and some other platforms) provide a textual query explanation rather than a tabular one.
The previous styles were working only for a tabular display. For text allowing to break words, `min-content` is the width of a single letter.

With the old code (introduced in #46750), a query explanation looks like that when using Postgresql (well, with a lot more lines that what is included in the screenshot):
![image](https://user-images.githubusercontent.com/439401/220405453-ffdb0b24-91fe-4ba5-aeb6-4a919b07d007.png)

After the change, it looks like that (including only the first few lines), which is a lot easier to read:
![image](https://user-images.githubusercontent.com/439401/220405829-8a279d4f-2f1a-42db-bae1-2fd4d4279550.png)

Commits
-------

f238349 Fix the rendering of query explanation with Postgresql
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.

4 participants