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

Lesson Plans: Landing page, archive and single page layouts #867

Merged
merged 41 commits into from
Sep 15, 2022

Conversation

danhthong
Copy link
Contributor

@danhthong danhthong commented Jul 29, 2022

This PR for #153

Steps to update Lesson Plans landing page.

@hlashbrooke
Copy link
Collaborator

This landing page looks great! Excellent work and thanks for contributing @danhthong! I will need someone from the dev team to do a code review - perhaps @adamwoodnz? - but the layout works well from my side!

One note is that this will not be set as the home page of the site, but will need to live at /lesson-plans. That means we will need to ensure this page works at that URL while maintaining the filtered lesson plans archive page that the buttons on this landing page link to. I'm unsure how to make that work, but I'm sure it can be figured out.

Copy link
Collaborator

@hlashbrooke hlashbrooke left a comment

Choose a reason for hiding this comment

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

Page needs to exist at /lesson-plans while still maintaining the filtered lesson plan archive pages.

@danhthong
Copy link
Contributor Author

Page needs to exist at /lesson-plans while still maintaining the filtered lesson plan archive pages.

@hlashbrooke I have updated as your requested to keep current url by d8783ab.

Copy link
Collaborator

@hlashbrooke hlashbrooke left a comment

Choose a reason for hiding this comment

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

This works just like I expected and I'm very happy with this! Thanks for updating the PR @danhthong!

This will still need a code review before we can merge, so we need to wait on that.

@adamwoodnz
Copy link
Contributor

This archive-title-prefix isn't in the Figma file.

I can see it's existing though. Do we want to keep it @courtneyr-dev @hlashbrooke ?

Screen Shot 2022-08-16 at 1 04 59 PM

@danhthong
Copy link
Contributor Author

@adamwoodnz All done. Thank you a lot!

update_term_meta(
$term_id,
'dashicon-class',
sanitize_text_field( $_POST['dashicon-class'] ) // phpcs:ignore WordPress.Security.NonceVerification.Missing
Copy link
Contributor

Choose a reason for hiding this comment

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

@iandunn any concerns about these ignores?

Copy link
Member

Choose a reason for hiding this comment

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

Technically they should have something like

if ( /* is inserting new term */ ) {
    check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
} else {
    check_admin_referer( 'update-tag_' . $term_id );
}

...but in practice that should be covered by the nonce that already exists in edit-tags.php

Switching to that would be ideal IMO, but not a blocker

@adamwoodnz
Copy link
Contributor

I'm seeing some odd styling on the Learn homepage cards

Screen Shot 2022-09-13 at 4 43 28 PM

They appear to be missing this padding rule

Screen Shot 2022-09-13 at 4 45 11 PM

Same for you @danhthong ?

@hlashbrooke
Copy link
Collaborator

hlashbrooke commented Sep 13, 2022

IIRC that padding will be off for you because it is actually coming from the Customiser on the live Learn site. I will confess that I added it (along with some other custom CSS) when I wasn't able to contribute code properly but needed the styling to be done.

Now that I think of it, I'll create a new issue for moving any CSS from the Customiser into the actual theme files.

UPDATE: Added an issue here: #937

@adamwoodnz
Copy link
Contributor

IIRC that padding will be off for you because it is actually coming from the Customiser on the live Learn site.

Adding this locally fixed it, thanks @hlashbrooke

I'll approve this now, and merge and deploy once I get the all clear from @iandunn.

We'll need to select the categories and audiences for the landing page cards and choose dashicons for them after deployment.

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.

LGTM 🎉

@hlashbrooke
Copy link
Collaborator

Thanks for all the hard work here @danhthong and @adamwoodnz - this is going be great to have live!

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.

Sorry @danhthong but I've found another issue with the sticky field. I don't seem to be able to un-sticky a category:

Kapture 2022-09-14 at 16 39 36

It's the same for Audiences.

@danhthong
Copy link
Contributor Author

@adamwoodnz I updated for last issue and add check to skip phpcs ignores.

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.

Works for me!

@adamwoodnz adamwoodnz merged commit 05de797 into WordPress:trunk Sep 15, 2022
@adamwoodnz adamwoodnz moved this from In Review to Done in Website Development Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants