[wp-meta] [Making WordPress.org] #6945: Create Props Block for Make Blogs and Deverloper Blog

Making WordPress.org noreply at wordpress.org
Wed May 17 02:13:29 UTC 2023


#6945: Create Props Block for Make Blogs and Deverloper Blog
-----------------------------------------------------+---------------------
 Reporter:  bph                                      |       Owner:  (none)
     Type:  enhancement                              |      Status:  new
 Priority:  normal                                   |   Milestone:
Component:  Make (Get Involved) / P2                 |  Resolution:
 Keywords:  dev-feedback good-first-bug needs-patch  |
-----------------------------------------------------+---------------------

Comment (by dd32):

 Replying to [comment:4 gaambo]:
 > 1. How are props linked at the moment? Are links added to the usernames
 manually or somehow automatically - and if automatically on rendering or
 on saving?

 We currently use `@mention` format which is parsed by o2 on save, and
 rendered on display.


 > 2. "Extends the Paragraph block" - So at the moment is this just a
 normal paragraph block? That means that usernames and their roles are just
 written as text and usernames would have to be parsed out of the text
 (probably by a regex)

 The notion was that it doesn't need anything fancy, just a way for a new
 block (likely using the Paragraph block as it's base type) that upon being
 used would mark @mentions within to be triggered as props.
 Not that it'd be an option added to all existing paragraph blocks.

 > 5. I'm thinking about where to call the add_activity function. A server-
 side callback on save_post would be one option.

 This is likely the only scenario which could realistically work, it would
 need to delay processing until `post_status = publish`, and then figure
 out any new names added after publish.

 > Another option would be to call a custom REST API endpoint when the
 block editor publishes the post.
 Doing it client-side is likely too fragile, as it would need to validate
 usernames and call the PHP functions which wouldn't be exposed publicly.

 > 6. We'd somehow need to save the props that we already sent as activity
 to .org, so when someone updates the post  - and maybe adds new props or
 deletes some, we can compare them and only sync those. Probably the
 easiest way would be to store the props that were already handled in a
 postmeta field.

 Correct.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/6945#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list