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

Themes global view: Show global sidebar on theme #93928

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

allilevine
Copy link
Member

@allilevine allilevine commented Aug 26, 2024

Related to #92645

Proposed Changes

  • Frame the individual /theme page the same way as the /themes showcase, at both the /sites and individual site level.
  • Planned follow-ups:
    • Highlight Themes in the sidebar while on a theme page, like plugins.
    • Use breadcrumbs in header, like plugins.
Before After
Screen Shot 2024-08-27 at 11 52 11 AM Screen Shot 2024-08-27 at 11 51 37 AM

Why are these changes being made?

  • To keep the interface consistent between the themes showcase and clicking a theme.

Testing Instructions

  • Open /themes and click on a theme.
  • Verify that the global sidebar and gray frame are visible.
  • Test for regressions on mobile screen sizes and different browsers.
  • Open /themes while logged out and click on a theme.
  • Verify that there are no changes (no new sidebar and frame) and test for regressions.
  • Open themes from My Home > Appearance > Themes and click on a theme.
  • Verify that the sidebar is visible, and that there aren't regressions.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@allilevine allilevine changed the title Themes global view: Show sidebar on theme Themes global view: Show global sidebar on theme Aug 26, 2024
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Aug 26, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/global-content-frame-for-theme on your sandbox.

@@ -140,7 +154,8 @@ $button-border: 4px;
display: flex;
gap: 16px;
flex-direction: column;
padding: 0;
padding-top: 0;
padding-bottom: 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

I made this change to remove a horizontal scrollbar.

@@ -74,9 +74,9 @@ body.command-palette-modal-open {
}

// Themes sets it own padding/margin
.is-section-theme &,
.is-section-theme.has-no-sidebar &,
Copy link
Member Author

Choose a reason for hiding this comment

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

Added has-no-sidebar class since some /theme pages will now have a sidebar.

@@ -1014,11 +1014,6 @@ $font-size: rem(14px);
overflow: initial;
}
}
.is-section-theme {
.layout__secondary {
transform: translateX(-100%);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was hiding the sidebar in all cases, on theme pages.

@@ -36,6 +37,7 @@ export default function ( router ) {
noSite,
fetchThemeDetailsData,
details,
addNavigationIfLoggedIn,
Copy link
Member Author

Choose a reason for hiding this comment

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

Adds the sidebar navigation. We'll likely want to follow up with a custom sidebar to highlight the Themes item.

@allilevine allilevine marked this pull request as ready for review August 27, 2024 16:01
@allilevine allilevine requested a review from a team August 27, 2024 16:24
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 27, 2024
@allilevine allilevine requested review from a team August 27, 2024 16:24
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

This makes the individual themes page at the site level have a sidebar too, which I think is also an improvement there as well!

Screenshot 2024-08-27 at 4 15 58 PM

However a small regression at an odd viewport. I notice here if you reload the browser at the site level showcase, the individual theme bleeds behind the sidebar now. (I assume due to removal of that translateX -100% rule.)

Screenshot 2024-08-27 at 4 18 03 PM

This doesn't seem to happen if i start from the sites dashbaord, so I assume something in those stylesheets is carrying over to let it work in that case.

@allilevine allilevine force-pushed the add/global-content-frame-for-theme branch from 4487a5e to 4dfcf61 Compare August 28, 2024 14:30
@allilevine
Copy link
Member Author

This makes the individual themes page at the site level have a sidebar too, which I think is also an improvement there as well!

@Addison-Stavlo Thanks for catching that! I'll keep the change then. 😄

However a small regression at an odd viewport. I notice here if you reload the browser at the site level showcase, the individual theme bleeds behind the sidebar now. (I assume due to removal of that translateX -100% rule.)

Fixed, thanks! I'd missed another padding: 0 rule in layout/style.scss.

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

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

Looks good on my end!

@allilevine allilevine merged commit 96f9272 into trunk Aug 28, 2024
11 checks passed
@allilevine allilevine deleted the add/global-content-frame-for-theme branch August 28, 2024 17:05
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants