Opened 3 years ago
Last modified 2 years ago
#54764 reopened defect (bug)
UI issue in mobile device on add new theme page
Reported by: | sumitsingh | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.8.2 |
Component: | Themes | Keywords: | has-screenshots has-patch |
Focuses: | ui, css | Cc: |
Description
Hi,
UI issue in mobile device on add new theme page. when i am preview theme details then somthing wromg UI with popup width.
siteurl/wp-admin/theme-install.php?browse=new
More information check SS.
Attachments (5)
Change History (22)
#1
@
3 years ago
- Focuses ui css added
- Keywords has-screenshots needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 6.0
Can reproduce the view shown in the screenshot. This provides an inaccurate preview for the user's screen size and I agree that this should be fixed.
As far as I can see, this has two options:
- Make the sidebar full-width at
max-width: 600px
. This makes the theme preview only visible when "Collapse" has been triggered. This is similar to how the Customizer works - atmax-width: 600px
, the sidebar is full-width and the preview can only be seen once triggering "Preview". - Set the width of the theme preview (
.theme-install-overlay iframe
) to100vw
instead of100%
. This way, the theme preview will remain in proportion to the user's current screen (i.e. a true preview), rather than being limited to the available space when the sidebar is expanded. Triggering the sidebar's "Collapse" will smoothly slide the preview into place.
Milestoning for 6.0 and marking as a good-first-bug
.
To save new contributors a little bit of time, the related CSS will be in src/wp-admin/css/themes.css
which should be minified to src/wp-admin/css/themes.min.css
.
This ticket was mentioned in PR #2144 on WordPress/wordpress-develop by shreyasikhar.
3 years ago
#3
Trac ticket: https://core.trac.wordpress.org/ticket/54764
#4
@
3 years ago
The contents from the 54764.patch are as per the suggestion of @costdev.
In addition to that, I have added css overflow to the parent of the theme previewer's iframe to view the entire theme preview by scrolling horizontally and vertically on mobile/tablet devices.
This ticket was mentioned in PR #2146 on WordPress/wordpress-develop by shreyasikhar.
3 years ago
#5
Trac ticket: https://core.trac.wordpress.org/ticket/54764
#6
follow-up:
↓ 7
@
3 years ago
- Keywords commit added
The "squashed" preview occurs both when viewing the Theme Details .theme-overlay iframe
and the Customizer #customize-container iframe
.
PR 2146 changes the width from 100%
to 100vw
. In doing so, a previously "squashed" preview (based on remaining available container space) becomes a "true" preview (based on the user's viewport width).
As expected, this PR resolves the issue in both locations.
Great work @shreyasikhar26! Marking with commit
for final review.
#7
in reply to:
↑ 6
;
follow-ups:
↓ 8
↓ 10
@
3 years ago
Replying to costdev:
The "squashed" preview occurs both when viewing the Theme Details
.theme-overlay iframe
and the Customizer#customize-container iframe
.
PR 2146 changes the width from
100%
to100vw
. In doing so, a previously "squashed" preview (based on remaining available container space) becomes a "true" preview (based on the user's viewport width).
As expected, this PR resolves the issue in both locations.
Great work @shreyasikhar26! Marking with
commit
for final review.
Thank you for the appreciation.
Can we add css overflow to the parent of iframe (for which the width property is modified in the added patch), as current patch is not allowing to scroll new theme preview horizontally to see the complete content of the theme ?
#8
in reply to:
↑ 7
@
3 years ago
Please let me know if you are able to scroll on your end. @costdev
#10
in reply to:
↑ 7
@
3 years ago
Replying to shreyasikhar26:
Can we add css overflow to the parent of iframe (for which the width property is modified in the added patch), as current patch is not allowing to scroll new theme preview horizontally to see the complete content of the theme ?
Thanks for the PR! I don't think a horizontal scrollbar is necessary here, as one can simply collapse the sidebar to preview the theme. The way I see it, this ticket is more about the preview being squashed when the sidebar is open, rather than being able to really preview the theme on a small screen with the sidebar open.
Of course, this can always be reconsidered later if someone feels strongly either way.
#11
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 52647:
SergeyBiryukov commented on PR #2146:
3 years ago
#12
Thanks for the PR! Merged in https://core.trac.wordpress.org/changeset/52647.
#13
follow-up:
↓ 14
@
2 years ago
This fix caused other problems. See https://meta.trac.wordpress.org/ticket/6376
UI issue in mobile device on add new theme page