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

Remove JS layout adjustment and rely on CSS #21226

Draft
wants to merge 3 commits into
base: 5.x-dev
Choose a base branch
from

Conversation

caddoo
Copy link
Contributor

@caddoo caddoo commented Sep 6, 2023

Description:

Fixes #21224

The JS calculation of width seemed to break layout in Safari from the admin screen.

Review

@bx80 bx80 added Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Sep 6, 2023
@michalkleiner
Copy link
Contributor

michalkleiner commented Sep 6, 2023

The JS was updated in 2015 via c1f3328 with the commit message "in admin area make sure to use as much content width as possible", so I guess the purpose was to stretch out the main content area. The code was there already even before git times by the looks.

Are we possibly losing that by removing this whole file or has the UI or how it's currently done superseded for all widgets/views/whatever it may affect?

@caddoo
Copy link
Contributor Author

caddoo commented Sep 7, 2023

The JS was updated in 2015 via c1f3328 with the commit message "in admin area make sure to use as much content width as possible", so I guess the purpose was to stretch out the main content area. The code was there already even before git times by the looks.

Are we possibly losing that by removing this whole file or has the UI or how it's currently done superseded for all widgets/views/whatever it may affect?

The CSS handles it most cases, I did add another commit add 100% width now it seems to work consistently.

@@ -1,4 +1,8 @@

.admin {
width: 100%;
Copy link
Member

Choose a reason for hiding this comment

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

Using global classes is always a bit "risky". This specific class would e.g. also apply here:

<div id="feedback-faq" class="admin">

It doesn't hurt in this case, as it doesn't have an effect, but might also be possible that a plugin might use that class for anything.
As it should only effect the admin content page, it might be better placed here:
#content.admin {
display: inline-block;
max-width: 1300px;
> .row {
margin: 0 -0.75rem;
}
}

@github-actions
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Sep 26, 2023
Copy link
Contributor

github-actions bot commented Nov 8, 2023

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale for long The label used by the Close Stale Issues action label Nov 8, 2023
@michalkleiner
Copy link
Contributor

I think if we get #21689 over the line we might be able to close this.

@github-actions github-actions bot removed Stale for long The label used by the Close Stale Issues action Stale The label used by the Close Stale Issues action labels Dec 30, 2023
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Jan 13, 2024
Copy link
Contributor

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale for long The label used by the Close Stale Issues action label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Stale for long The label used by the Close Stale Issues action Stale The label used by the Close Stale Issues action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The content of admin screen on Safari on Mac gets pushed down.
4 participants