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

Update archive-lesson-plan.php #1829

Closed
wants to merge 2 commits into from
Closed

Update archive-lesson-plan.php #1829

wants to merge 2 commits into from

Conversation

cynthianorman
Copy link
Contributor

Splitting the row in 2 parts with the search field top right align and the heading title just below it left align.

Splitting the row in 2 parts with the search field top right align and the heading title just below it left align.
@jonathanbossenger jonathanbossenger self-requested a review August 28, 2023 12:40
@jonathanbossenger
Copy link
Collaborator

Fixes #1808

@jonathanbossenger
Copy link
Collaborator

It looks like this also fixes #1813

@jonathanbossenger
Copy link
Collaborator

This looks good to me. I tested the lesson plan archive by topic, as well as the lesson plan archive with a search, and it all works as expected.

We might want to at some point in the future consider making that section of the lesson plan archive look more like the same section in the tutorial archive, but that's a future problem to tackle.

@jonathanbossenger
Copy link
Collaborator

@adamwoodnz when you have a moment, would you mind merging and deploying this change?

Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this fix @cynthianorman

This pattern of title or paragraph on the left with search on the right is very common throughout the site, so I'd like to see if we can maintain that if possible. I've left a comment inline regarding a solution using column classes, which is used in other places.

Let me know if you're comfortable trying that, or I'm happy to assist.

@@ -187,10 +187,12 @@

<?php else : ?>
<section>
<div class="row align-middle between section-heading section-heading--with-space">
Copy link
Contributor

@adamwoodnz adamwoodnz Aug 30, 2023

Choose a reason for hiding this comment

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

I think we could change this layout to use a col class to limit the width of the title, something like:

		<div class="row gutters between section-heading section-heading--with-space">
			<?php the_archive_title( '<h1 class="section-heading_title h2 col-8">', '</h1>' ); ?>
			<?php get_template_part( 'template-parts/component', 'archive-search' ); ?>
		</div>

This is the approach taken with the section intro pattern:

Screenshot 2023-08-30 at 2 37 54 PM

Because this is a shared pattern there is more complexity to the change though unfortunately. This style rule is being applied to override the align-middle class, and is affecting the layout when changed to the above, when the class should actually just be removed:

@media only screen and (min-width: 768px) {
    .section-heading.row {
        align-items:baseline;
    }
}

In my tests that seems to be safe. I think we should try to remove this class from the template headings throughout the site, and then remove this style rule too.

@@ -187,10 +187,12 @@

<?php else : ?>
<section>
<div class="row align-middle between section-heading section-heading--with-space">
<?php the_archive_title( '<h1 class="section-heading_title h2">', '</h1>' ); ?>
<div class="row align-right">
<?php get_template_part( 'template-parts/component', 'archive-search' ); ?>
Copy link
Contributor

@adamwoodnz adamwoodnz Aug 30, 2023

Choose a reason for hiding this comment

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

Moving the search before the title changes the mobile view, currently search is second:

modified the class for the row by using gutters instead of align-middle and using col-8 to restrict spacing of long titles
@cynthianorman
Copy link
Contributor Author

hi @adamwoodnz thanks so much for your guidance! I've made the suggested changes and pushed them already. Please let me know if I need to change anything else.
This is what we can expect now for long titles - https://prnt.sc/2BmZBg3_NfUR

@jonathanbossenger
Copy link
Collaborator

Thank you for reviewing and picking these items up @adamwoodnz

@adamwoodnz
Copy link
Contributor

Nearly there! I've added another commit and opened a new PR, as I can't push to your branch. Please try it out.

@jonathanbossenger
Copy link
Collaborator

Thank you for all the hard work so far @cynthianorman and @adamwoodnz.

I'm going to close this PR now in favor of #1834

@cynthianorman cynthianorman deleted the 1808-text-overlapping branch September 14, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants