-
Notifications
You must be signed in to change notification settings - Fork 29
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
Recent Posts Block #9
Comments
From Kick-Off Call: Not that different from current "Latest Post" gutenblock, however ours is a card. Clone the Latest Post gutenblock and then re-style. |
It doesn't look like Gutenberg provides a multi-select option out of the box. Started looking around for some implementations of one and found this: https://github.com/JedWatson/react-select There are many to choose from, but that one made the most sense to me straight away. Started to play around with that a bit to see what I can learn, but... dinner calls. |
Added a standalone task for building out a multiselect component in #28. |
This may or may not be helpful for grabbing API data https://github.com/WordPress/gutenberg/tree/master/components/higher-order/with-api-data |
Pulled in the Will update with #28 once that's in a place to go. Need to set a set a series of defaults for various fields that don't necessarily have defaults out of the box. |
Made some progress here. Description
IssuesI'm having a couple of issues with the Background Type drop-down. Color works just fine, and the drop-down works functionally, but selecting image or video throws this error. I'm also getting an error when trying to call the Error
Overall I've set some new defaults, refactored some code, issued a PR to Gutenberg Core WordPress/gutenberg#6258 to fix the output of layout classes in the front end, and improved the output. Screenshots |
Solved the error with the Background Type Image/Video selection in the drop-down. Solution: import { get, isUndefined, pickBy } from 'lodash' with import _get from 'lodash/get';
import _isUndefined from 'lodash/isUndefined';
import _pickBy from 'lodash/pickBy'; Ensures Issue referenced: WordPress/gutenberg#4043 (comment) The May need to figure out a workaround for these. |
The error related to the The block is now saving/updating as expected. The output and attributes are being saved and updated on reload as expected. At this particular moment, the block has been updated to include fixes from the core Gutenberg PR, add WDS functionality (title and block options) and the render function has been updated. Some cleanup can be done here, but more or less waiting for the multi-select task #28 to be rolled into this block. |
Updates here. Branch adds the Multiselect to the sidebar. Multiselect needs a little work yet to get hooked up. Also, the multi-select in this branch is different and has some updates vs working #28. Needs: Notes: |
Update: Overall, I think the majority of the functionality is in place here. For now, there is the ability to limit posts by When working with dynamic data like this, there is a fine line between using IssuesThere are a few items of note in terms of Gutenberg that seem to be having a direct impact on this component.
One way to perhaps get around the Items To Do
ImprovementsThere are tons and tons of ways we can improve this. The work that I've done today is all about just getting something in place that works! |
The |
Update: Nearly there. Edits
TodoI'd like to have a bit of time to just look over my code and make sure it's 👌. After that, I think we are about ready for a PR! |
Just a note for a reminder on the remaining requirement items. Things like background options and custom font colors. These need to be tested and accounted for. |
Support for:
has been added. Need to look into |
Testing this out locally and have some notes below. Here, we don't need a Confirmed that the custom class does not seem to be working here, but does in our other blocks as noted above. Adding:
To the I'm not seeing the grid layout on the frontend or backend: Alphabetical Ordering does not seem to be totally accurate. Posts are going L -> V -> P. A-Z Order would be L -> P -> V. Last three posts are going S -> T -> P. Z-A Order would be T -> S -> P. You have an errant This is related to the |
Here is an update! I've made adjustments for the follow:
SortingFrom my testing, I am not able to recreate the
|
# Conflicts: # dist/blocks.build.js # dist/blocks.editor.build.css # dist/blocks.style.build.css # src/components/block-title/index.js
It is very likely, btw, that I am an idiot and didn't even see the buttons to set the posts as list vs grid. 🤦♂️ |
Closed via #42. |
Duplicate our current Hero Block functionality as a Gutenblock.
http://gutenberg.wdslab.com/acf-blocks-page/
Requirements
Screenshot
The text was updated successfully, but these errors were encountered: