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

Add block support for the WordPress Core Editor. #4

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

georgestephanis
Copy link

@georgestephanis georgestephanis commented Dec 16, 2020

@georgestephanis
Copy link
Author

georgestephanis commented Dec 16, 2020

Vizrec for what I've got so far on the two:

Screen Shot 2020-12-16 at 11 47 56 AM

I'd like to get a better react component available for a nested dropdown forum picker, and I'm probably going to need a better api-driven topic search (as preloading all topics isn't tenable in the same way that preloading all forum topics is)

@georgestephanis
Copy link
Author

Screen Shot 2020-12-16 at 12 00 25 PM

@georgestephanis
Copy link
Author

I fixed the spacing between the icon and the text for the placeholder block, and added several more blocks as well.

@georgestephanis
Copy link
Author

Added in stub textinput pickers for the remaining data types -- topics, replies, topic tags, and views. These could all be improved.

I'd love to tweak them to pull data in via the Backbone WP API Client that ships in the core, but that's very much not my area of expertise especially working with custom post types and taxonomies and such. If possible, it would also be worth retooling the Forum picker to run off that, tbh.

cc: @adamsilverstein maybe if you can give a hot take or any input here? (I think I'd heard that the backbone client is more your back yard)

@adamsilverstein
Copy link

Hey @georgestephanis thanks for the ping.

Given this is being built for the block editor, I think you have all the API's you need to get the data you want without using the Backbone client. I think we could build a data store that would fetch the data from the API.

For the select itself, a native element works well when you have a small number of items (see WordPress/gutenberg#26077), for longer lists, I suggest using the (new) accessible autocomplete/search selector ComboboxControl component. You can see sample uses of it internally in Gutenberg in the author and page parent selectors.

@adamsilverstein
Copy link

@georgestephanis I took a pass at adding the selector + data for the Forum picker in georgestephanis#1. The styling could use some work, some improvements are being worked on upstream - see https://github.com/WordPress/gutenberg/search?q=ComboboxControl+is%3Aissue&state=open&type=Issues &

I started at the most complicated one (because it is hierarchical). I'll work on something simpler next!

Add client side data, searchable ComboBox selector for ForumPicker.
@georgestephanis
Copy link
Author

Note to self: add script dependencies for wp.data wp.element and lodash (I believe they're all on the block editor page anyways, but may as well clarify them as dependencies for load order and stuff)

@ezekiel090

This comment was marked as spam.

@usamaaslam6

This comment was marked as spam.

@dd32 dd32 deleted the branch bbpress:master August 27, 2024 03:04
@dd32 dd32 closed this Aug 27, 2024
@dd32
Copy link

dd32 commented Aug 27, 2024

Branch restored. PR re-opened. This was accidental.
This PR doesn't need to be rebased to trunk, that'll be done by the committer.

@SirLouen
Copy link

@dd32 @JJJ new revamped and rebased version in #30
This PR can be closed now.

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.

6 participants