-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: more block patterns (real estate, classified ads) #84
Conversation
* feat: use post categories and tags for all listing post types * fix: undo patterns post type changes (for another PR) * chore: remove unneeded admin page highlighting filter BREAKING CHANGE: This feature will deprecate existing custom taxonomies, so any existing terms for those taxonomies will be lost. To fix, we can convert terms from the deprecated taxonomies to standard post categories/tags via a migration script. Fixes #32.
refactor: use material icons with Newspack color
feat: listing post enhancements
Update CPT icon and Block icons
…n listings and posts/pages (#43) * feat: make Business patterns applicable only to places * feat: create shadow taxonomy for places * feat: add ability to associate Places with regular posts and pages * fix: remove default map markers from patterns * feat: new Price block for Marketplace listings Also create a proof-of-concept Marketplace listing pattern to test block implementation. * feat: add meta field with data synced from Price block * feat: second test pattern * fix: incorrect conditional for updating shadow terms (whoops) * feat: abstract shadow tax functions to make it easier to add more * refactor: simplify setting formattedPrice attribute via useEffect * chore: fix PHP warning about passing variables * feat: shadow taxonomies for all CPTs; test automated related listings * fix: avoid showing post on itself * fix: incorrect var assignment * fix: decode HTML entities before rendering currency options * chore: fix function/class docs * fix: formatting an empty string results in NaN * fix: wrong post type being returned by util * fix: handle all listing post types for shadow taxonomies * fix: don't show the shadow taxonomy for the post being edited * feat: add new post button for shadow taxonomies * chore: instantiate var as empty array, just in case * fix: updating of terms, and delete orphan terms * fix: replace Material icon with WordPress icon * feat: custom UI for parent/child listings instead of WP taxonomy UI * chore: update function comment * chore: remove commented-out code * fix: posts/pages child search fields; only show child UI if published * fix: logical errors in validation method 🤦 * chore: update function name and comments for clarity
* feat: init CSV importer via CLI command * refactor: move importer files to subdir * feat: take field mappings from config file instead of hard-coding them * feat: add (currently unused) image_ids meta field for future use * feat: process meta fields and content into block patterns * fix: mismatch between data types in term handling * feat: support multiple post types for importing * docs: add README and sample config * fix: do not apply content filters to legacy content upon importing * chore: description * fix: check if default post type constant is a listing * feat: update block template; handle social media links * feat: importer edits for GDG
…#61) * fix: use value property of selection from AutocompleteWithSuggestions * fix: cast listing ID value as an integer * fix: cast listing IDs as strings to avoid breaking existing listings
* test: init test suite * chore: fix function comment * chore: remove redundant lint-php NPM script * feat: if no view.php, register blocks with default attributes
* feat: support Newspack Sponsors * refactor: response object with author and sponsors * fix: sponsors for queried listings
Actually, in our other patterns, we've included slideshow blocks and image blocks, but empty. This seems kind of more user-friendly to me anyway since editors wouldn't have to remove placeholder images, they could just start adding their own right away. Would you be okay with following that tradition? |
Yes, ok. What would happen to the preview? Can we still have some generic images for the preview? |
Unfortunately the preview renders the pattern markup exactly, so we can't populate the previews with images while leaving the patterns empty. :( |
@thomasguillot I removed the placeholder images from the patterns in 1346e1b. Thanks! |
Oh, also wanted to point out that I incorporated the custom CSS you implemented on the demo site into the plugin. Since the styles overwrite core styles (instead of theme styles), I supposed it made sense to include them here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After inserting a pattern containing a Price block in a new Marketplace listing, the editor does not recognise the block (on WP 5.8-RC3
):
This block is also not insertable, but it renders fine on the front-end after publishing the listing.
UPDATE: Works after reinstalling npm dependencies & rebuilding, should've checked that earlier!
|
@thomasguillot Does this look okay to you with the empty image/gallery blocks? |
No, Not really. Without any images in the preview, I don't really know what I'm inserting... |
Hmm, maybe we can compromise by using a static Newspack branded asset instead of trying to pull in dynamic placeholder images. The dynamic part is what's complicated. I'll follow up on this after the 5.8 work is done. |
Sounds good, thank you @dkoo |
@thomasguillot I'd like to merge what we have now and come back to including the placeholder images in a future PR (issue here). I think the usefulness of the new patterns outweighs the usability issue of the empty gallery blocks so I'd like to get this into publishers' hands earlier rather than later. Okay with you? |
# [3.0.0-alpha.1](v2.0.1...v3.0.0-alpha.1) (2021-07-19) ### Bug Fixes * avoid meta sync update error ([#95](#95)) ([cab16aa](cab16aa)) * do not register post-specific sidebars in widgets page ([#93](#93)) ([7716775](7716775)) ### Features * bump max number of items per list from 20 to 50 ([#97](#97)) ([009deab](009deab)) * more block patterns (real estate, classified ads) ([#84](#84)) ([e76acc3](e76acc3)), closes [#40](#40) [#39](#39) [#32](#32) [#41](#41) [#49](#49) [#43](#43) [#56](#56) [#51](#51) [#57](#57) [#61](#61) [#67](#67) [#60](#60) [#70](#70) [#65](#65) [#71](#71) [#66](#66) [#58](#58) [#77](#77) [#81](#81) ### BREAKING CHANGES * This feature will deprecate existing custom taxonomies, so any existing terms for those taxonomies will be lost. To fix, we can convert terms from the deprecated taxonomies to standard post categories/tags via a migration script.
🎉 This PR is included in version 3.0.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [3.0.0-alpha.1](v2.0.1...v3.0.0-alpha.1) (2021-07-19) ### Bug Fixes * avoid meta sync update error ([#95](#95)) ([cab16aa](cab16aa)) * do not register post-specific sidebars in widgets page ([#93](#93)) ([7716775](7716775)) ### Features * bump max number of items per list from 20 to 50 ([#97](#97)) ([009deab](009deab)) * more block patterns (real estate, classified ads) ([#84](#84)) ([a51f5af](a51f5af)) * more block patterns (real estate, classified ads) ([#84](#84)) ([e76acc3](e76acc3)), closes [#40](#40) [#39](#39) [#32](#32) [#41](#41) [#49](#49) [#43](#43) [#56](#56) [#51](#51) [#57](#57) [#61](#61) [#67](#67) [#60](#60) [#70](#70) [#65](#65) [#71](#71) [#66](#66) [#58](#58) [#77](#77) [#81](#81) ### BREAKING CHANGES * This feature will deprecate existing custom taxonomies, so any existing terms for those taxonomies will be lost. To fix, we can convert terms from the deprecated taxonomies to standard post categories/tags via a migration script.
🎉 This PR is included in version 3.0.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# 1.0.0-alpha.1 (2021-07-19) ### Bug Fixes * avoid meta sync update error ([#95](#95)) ([cab16aa](cab16aa)) * do not register post-specific sidebars in widgets page ([#93](#93)) ([7716775](7716775)) * editor errors with reusable blocks ([#89](#89)) ([fdc46d3](fdc46d3)) * errors and bugs related to WP 5.8 ([#83](#83)) ([90da6c5](90da6c5)) * force alpha rebuild ([acc2075](acc2075)) * minor bug fixes ([#21](#21)) ([5f90bc7](5f90bc7)) * missing condition for block appender in list container ([#74](#74)) ([2c49896](2c49896)) * syncing attributes from curated list block to inner blocks ([#64](#64)) ([cdbc0bb](cdbc0bb)) * use synced attributes for ListContainer directly ([#73](#73)) ([f8641a7](f8641a7)) ### Features * add block patterns ([#23](#23)) ([a273a40](a273a40)) * bump max number of items per list from 20 to 50 ([#97](#97)) ([009deab](009deab)) * initial post type and block setup ([#1](#1)) ([47dc0c1](47dc0c1)) * listing taxonomies and query mode ([#6](#6)) ([528e1e5](528e1e5)) * more block patterns (real estate, classified ads) ([#84](#84)) ([a51f5af](a51f5af)) * new Curated List block, block pattern, and map functionality ([#3](#3)) ([9be6e7e](9be6e7e)) * remove borders and padding in editor to match front-end styles ([#14](#14)) ([6c47a17](6c47a17)) * v2 release (#85) ([748810d](748810d)), closes [#85](#85) [#40](#40) [#39](#39) [#32](#32) [#41](#41) [#49](#49) [#43](#43) [#56](#56) [#51](#51) [#57](#57) [#61](#61) [#67](#67) [#60](#60) [#70](#70) [#65](#65) [#71](#71) [#66](#66) [#58](#58) [#77](#77) [#81](#81) ### BREAKING CHANGES * This feature will deprecate existing custom taxonomies, so any existing terms for those taxonomies will be lost. To fix, we can convert terms from the deprecated taxonomies to standard post categories/tags via a migration script.
# [2.1.0-alpha.1](v2.0.1...v2.1.0-alpha.1) (2021-07-19) ### Bug Fixes * avoid meta sync update error ([#95](#95)) ([cab16aa](cab16aa)) * do not register post-specific sidebars in widgets page ([#93](#93)) ([7716775](7716775)) ### Features * bump max number of items per list from 20 to 50 ([#97](#97)) ([009deab](009deab)) * more block patterns (real estate, classified ads) ([#84](#84)) ([a51f5af](a51f5af))
# [2.1.0](v2.0.1...v2.1.0) (2021-07-19) ### Bug Fixes * avoid meta sync update error ([#95](#95)) ([cab16aa](cab16aa)) * do not register post-specific sidebars in widgets page ([#93](#93)) ([7716775](7716775)) ### Features * bump max number of items per list from 20 to 50 ([#97](#97)) ([009deab](009deab)) * more block patterns (real estate, classified ads) ([#84](#84)) ([a51f5af](a51f5af))
All Submissions:
Changes proposed in this Pull Request:
Implements block patterns for real estate listings and classified ads (h/t @thomasguillot for the design).
Note: the patterns retain the hard-coded images from newspack-listings-demo.newspackstaging.com—should we replace those with placeholder images?
Addresses #38 but doesn't totally close it (could use other patterns in the future for: job listings, obituaries, events).
How to test the changes in this Pull Request:
Other information: